collectPaymentMethod

fun collectPaymentMethod(intent: PaymentIntent, callback: PaymentIntentCallback): Cancelable

Collects a payment method for the given PaymentIntent.

If collecting a payment method fails, the callback will be called with an error. After resolving the error, you may call collectPaymentMethod again to either try the same card again, or try a different card.

If collecting a payment method succeeds, the callback will be called with a PaymentIntent with status REQUIRES_CONFIRMATION, indicating that you should call processPayment to finish the payment.

See https://stripe.com/docs/terminal/payments#collect.

Return

A Cancelable that allows the operation to be canceled at any time

Parameters

intent

The PaymentIntent to which the payment method should be attached

callback

The PaymentIntentCallback to be called after the command completes