POST
/v1/test_helpers/confirmation_tokensCreate a test Confirmation Token
Creates a test mode Confirmation Token server side for your integration tests.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
expandarray<string>optional
Specifies which fields in the response should be expanded.
payment_methodstringoptional
ID of an existing PaymentMethod.
payment_method_dataobjectoptional
If provided, this hash will be used to create a PaymentMethod.
payment_method_optionsobjectoptional
Payment-method-specific configuration for this ConfirmationToken.
return_urlstringoptional
Return URL used to confirm the Intent.
setup_future_usagestringoptional
Indicates that you intend to make future payments with this ConfirmationToken's payment method.
The presence of this property will [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
shippingobjectoptional
Shipping information for this ConfirmationToken.
200Successful response.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
expires_atintegeroptional
Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
mandate_dataobjectoptional
Data used for generating a Mandate.
metadataobjectoptional
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
payment_intentstringoptional
ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
payment_method_optionsobjectoptional
Payment-method-specific configuration for this ConfirmationToken.
payment_method_previewobjectoptional
Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
return_urlstringoptional
Return URL used to confirm the Intent.
setup_future_usagestringoptional
Indicates that you intend to make future payments with this ConfirmationToken's payment method.
The presence of this property will [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
setup_intentstringoptional
ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
shippingobjectoptional
Shipping information collected on this ConfirmationToken.
use_stripe_sdkbooleanrequired
Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken.
defaultError response.
errorobjectrequired
Error handling
Any other status is an error: Error response.