Stripe Confirmation Tokens support metadata
Introduced 2026-08-26 · score 0.94
HOW TO USE IT
When an Elements payment flow creates a ConfirmationToken for server-side confirmation, call `stripe.createConfirmationToken` with metadata in `params`; then retrieve the token server-side with your secret key and read `metadata`.
const {confirmationToken, error} = await stripe.createConfirmationToken({elements, params: {metadata: {order_id: "<order_id>"}}});stripe.confirmationTokens.retrieve("<confirmation_token_id>")WHY THIS HELPS
When implementing a payment flow that creates and retrieves Confirmation Tokens, attach metadata and read it on the server.
REQUIREMENTS AND LIMITATIONS
- Version: 2026-08-26.dahlia
- elements (required): Elements instance used to create the Express Checkout Element or Payment Element; `stripe.createConfirmationToken` collects payment, billing, and shipping details from it.
- params: Parameters passed to the Stripe API; may include `metadata`.
- params.metadata: Map of key-value pairs attached to the ConfirmationToken; supports up to 50 pairs. Metadata is not returned in the frontend response.
- metadata: Nullable map of key-value pairs on a ConfirmationToken object.
- Prerequisite: Use the Elements instance associated with an Express Checkout Element or Payment Element.
- Prerequisite: Retrieving the token and its metadata is described for server-side use with a secret key.
- Metadata can be attached when creating a ConfirmationToken through Stripe.js.
- Up to 50 key-value pairs are supported.
- Retrieval with metadata is described for server-side use with a secret key.
FIRST-PARTY EVIDENCE
- https://docs.stripe.com/changelog/dahlia/2026-08-26/adds-metadata-support-to-confirmation-tokens
- https://docs.stripe.com/js/confirmation_tokens/create_confirmation_token
- https://docs.stripe.com/api/confirmation_tokens/retrieve?api-version=2026-08-26.dahlia
- https://docs.stripe.com/api/confirmation_tokens/object?api-version=2026-08-26.dahlia#confirmation_token_object-metadata
Check the installed version and the source before using it. Entry JSON