Skip to main content
A PaymentIntent tracks one payment from creation through completion. Create it with an amount and currency, then confirm it with a payment method. Your application defines how a payment relates to its purchases or orders. A confirmation that reaches payment processing creates a Charge. If a card is declined, confirm the same PaymentIntent again with a different payment method instead of creating a new one.

Attributes

string
The payment intent id (pi_…).
integer
The amount to collect, in minor units. Always positive.
string
Three-letter ISO currency code. USD, EUR, and GBP are supported.
string
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).
string
automatic captures the charge on confirmation. manual authorizes a hold; capture it later via POST /payment_intents/{id}/capture.
string | null
The attached customer (cus_…). Null unless a customer was passed at creation.
string | null
The attached payment method (pm_…). Nullable; cleared on a decline so a retry can attach a different method.
string | null
The most recent charge produced by this intent (ch_…).
string | null
Returned when the intent is created or confirmed; null on capture, cancel, and list responses.
object
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.
See every field in the response of Retrieve a payment intent.

Endpoints

Returned objects

  • A PaymentIntent (pi_…) contains the amount, currency, and overall payment status.
  • A Charge (ch_…) represents one confirmation attempt. It includes the outcome, authorization details, decline details, and settlement status.
  • A Refund (rf_…) represents money returned from a completed Charge.
A secret-key retrieval includes Charge history. A publishable-key retrieval requires the client_secret and returns only the browser-safe data needed to continue checkout.

Browser card collection

Ionic Blocks collects a new card on your page. Your backend creates the PaymentIntent and returns its client_secret with your publishable key; the page mounts a Payment Block and calls confirmPayment from your Pay button. Keep the client secret out of URLs and logs. For Connect, create the intent with the receiving merchant in Ionic-Account and select the same merchant with the browser’s account option. See Accept payments for connected accounts. To offer optional saving, create the intent with a customer and setup_future_usage: "off_session"; the customer chooses whether to save the card. To save a card without charging, use a SetupIntent.

Statuses

Retry and fulfillment rules

  • Send an Idempotency-Key on create, confirm, capture, and cancel requests so retries do not duplicate an operation.
  • A 402 decline embeds the current PaymentIntent; inspect its status before deciding whether to collect another payment method.
  • If you cancel while the status is processing, the status can remain processing until the current attempt finishes. Wait for a webhook or retrieve the PaymentIntent again before retrying.
  • Fulfill an order only after the API response or a verified webhook reports a successful payment. A browser redirect alone is not confirmation.