paymentIntent

If the exception is related to a PaymentIntent, this will return one of three things:

  1. The updated PaymentIntent with a PaymentIntent.status of REQUIRES_PAYMENT_METHOD. This signifies that there was a failure to confirm this payment method, and Terminal.collectPaymentMethod should be called again with the updated PaymentIntent to try charging another payment method.

  2. The updated PaymentIntent with a PaymentIntent.status of REQUIRES_CONFIRMATION. This signifies that the request failed due to an unexpected error (e.g. a temporary connectivity problem) and the call to Terminal.confirmPaymentIntent should be retried with the updated PaymentIntent.

  3. Null. This signifies that the request to Stripe's servers timed out and PaymentIntent.status is unknown. In this situation, the call to Terminal.confirmPaymentIntent should be retried with the original PaymentIntent. If you instead choose to abandon the original PaymentIntent and create a new one, be sure not to capture the original PaymentIntent.

For exceptions unrelated to a PaymentIntent, this will return null.

https://stripe.com/docs/terminal/payments#process

Return

The current PaymentIntent