Confirm a payment intent
Attempts the charge using exactly one of payment_method or
payment_token. With automatic capture a success moves the intent to
succeeded; with manual capture it moves to requires_capture. A
decline returns 402 with the intent embedded. Send an Idempotency-Key
header so a retry never charges twice.
Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.
255Path Parameters
The payment intent id (pi_…).
Body
Confirm with exactly one of payment_method or payment_token.
A saved payment method id (pm_…).
A single-use payment token created by the client-side card form.
Mandate id authorizing a merchant-initiated charge.
Required when confirming with a publishable key.
merchant requires a secret key.
customer, merchant Only valid with payment_token. The details are attached to the single-use payment method created from the token, and the address feeds AVS on the authorization. Rejected when payment_method is used.
Save the card as this charge runs, creating a reusable payment method for the intent's customer. Only takes effect with payment_token and a customer on the intent; ignored otherwise. Consent details are recorded from customer_acceptance.
How consent to store the card was captured. Only read when save_card is true. Omitted or online records the request IP and user agent; send offline for MOTO keyed entry when the buyer is not using this browser.
Response
The confirmed payment intent.
The payment intent id (pi_…).
Always payment_intent.
payment_intent The owning merchant (mer_…).
Whether this intent was created with a live (true) or test (false) key.
Returned when the intent is created or confirmed; null on capture, cancel, and list responses.
The attached customer (cus_…). Null unless a customer was passed at creation.
The amount to collect, in minor units. Always positive.
Three-letter ISO currency code. USD, EUR, and GBP are supported.
automatic captures the charge on confirmation. manual authorizes a hold; capture it later via POST /payment_intents/{id}/capture.
automatic, manual One of requires_payment_method (collect or attach a payment method), requires_confirmation (ready to confirm), processing (payment is in progress), requires_action (the buyer must complete another step), requires_capture (authorized and awaiting manual capture), succeeded (payment completed), or canceled (payment can no longer be completed).
requires_payment_method, requires_confirmation, requires_action, requires_capture, processing, succeeded, canceled The attached payment method (pm_…). Nullable; cleared on a decline so a retry can attach a different method.
The most recent charge produced by this intent (ch_…).
A string key-value map for storing your own structured data. Up to 50 keys; each key at most 40 characters and each value at most 500 characters.
Unix epoch seconds.
Unix epoch seconds, bumped on every mutation.
Browser-safe card-fields configuration returned with client_secret on publishable-key requests. Null when card collection is not available.
Your order number or other reference. Max 256 characters.
Only present when save_card was requested: the id of the reusable payment method saved for the intent's customer, or null when the save was skipped (no customer) or failed. The charge outcome is independent of this field.

