Skip to content

Stripe: Retrieve a Confirmation Token

Stripe confirmationTokens.getConfirmationTokensConfirmationToken: arguments, response, policy and SDK examples.

← Confirmation tokens operations · Get started

Operation stripe.getconfirmationtokensconfirmationtoken

Provider route: GET /v1/confirmation_tokens/{confirmation_token}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["confirmationTokens"]["getConfirmationTokensConfirmationToken"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.confirmationTokens.getConfirmationTokensConfirmationToken(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.confirmation_tokens.get_confirmation_tokens_confirmation_token(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.confirmation_tokenstringRequired within parentMaximum length: 5000
queryobjectOptionalAdditional keys: not allowed
query.expandarrayOptional
query.expand[]stringEach itemMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieve a Confirmation Token — response body

Referenced models: Retrieve a Confirmation Token — response body

711 more schemas are linked from the tables above, on the schema pages.

Retrieve a Confirmation Token — response body
FieldTypePresenceDescription and constraints
$objectRootConfirmationTokens help transport client side data collected by Stripe JS over
to your server for confirming a PaymentIntent or SetupIntent. If the confirmation
is successful, values present on the ConfirmationToken are written onto the Intent.

To learn more about how to use ConfirmationToken, visit the related guides:
- [Finalize payments on the server](https://docs.stripe.com/payments/finalize-payments-on-the-server)
- [Build two-step confirmation](https://docs.stripe.com/payments/build-a-two-step-confirmation).
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
expires_atJSONOptional
expires_at (anyOf 1)JSONAlternative
expires_at (anyOf 1) (anyOf 1)integerAlternativeTime at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
Format: unix-time
expires_at (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
expires_at (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
mandate_dataJSONOptional
mandate_data (anyOf 1)JSONAlternativeData used for generating a Mandate.
mandate_data (anyOf 1) (anyOf 1)ModelAlternativeExpand Retrieve a Confirmation Token — response body — mandate data Data used for generating a Mandate Data used for generating a Mandate
mandate_data (anyOf 2)nullAlternative
metadataJSONOptional
metadata (anyOf 1)objectAlternativeSet 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.
Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keysMaximum length: 500
metadata (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: confirmation_token
payment_intentJSONOptional
payment_intent (anyOf 1)stringAlternativeID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
Maximum length: 5000
payment_intent (anyOf 2)nullAlternative
payment_method_optionsJSONOptional
payment_method_options (anyOf 1)JSONAlternativePayment-method-specific configuration for this ConfirmationToken.
payment_method_options (anyOf 1) (anyOf 1)ModelAlternativeExpand Retrieve a Confirmation Token — response body — payment method options value Payment-method-specific configuration
payment_method_options (anyOf 2)nullAlternative
payment_method_previewJSONOptional
payment_method_preview (anyOf 1)JSONAlternativePayment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
payment_method_preview (anyOf 1) (anyOf 1)ModelAlternativeExpand Retrieve a ConfirmationToken — response body — payment_method_preview / value / allow_redisplay: always, limited, unspecified
payment_method_preview (anyOf 2)nullAlternative
return_urlJSONOptional
return_url (anyOf 1)stringAlternativeReturn URL used to confirm the Intent.
Maximum length: 5000
return_url (anyOf 2)nullAlternative
setup_future_usageJSONOptional
setup_future_usage (anyOf 1)stringAlternativeIndicates 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.
Known values: off_session, on_session
setup_future_usage (anyOf 2)nullAlternative
setup_intentJSONOptional
setup_intent (anyOf 1)stringAlternativeID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
Maximum length: 5000
setup_intent (anyOf 2)nullAlternative
shippingJSONOptional
shipping (anyOf 1)JSONAlternativeShipping information collected on this ConfirmationToken.
shipping (anyOf 1) (anyOf 1)ModelAlternativeExpand Retrieve a Confirmation Token — response body — shipping value address, name, phone
shipping (anyOf 2)nullAlternative
use_stripe_sdkbooleanRequired within parentIndicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken.

Referenced models: Retrieve a Confirmation Token — response body — mandate data Data used for generating a Mandate Data used for generating a Mandate, Retrieve a Confirmation Token — response body — payment method options value Payment-method-specific configuration, Retrieve a ConfirmationToken — response body — payment_method_preview / value / allow_redisplay: always, limited, unspecified, Retrieve a Confirmation Token — response body — shipping value address, name, phone

Retrieve a Confirmation Token — response body — mandate data Data used for generating a Mandate Data used for generating a Mandate
FieldTypePresenceDescription and constraints
$objectRootData used for generating a Mandate.
customer_acceptanceModelRequired within parentExpand Retrieve a Confirmation Token — response body — mandate data Data used for generating a Mandate Data used for generating a Mandate customer acceptance

Referenced models: Retrieve a Confirmation Token — response body — mandate data Data used for generating a Mandate Data used for generating a Mandate customer acceptance

Retrieve a Confirmation Token — response body — payment method options value Payment-method-specific configuration
FieldTypePresenceDescription and constraints
$objectRootPayment-method-specific configuration
cardJSONOptional
card (anyOf 1)JSONAlternativeThis hash contains the card payment method options.
card (anyOf 1) (anyOf 1)ModelAlternativeExpand Retrieve a Confirmation Token — response body — payment method options value Payment-method-specific configuration card This hash contains the card payment method options This hash contains the card payment method options
card (anyOf 2)nullAlternative

Referenced models: Retrieve a Confirmation Token — response body — payment method options value Payment-method-specific configuration card This hash contains the card payment method options This hash contains the card payment method options

Retrieve a Confirmation Token — response body — shipping value address, name, phone
FieldTypePresenceDescription and constraints
$objectRoot
addressModelRequired within parentExpand Create a Location — response body — address
namestringRequired within parentRecipient name.
Maximum length: 5000
phoneJSONOptional
phone (anyOf 1)stringAlternativeRecipient phone (including extension).
Maximum length: 5000
phone (anyOf 2)nullAlternative

Referenced models: Create a Location — response body — address

Retrieve a Confirmation Token — response body — mandate data Data used for generating a Mandate Data used for generating a Mandate customer acceptance
FieldTypePresenceDescription and constraints
$objectRootThis hash contains details about the customer acceptance of the Mandate.
onlineJSONOptional
online (anyOf 1)JSONAlternativeIf this is a Mandate accepted online, this hash contains details about the online acceptance.
online (anyOf 1) (anyOf 1)ModelAlternativeExpand Retrieve a Confirmation Token — response body — mandate data Data used for generating a Mandate Data used for generating a Mandate customer acceptance online value ip address, user agent
online (anyOf 2)nullAlternative
typestringRequired within parentThe type of customer acceptance information included with the Mandate.
Maximum length: 5000

Referenced models: Retrieve a Confirmation Token — response body — mandate data Data used for generating a Mandate Data used for generating a Mandate customer acceptance online value ip address, user agent

Create a Payment Method — response body — zip
FieldTypePresenceDescription and constraints
$objectRoot
Create a Payment Method — response body — boleto
FieldTypePresenceDescription and constraints
$objectRoot
tax_idstringRequired within parentUniquely identifies the customer tax id (CNPJ or CPF)
Maximum length: 5000

SDK function policy ID: stripe.getconfirmationtokensconfirmationtoken. Catalog operation: GetConfirmationTokensConfirmationToken. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.