confirmPaymentIntent
Confirms a payment after collecting a payment method succeeds.
=== Synchronous capture ===
Stripe Terminal uses two-step card payments to prevent unintended and duplicate payments. When confirmPaymentIntent
completes successfully, a charge has been authorized on the customer's card, but not yet been "captured". Your app must synchronously notify your backend to capture the PaymentIntent in order to settle the funds to your account.
=== Handling failures ===
When confirmPaymentIntent
fails, the SDK returns an error that includes the updated PaymentIntent. Your app should inspect the updated PaymentIntent to decide how to retry the payment.
If the updated PaymentIntent is
null
, the request to Stripe's servers timed out and the PaymentIntent's status is unknown. We recommend that you retryconfirmPaymentIntent
with the original PaymentIntent. If you instead choose to abandon the original PaymentIntent and create a new one, do not capture the original PaymentIntent. If you do, you might charge your customer twice.If the updated PaymentIntent's status is still
REQUIRES_CONFIRMATION
(e.g., the request failed because your app is not connected to the internet), you can callconfirmPaymentIntent
again with the updatedPaymentIntent
to retry the request.If the updated PaymentIntent's status changes to
REQUIRES_PAYMENT_METHOD
(e.g., the request failed because the card was declined), call collectPaymentMethod with the updated PaymentIntent to try charging another card.
See https://stripe.com/docs/terminal/payments#process.
Parameters
The PaymentIntent that should be processed
The PaymentIntentCallback to be called when processing completes