Skip to main content
A ConfirmationToken is a temporary reference to a card collected with Blocks. It lets you read the card’s details and finish pricing the order before payment. When the customer accepts the final total, create a PaymentIntent for that amount and confirm it using the token’s ct_... ID. The token supplies the card; the PaymentIntent supplies the amount. Creating or retrieving a token does not charge the card. Ionic generates the ct_... ID; it is not the underlying card token or an API authentication key. Create it with ionic.createConfirmationToken({ blocks, billingDetails }), which returns { confirmationToken?, error? }. Read it on your server with Retrieve a confirmation token. There is no public create, list, or delete endpoint. See the guide for the complete checkout example. The example values are illustrative. Your platform needs access enabled for the selected test/live mode, and calls must use the same connected merchant.

Attributes

string
The ct_... ID to send as confirmation_token when confirming a PaymentIntent. The ID does not contain readable card details.
string
Always confirmation_token.
string
Whether the token can still start a payment. ready means unused, consumed means assigned to one attempt, invalidated means canceled by resuming card editing, and expired means it was not used in time. A consumed token does not tell you whether the payment succeeded.
boolean
false for a test token; true for a live token. The PaymentIntent must use the same mode.
string
The currency selected when creating the card-field session: usd, eur, or gbp. The PaymentIntent must use this currency.
integer
The last time this unused token can start a payment, as Unix seconds. Tokens last up to 10 minutes and cannot outlive their field session. You can still check a payment already started after this time. An unexpired token does not guarantee the card will be approved.
string | null
The pi_... ID of the PaymentIntent this token was used to confirm, or null if it has not been used. The ID remains set if the payment is pending, declines, or fails. Check the PaymentIntent’s status for the payment outcome.
object
The card summary returned to your application: type: "card" and a card object. It excludes the card number, CVC, underlying card token, BIN, and billing details.
string
The card brand, such as visa or mastercard. unknown means the brand is unavailable.
string
The final four card digits. Omitted when unavailable.
string
The card type: credit, debit, prepaid, or unknown. Unknown means the type could not be determined, not that the card was declined.
string
How Ionic obtained the card data. token_verified: checked against the tokenized card. tokenization_callback: reported by the card fields without an independent check. unavailable: no usable card data was available. Read this together with funding.
string
off_session when the buyer agreed to save the card for future payments. Omitted otherwise. To save it, confirm with a PaymentIntent that has a customer and setup_future_usage: "off_session"; the same sale saves the card and the confirmation returns saved_payment_method. Only a session created with setup_future_usage: "off_session" can ask the buyer.

Read the funding fields together

These examples describe card data, not payment approval. Unknown funding does not prevent an otherwise valid token from being used for payment. Server-side funding verification is currently limited to supported test configurations. Live tokens may contain unverified card-field data or unknown funding. The retrieve endpoint includes both a verified-credit example and an unknown-data example.

Confirm

Once your server has finalized the price and the customer has accepted it, create a PaymentIntent for that amount with capture_method: "automatic". Then send the same token ID you reviewed to POST /v1/payment_intents/{id}/confirm:
Use your platform secret key, the matching Ionic-Account, payments:write, and an Idempotency-Key that you reuse for retries. Send the token on confirmation, not on PaymentIntent creation. It supplies the card to charge; the intent supplies the amount and currency. Changing the price before payment does not require a new token if its card, billing details, account, currency, and mode are unchanged and it is still ready and unexpired. Do not include another card token, a saved payment method, new billing details, card-saving options, a mandate, or wallet fields. This flow supports one-time, customer-initiated card payments only. Ionic rejects incompatible inputs. Ionic assigns the token to one PaymentIntent and attempt before sending the charge. Its status becomes consumed even if the card later declines. Retrying with the same token recovers that attempt; a different request key does not make the token reusable. Your server must also stop two different tokens from paying the same order.

Errors and retries

Read error.code and the original payment’s status to decide what to do. Authentication, rate-limit, and idempotency errors also apply as usual. For example, confirming an unused token after its deadline returns 409:
A definitive 402 PAYMENT_DECLINED includes the current PaymentIntent and leaves the token consumed. A 402 PAYMENT_FAILED, timeout, or uncertain Charge requires checking the original payment before another attempt. HTTP status alone does not tell you whether it is safe to try another card. See editing and recovery.