We recommend providing a customer ID while creating a SetupIntent—doing so attaches the card payment method to the
Customer upon successful setup. If you don’t provide a customer ID, you must attach the payment method in a separate call.
A SetupIntent is an object that represents your intent to set up a customer’s payment method for future payments. The SetupIntent tracks the steps of this setup process. For Terminal, this includes collecting and recording cardholder consent.
With the iOS, Android, and React Native SDKs, you can create a SetupIntent client-side and provide the
onBehalfOf (Connect only), and
payment_method_types parameter must include
The SetupIntent contains a client secret, a key that’s unique to the individual SetupIntent. To use the client secret, you must obtain it from the SetupIntent on your server and pass it to the client side.
collectSetupIntentPaymentMethod. For iOS and Android, first use the client secret to call
retrieveSetupIntent, and then use the retrieved SetupIntent to call