#j_floral_frog_45804

1 messages · Page 1 of 1 (latest)

thick wolfBOT
frigid mirage
#

Sure, what's the issue?

next oriole
#

we have started getting the error message "This PaymentIntent could not be captured because it has a status of requires_payment_method. Only a PaymentIntent with one of the following statuses may be captured: requires_capture." but the status has not changed from before and matches what is in the API docs

frigid mirage
#

Sure, sounds like the pi_xxx needs confirming with payment information first and then it'll transition to requires_capture

next oriole
#

This is something that was working previously, what could have caused this to stop working?

frigid mirage
#

You'd need to share some examples of where it works and it doesn't

next oriole
#

here's an example where error is created: "pi_3OZV6FBRgXLbUnKg2pOWe4m3"

#

Here is a working example "pi_3OXhj4BRgXLbUnKg0i3Ys3St"

frigid mirage
#

So it's still awaiting card details to be collected and will then transition to requires_capture

next oriole
#

Yes i understand, the error appears a second or two after creating the PI before card is presented

frigid mirage
#

Which 'error'?

next oriole
#

"This PaymentIntent could not be captured because it has a status of requires_payment_method. Only a PaymentIntent with one of the following statuses may be captured: requires_capture."

frigid mirage
#

Sorry I'm not really understand the issue here. You called the process endpoint (https://stripe.com/docs/terminal/payments/collect-payment?terminal-sdk-platform=server-driven#process-payment) which triggers the reader into a state ready to collect a card. Except that there was never a card presneted/collected, so the PI didn't transition to requires_capture. You] need to call /process_payment_intent again and present a card

Prepare your application and backend to collect payments using Stripe Terminal.

next oriole
#

so we are currently creating payment_intent for a terminal reader transaction, then calling process_payment_intent to trigger the card machine like you say but after a couple seconds we receive the error where we didn't receive one before. im not sure what has changed and caused the error

frigid mirage
#

I believe the reader is time dependent yes, like it will 'fail' if there's no card presented within a few seconds

next oriole
#

But not 2 seconds, I would expect this to be at least 30 seconds before a timeout, there must be something else causing the issue

thick wolfBOT
sage widget
#

👋 taking over for my colleague. Let me catch up.

#

this is a livemode PI and you've used a test card to pay it

#

that's why it failed

next oriole
#

Hi , i understand the 402 error end expected it. The issue we're having is the 400 error eg req_tPo8zlRcfqDKpx

sage widget
#

taking a look

#

2- in all cases, the underlying problem is still the same, the use of the test card for a live mode PI, made the PI in requires_payment_method

#

so you can't really do much than collect a new Payment Method at that point

next oriole
#

error 402 is a non issue, just use the test card to clear the machine and we know that produces the error. so would us calling /capture cause the 400 error i referenced?

sage widget
#

yes

#

because the fact that the card got declined, makes the PaymentIntent's status revert to requires_payment_method

#

but I don't understand why you're using the /capture in the first place since you're using capture_method: 'automatic'

#

so no need to call /capture

next oriole
#

okay hold on, i will produce a non test card scenario for you to check the logs

#

okay, please check pi_3OZWMvBRgXLbUnKg0daq5mAj

sage widget
#

I'm still not sure why you're testing in live mode?

next oriole
#

we're testing the physical terminal in our EPOS which cannot be done in test mode

sage widget
#

it can actually with a Stripe test card

next oriole
#

this kept triggering the test helpers virtual terminal which created errors for us

#

sorry, simulated terminal not virtual

sage widget
#

you don't need to use the simulated terminal

next oriole
#

anyway, for the time being we just want to clear the errors for the live mode, we can look at test modes at a later date

sage widget
#

but the problem is still the same thing as I explained before, you're using /capture on a PI created with capture_method: 'automatic'

#

using capture_method: 'manual'

next oriole
#

i can't see /capture on the logs, we changed capture_method to automatic as when this was set to manual, the payments weren't being captured and were refunded to card holder automatically

sage widget
#

you need to create the PI with capture_method: 'manual' then you can collect by calling /capture

#

but I think you need to wait for the process to finish