POST
/v1/setup_intents/{intent}/confirmConfirm a SetupIntent
Confirms that a customer intends to set up a payment method on a SetupIntent. Provide a payment method, confirmation token, or payment method data as appropriate for the setup flow. The SetupIntent can succeed immediately, require additional customer action, or transition to a failed or canceled status.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
intentstringrequired
The unique identifier of the SetupIntent to confirm; must not exceed 5,000 characters.
Optional confirmation settings, payment method details, and response expansion options.
allowed_payment_method_typesarray<string>optional
The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
client_secretstringoptional
The client secret of the SetupIntent.
confirmation_tokenstringoptional
ID of the ConfirmationToken used to confirm this SetupIntent.
If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
expandarray<string>optional
Specifies which fields in the response should be expanded.
mandate_dataobjectoptional
Mandate creation details; the object form must include `customer_acceptance`.
payment_methodstringoptional
ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
payment_method_dataobjectoptional
When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method)
value in the SetupIntent.
payment_method_optionsobjectoptional
Payment method-specific configuration for this SetupIntent.
return_urlstringoptional
The URL to redirect your customer back to after they authenticate on the payment method's app or site.
If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
This parameter is only used for cards and other redirect-based payment methods.
use_stripe_sdkbooleanoptional
Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
200Returns the confirmed SetupIntent object with its payment method types, current status, and any required next action.
allowed_payment_method_typesarray<string>optional
The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer.
applicationstringoptional
ID of the Connect application that created the SetupIntent.
attach_to_selfbooleanoptional
If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
automatic_payment_methodsobjectoptional
Settings for dynamic payment methods compatible with this Setup Intent
cancellation_reasonstringoptional
Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
client_secretstringoptional
The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
customerstringoptional
ID of the Customer this SetupIntent belongs to, if one exists.
If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
customer_accountstringoptional
ID of the Account this SetupIntent belongs to, if one exists.
If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent.
descriptionstringoptional
An arbitrary string attached to the object. Often useful for displaying to users.
excluded_payment_method_typesarray<string>optional
Payment method types that are excluded from this SetupIntent.
flow_directionsarray<string>optional
Indicates the directions of money movement for which this payment method is intended to be used.
Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
idstringrequired
Unique identifier for the object.
last_setup_errorobjectoptional
The error encountered in the previous SetupIntent confirmation.
latest_attemptstringoptional
The most recent SetupAttempt for this SetupIntent.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
managed_paymentsobjectoptional
mandatestringoptional
ID of the multi use Mandate generated by the SetupIntent.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
next_actionobjectoptional
If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
on_behalf_ofstringoptional
The account (if any) for which the setup is intended.
payment_methodstringoptional
ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead.
payment_method_configuration_detailsobjectoptional
Information about the [payment method configuration](https://docs.stripe.com/api/payment_method_configurations) used for this Setup Intent.
payment_method_optionsobjectoptional
Payment method-specific configuration for this SetupIntent.
payment_method_typesarray<string>required
The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
single_use_mandatestringoptional
ID of the single_use Mandate generated by the SetupIntent.
statusstringrequired
[Status](https://docs.stripe.com/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
usagestringrequired
Indicates how the payment method is intended to be used in the future.
Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
defaultError response.
errorobjectrequired
Error handling
intent must be a string of no more than 5,000 characters identifying the SetupIntent. If supplied, payment_method_data must include type, and mandate_data must include customer_acceptance; return_url is used for redirect-based payment methods.