Payment Intents
A Payment Intent tracks the lifecycle of a single payment attempt — created when the customer starts checkout, transitioning through processing, and ending in succeeded, canceled, or back in requires_payment_method after a decline.
Create one directly via POST /v1/payment-intents for direct API integrations, off-session charging (MIT), or save-card-during-purchase. Or let Checkout Sessions create one for hosted-checkout flows.
- Create a Payment IntentPOST
/v1/payment-intents - Retrieve a Payment IntentGET
/v1/payment-intents/:id - List Payment IntentsGET
/v1/payment-intents - Update a Payment IntentPATCH
/v1/payment-intents/:id - Capture a Payment IntentPOST
/v1/payment-intents/:id/capture - Cancel a Payment IntentPOST
/v1/payment-intents/:id/cancel - Refund a Payment IntentPOST
/v1/payment-intents/:id/refund
The Payment Intent object
idstring- Unique identifier, prefixed
pi_. objectstring- Always
"payment_intent". client_secretstring- Secret used by Pay-UI to authenticate the hosted checkout client. The embedded form takes a Checkout Session ID in
CxPay.embed({ session: sessionId }), not this secret. urlstring|null- Hosted checkout URL. Redirect the customer here. Null for a saved-card charge: there is no hosted page for it.
statusenum- One of:
requires_payment_method,requires_confirmation,requires_action,processing,uncertain,requires_capture,succeeded,canceled,expired,requires_review. amountinteger- Amount in the smallest currency unit.
currencystring- ISO 4217 currency code.
return_urlstring|null- Where the customer is redirected after 3DS or hosted checkout.
cancel_urlstring|null- Where Pay-UI redirects on customer cancel.
customerstring|null- ID of the attached customer, if set.
payment_methodstring|null- ID of the saved PaymentMethod on success (when
setup_future_usagewas set). off_sessionboolean- True for a saved-card charge made with the customer absent.
setup_future_usageenum|null"off_session","on_session", or null.descriptionstring|null- Free-form, shown on receipts.
metadataobject- Arbitrary key-value pairs.
capture_methodenumautomaticcaptures on authorization;manualholds the funds until you capture.latest_chargestring|null- ID of the most recent Charge on this PI. Retrieve it for the captured and refunded totals.
last_payment_errorobject|null- Most recent decline:
{ type, code, message, decline_code?, advice_code?, retryable }.retryableis false for a decline a retry cannot fix.advice_codeistry_again_later,do_not_try_againorconfirm_card_data, when the card's bank or network says. Null when no decline has occurred. next_actionnull- Always null. A step the payer has to complete, such as 3-D Secure, is handled by the hosted page at
url. cancellation_reasonstring|null- Set when the PI is canceled.
attempt_countinteger- Failed confirm attempts on this PI (anti-card-testing).
locked_atstring|null- ISO-8601 when anti-fraud controls locked this PI, or null.
blocked_reasonenum|null- Why the PI was locked:
attempt_cap,min_amount,velocity,bin_enumeration, or null. livemodeboolean- Test or live mode.
expires_atstring|null- ISO-8601 when the PI expires. Null for a saved-card charge, which never expires.
created_atstring- ISO-8601 timestamp.
1{2 "id": "pi_01JQX...",3 "object": "payment_intent",4 "client_secret": "pi_01JQX..._secret_abc123",5 "url": "https://pay.cxpay.net/pay?client_secret=pi_01JQX..._secret_abc123",6 "status": "succeeded",7 "amount": 5000,8 "currency": "USD",9 "return_url": "https://merchant.com/return",10 "cancel_url": null,11 "customer": "cus_01JQX...",12 "payment_method": "pm_01JQX...",13 "off_session": false,14 "setup_future_usage": null,15 "description": null,16 "metadata": { "order_id": "ORD-123" },17 "capture_method": "automatic",18 "latest_charge": "ch_01JQX...",19 "last_payment_error": null,20 "next_action": null,21 "cancellation_reason": null,22 "attempt_count": 0,23 "locked_at": null,24 "blocked_reason": null,25 "livemode": false,26 "expires_at": "2026-04-07T19:00:00.000Z",27 "created_at": "2026-04-07T18:30:00.000Z"28}
- succeeded
- Money capturedDone. Fulfill the order.
- processing
- Payment in flightSubmitted to the network, waiting for its result. There is no fixed time limit: it does not expire and cannot be canceled. Wait for the webhook or retrieve the PaymentIntent. With no result after about 24 hours, it moves to uncertain.
- requires_payment_method
- Awaiting cardCustomer hasn't completed checkout yet, or a decline reset the PI.
- requires_confirmation
- Awaiting confirmCard collected but not yet confirmed (rare in hosted flows).
- requires_action
- 3DS challengeCustomer is completing 3DS on our hosted page.
- uncertain
- UncertainThe result is not known yet. No webhook is sent for this status, so retrieve the PaymentIntent. Do not charge again. If it resolves, you get payment_intent.succeeded or payment_intent.payment_failed.
- requires_capture
- Auth heldManual capture flow. Capture when ready.
- requires_review
- Needs reviewAutomated recovery ran out and the result is still unknown. No webhook is sent and the status does not change on its own. Keep the order pending and contact support.
- canceled
- CanceledPayment was canceled.
- expired
- Session expiredCreate a new session if the customer wants to retry.
Was this section helpful?
Create a Payment Intent
/v1/payment-intentsCreates a Payment Intent directly. The fields below apply to both the direct call and the one a Checkout Session creates on your behalf.
Request body
amountintegerRequired- Amount in the smallest currency unit, at most 99999999.
currencystringRequired- ISO 4217 currency code.
customerstringcus_...— optional. Attach a customer for save-card flows. Required for an off-session charge.payment_methodstringpm_...: a saved card, which must belong tocustomer. Only withconfirm: true; otherwise the request is refused with400.off_sessionbooleantrue→ MIT mode; the cardholder is not present and cannot authenticate. Only withconfirm: true; otherwise the request is refused with400.setup_future_usageenum"off_session"|"on_session": save the card the customer pays with."on_session"saves it with no Mandate, so it cannot be charged off-session. Cannot be combined withconfirm: true.confirmbooleantruecharges a saved card immediately, with the customer absent. Requirescustomer,payment_methodandoff_session: true. The charge runs once perIdempotency-Key: the same key returns the same PaymentIntent and never charges twice, however long ago the first request was. A saved-card PaymentIntent has nourland never expires.capture_methodenum"automatic"|"manual"— default automatic.return_urlstring- For 3DS challenge redirect / hosted checkout return.
cancel_urlstring- Where Pay-UI redirects on customer cancel.
payment_method_optionsobject- { card: { stored_credential_usage } }:
stored_credential_usageenum:recurring(a fixed schedule),installment(one of a set number of payments for one purchase) orunscheduled(no schedule, the default). Only withconfirm: true. expires_ininteger- Seconds until the PaymentIntent expires, 60 to 86400, default 1800. Refused with
confirm: true. descriptionstring- Free-form, up to 1000 characters.
metadataobject- Arbitrary key-value pairs.
Response
Returns the PaymentIntent object (see The Payment Intent object). A saved-card charge answers 200 with succeeded (or requires_capture for manual capture), 200 with processing when the outcome is not yet known, or 402 when the card refused.
Modes
Three common shapes:
- Hosted checkout (default) — minimal body, redirect the customer to
response.url. - Save card during purchase (CIT + auto-vault) — set
customer + setup_future_usage: "off_session". - Off-session MIT — set
customer + payment_method + off_session: true + confirm: true, with anIdempotency-Keythat names the charge. See Off-session payments for the outcomes and retry rules.
Errors
400invalid_request- Missing/invalid amount, currency, customer, etc.
400UNSUPPORTED_CURRENCY_PRECISION- The currency does not use 2 decimals. 0- and 3-decimal currencies, such as JPY, KWD, IQD and LYD, are refused when a Checkout Session or PaymentIntent is created, when a payment starts and when it is confirmed.
400CURRENCY_NOT_SUPPORTED- Create does not check whether the currency is enabled. Starting or confirming the payment returns this code if it is not.
400AMOUNT_BELOW_MINIMUM- Amount is below the minimum (anti-card-testing). An
amountof 0 (zero-auth verification) is exempt. 400VALIDATION_FAILED- A half-specified saved-card charge:
off_session,payment_methodorstored_credential_usagewithoutconfirm: true,confirm: truewithoutoff_session: true,customerorpayment_method, orconfirm: truewithsetup_future_usageorexpires_in. Nothing was charged. 200 (declined, hosted)last_payment_error set- A decline on a hosted payment returns HTTP 200 with the PI in
requires_payment_methodstatus.last_payment_errorcarries thecode,retryableand, when the bank advises,advice_code. 402saved-card charge refused- The card refused a saved-card charge, or it failed for a definite reason.
error.codeequalslast_payment_error.code, and the PaymentIntent is aterror.meta.payment_intent. See Off-session payments. 403OFF_SESSION_NOT_ALLOWED- Charging saved cards is not switched on for your account. Contact support.
409IDEMPOTENCY_KEY_CONFLICT- This key already names a charge with a different amount, currency, customer, card,
stored_credential_usageor explicitcapture_method. Nothing was charged by this request. 409MANDATE_INACTIVE- Off-session attempt against revoked/inactive mandate.
409MANDATE_REQUIRED- Off-session attempt with no mandate present, or one that another customer gave.
409PAYMENT_METHOD_DETACHED- The card was detached. Detach is permanent: the customer saves the card again.
422MISSING_BILLING_DETAILS- The saved card has no full billing details, which the charge needs and cannot supply. The customer saves the card again.
1curl -X POST https://api.cxpay.net/v1/payment-intents \2 -H "X-Key-Id: ak_test_..." \3 -H "Content-Type: application/json" \4 -H "Idempotency-Key: 550e8400-..." \5 -H "X-Signature: <base64-hmac>" \6 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \7 -H "X-Nonce: 550e8400-..." \8 -H "X-Body-Hash: <sha256-of-body>" \9 -d '{10 "amount": 4900,11 "currency": "USD",12 "return_url": "https://merchant.com/return"13 }'
1curl -X POST https://api.cxpay.net/v1/payment-intents \2 -H "X-Key-Id: ak_test_..." \3 -H "Content-Type: application/json" \4 -H "Idempotency-Key: 550e8400-..." \5 -H "X-Signature: <base64-hmac>" \6 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \7 -H "X-Nonce: 550e8400-..." \8 -H "X-Body-Hash: <sha256-of-body>" \9 -d '{10 "amount": 4900,11 "currency": "USD",12 "customer": "cus_01JQX...",13 "setup_future_usage": "off_session",14 "return_url": "https://merchant.com/return"15 }'
1curl -X POST https://api.cxpay.net/v1/payment-intents \2 -H "X-Key-Id: ak_test_..." \3 -H "Content-Type: application/json" \4 -H "Idempotency-Key: renewal-2026-11-sub_8841" \5 -H "X-Signature: <base64-hmac>" \6 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \7 -H "X-Nonce: 550e8400-..." \8 -H "X-Body-Hash: <sha256-of-body>" \9 -d '{10 "amount": 4900,11 "currency": "USD",12 "customer": "cus_01JQX...",13 "payment_method": "pm_01JQX...",14 "off_session": true,15 "confirm": true,16 "payment_method_options": { "card": { "stored_credential_usage": "recurring" } }17 }'
1{2 "id": "pi_01JQX...",3 "object": "payment_intent",4 "client_secret": "pi_01JQX..._secret_abc123",5 "url": "https://pay.cxpay.net/pay?client_secret=pi_01JQX..._secret_abc123",6 "status": "requires_payment_method",7 "amount": 4900,8 "currency": "USD",9 "return_url": "https://merchant.com/return",10 "cancel_url": null,11 "customer": null,12 "payment_method": null,13 "off_session": false,14 "setup_future_usage": null,15 "description": null,16 "metadata": {},17 "latest_charge": null,18 "last_payment_error": null,19 "next_action": null,20 "cancellation_reason": null,21 "attempt_count": 0,22 "locked_at": null,23 "blocked_reason": null,24 "livemode": true,25 "expires_at": "2026-04-07T19:00:00.000Z",26 "created_at": "2026-04-07T18:30:00.000Z"27}
1{2 "error": {3 "code": "insufficient_funds",4 "message": "The card has insufficient funds.",5 "meta": {6 "advice_code": "try_again_later",7 "payment_intent": {8 "id": "pi_01JQX...",9 "status": "requires_payment_method",10 "url": null,11 "latest_charge": "ch_01JQX...",12 "last_payment_error": {13 "type": "card_error",14 "code": "insufficient_funds",15 "message": "The card has insufficient funds.",16 "advice_code": "try_again_later",17 "retryable": true18 }19 }20 }21 }22}
Was this section helpful?
Retrieve a Payment Intent
/v1/payment-intents/:idReturns a Payment Intent by id. Use this when your webhook hasn't arrived after 5 minutes, or when you want to verify status server-side before fulfilling.
Path parameters
idstringRequired- The Payment Intent id, prefixed
pi_. You receive this from the Checkout Session response.
Errors
401unauthorized- Bad signature, expired timestamp, or unknown key.
404not_found- Payment Intent doesn't exist or belongs to a different account.
429rate_limited- Too many requests.
1curl https://api.cxpay.net/v1/payment-intents/pi_01JQX... \2 -H "X-Key-Id: ak_test_..." \3 -H "X-Signature: <base64-hmac>" \4 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \5 -H "X-Nonce: 550e8400-..." \6 -H "X-Body-Hash: <sha256-of-empty>"
1{2 "id": "pi_01JQX...",3 "object": "payment_intent",4 "client_secret": "pi_01JQX..._secret_abc123",5 "url": "https://pay.cxpay.net/pay?client_secret=pi_01JQX..._secret_abc123",6 "status": "succeeded",7 "amount": 5000,8 "currency": "USD",9 "return_url": "https://merchant.com/return",10 "cancel_url": null,11 "customer": "cus_01JQX...",12 "payment_method": "pm_01JQX...",13 "off_session": false,14 "setup_future_usage": null,15 "description": null,16 "metadata": { "order_id": "ORD-123" },17 "capture_method": "automatic",18 "latest_charge": "ch_01JQX...",19 "last_payment_error": null,20 "next_action": null,21 "cancellation_reason": null,22 "attempt_count": 0,23 "locked_at": null,24 "blocked_reason": null,25 "livemode": false,26 "expires_at": "2026-04-07T19:00:00.000Z",27 "created_at": "2026-04-07T18:30:00.000Z"28}
Was this section helpful?
List Payment Intents
/v1/payment-intentsReturns a list of Payment Intents, newest first. Use this to render a customer's payment history, or to reconcile your own ledger after a webhook outage.
Query parameters
customerstring- Restrict the list to one customer. Recommended whenever you're rendering a per-customer view — un-filtered lists span the entire account.
statusenum- One of the PaymentIntent statuses. Useful for "show only
processing" reconciliation views. limitinteger- 1–100, default 10.
cursorstring- Pagination cursor.
1curl "https://api.cxpay.net/v1/payment-intents?customer=cus_01JQX...&limit=20" \2 -H "X-Key-Id: ak_test_..." \3 -H "X-Signature: <base64-hmac>" \4 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \5 -H "X-Nonce: 550e8400-..." \6 -H "X-Body-Hash: <sha256-of-empty>"
Was this section helpful?
Update a Payment Intent
/v1/payment-intents/:idMutates fields on an in-flight PaymentIntent. The most common use is back-filling customer when you collected the email after creating the session — once attached, the resulting saved card lands on the right Customer.
Allowed states
PATCH is only valid while the PI is in requires_payment_method or requires_confirmation. Mutations on terminal states return 400 INVALID_PAYMENT_STATE.
Body parameters
customerstring- Attach a customer. Must be an existing customer id, or the request returns
404. Once set, it cannot be changed to a different customer (returns409 CUSTOMER_ALREADY_ATTACHED); re-sending the same id is a no-op. metadataobject- Replace the metadata map. Arbitrary key-value pairs.
descriptionstring- Free-form, max 1000 chars.
1curl -X PATCH https://api.cxpay.net/v1/payment-intents/pi_01JQX... \2 -H "X-Key-Id: ak_test_..." \3 -H "Content-Type: application/json" \4 -H "Idempotency-Key: 550e8400-..." \5 -H "X-Signature: <base64-hmac>" \6 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \7 -H "X-Nonce: 550e8400-..." \8 -H "X-Body-Hash: <sha256-of-body>" \9 -d '{ "customer": "cus_01JQX..." }'
Was this section helpful?
Capture a Payment Intent
/v1/payment-intents/:id/captureCaptures a manual-capture PaymentIntent in requires_capture (its charge is authorized but uncaptured). Use capture_method: "manual" on create to authorize now and capture later.
Repeating this request with the same Idempotency-Key while the first is still running returns 202 with {"status":"processing"}. The first capture has not finished. This is not a PaymentIntent status: a capture does not move the PaymentIntent to processing. Wait, then retrieve the PaymentIntent or retry with the same key. See Idempotency.
Body parameters
amount_to_captureinteger- Amount to capture, in the smallest currency unit. Must be ≤ the authorized amount; the remainder is released. Defaults to the full authorized amount.
Errors
409 INVALID_PAYMENT_INTENT_STATE- The PI has no authorized charge to capture, or the network rejected the capture.
1curl -X POST https://api.cxpay.net/v1/payment-intents/pi_01JQX.../capture \2 -H "X-Key-Id: ak_test_..." \3 -H "Content-Type: application/json" \4 -H "Idempotency-Key: 550e8400-..." \5 -H "X-Signature: <base64-hmac>" \6 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \7 -H "X-Nonce: 550e8400-..." \8 -H "X-Body-Hash: <sha256-of-body>" \9 -d '{ "amount_to_capture": 5000 }'
Was this section helpful?
Cancel a Payment Intent
/v1/payment-intents/:id/cancelCancels a PaymentIntent by voiding its authorized (uncaptured) charge. An optional cancellation_reason may be supplied.
A PaymentIntent created by a Checkout Session or payment link can be canceled here once it is requires_capture: the authorization is voided, the PaymentIntent becomes canceled, and the Checkout Session is not changed. In any other state this endpoint returns 400 OWNED_PAYMENT_INTENT; while the Checkout Session is still open, cancel the session instead.
Body parameters
cancellation_reasonstring- An optional reason for the cancellation. Defaults to
requested_by_merchantwhen omitted or blank.
Errors
400 OWNED_PAYMENT_INTENT- The PI belongs to a Checkout Session or payment link and is not
requires_capture. 409 INVALID_PAYMENT_INTENT_STATE- The PI has no authorized charge to void, or the void was not confirmed.
503 CHECKOUT_SESSION_COMPLETION_PENDING- The PI's Checkout Session has not recorded its completion yet. Retry shortly.
1curl -X POST https://api.cxpay.net/v1/payment-intents/pi_01JQX.../cancel \2 -H "X-Key-Id: ak_test_..." \3 -H "Content-Type: application/json" \4 -H "Idempotency-Key: 550e8400-..." \5 -H "X-Signature: <base64-hmac>" \6 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \7 -H "X-Nonce: 550e8400-..." \8 -H "X-Body-Hash: <sha256-of-body>" \9 -d '{ "cancellation_reason": "requested_by_merchant" }'
Was this section helpful?
Refund a Payment Intent
/v1/payment-intents/:id/refundRefunds the captured charge on a PaymentIntent — the full amount, or a partial amount. The charge is derived from the PI's latest charge. Returns the created Refund.
To read the refunded total, retrieve latest_charge with GET /v1/charges/:id and read amount_refunded.
Body parameters
amountinteger- Amount to refund in the smallest currency unit. Must be ≤ the remaining refundable amount. Defaults to the full captured amount.
reasonenumduplicate,fraudulent, orrequested_by_customer.
Errors
409 INVALID_PAYMENT_INTENT_STATE- The refund did not succeed. The PI may have no captured charge to refund or be fully refunded already, the card's bank may have declined the refund (we send
refund.failed), or the outcome may be uncertain (we sendrefund.createdwithstatus: "pending"). An uncertain refund can still complete, so don't retry with a new idempotency key. Contact support with the PaymentIntent id.
Refunds run synchronously. The response is the source of truth, and refund.created carries the same status, normally succeeded. A pending refund sends refund.updated when it later succeeds, or refund.failed if it fails.
1curl -X POST https://api.cxpay.net/v1/payment-intents/pi_01JQX.../refund \2 -H "X-Key-Id: ak_test_..." \3 -H "Content-Type: application/json" \4 -H "Idempotency-Key: 550e8400-..." \5 -H "X-Signature: <base64-hmac>" \6 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \7 -H "X-Nonce: 550e8400-..." \8 -H "X-Body-Hash: <sha256-of-body>" \9 -d '{ "amount": 5000, "reason": "requested_by_customer" }'
1{2 "id": "ref_01JQX...",3 "object": "refund",4 "payment_intent": "pi_01JQX...",5 "charge": "ch_01JQX...",6 "amount": 5000,7 "currency": "USD",8 "status": "succeeded",9 "reason": "requested_by_customer",10 "created_at": "2026-04-07T18:35:00.000Z"11}
Was this section helpful?
Off-session charges (MIT)Beta
To charge a saved card without the customer present, create a PaymentIntent with customer and payment_method set, off_session: true, and confirm: true. We replay the PM's latest_network_transaction_id and the active Mandate as stored-credential evidence.
Required combination
customer— the customer that owns the saved PMpayment_method— a PM inactivestatus, saved for off-session useoff_session: true— flags the charge as merchant-initiatedconfirm: true: charge in the same call- An
Idempotency-Keyheader. One key is one charge, with no expiry.
Optional payment_method_options.card.stored_credential_usage is recurring, installment or unscheduled (the default). You never send a network transaction id, a Mandate id or a reason code.
Outcomes
200,succeeded: money captured. Withcapture_method: "manual"the status isrequires_capture.402: the card refused the charge, or it failed for a definite reason. The PaymentIntent is aterror.meta.payment_intent, back inrequires_payment_methodwithlast_payment_errorset.error.codeis the same value aslast_payment_error.code, anderror.meta.advice_codeis present when the card's bank advised what to do next. Decide fromretryableandadvice_code(try_again_later,do_not_try_again,confirm_card_data).200,processing: the outcome is not yet known. Retry with the sameIdempotency-Key. Never use a new one: the first request may have charged the card.- Another
4xx: the request was refused before anything was charged. No PaymentIntent exists, and the same key can be used again.
An off-session charge never returns requires_action. When the card's bank wants the cardholder to authenticate, the charge fails with authentication_required, and the customer has to pay again while present, through a new PaymentIntent or Checkout Session. There is no link to send the customer, and next_action is always null.
The same key after a 402 answers the same 402 with no new attempt on the card. See Charging saved cards for the retry rules and the stranded-charge answers (409 EFFECT_IN_PROGRESS, 409 PAYMENT_OUTCOME_UNKNOWN).
1curl -X POST https://api.cxpay.net/v1/payment-intents \2 -H "X-Key-Id: ak_test_..." \3 -H "Content-Type: application/json" \4 -H "Idempotency-Key: renewal-2026-11-sub_8841" \5 -H "X-Signature: <base64-hmac>" \6 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \7 -H "X-Nonce: 550e8400-..." \8 -H "X-Body-Hash: <sha256-of-body>" \9 -d '{10 "amount": 4900,11 "currency": "USD",12 "customer": "cus_01JQX...",13 "payment_method": "pm_01JQX...",14 "off_session": true,15 "confirm": true,16 "payment_method_options": { "card": { "stored_credential_usage": "recurring" } }17 }'
Was this section helpful?
Mandate + setup_future_usageBeta
Set setup_future_usage on the PI body to vault the card alongside the charge — one round trip instead of a separate SetupIntent. On success the PI carries a non-null payment_method and an associated Mandate recording the customer's consent.
Allowed values
off_session— the customer is consenting to future unattended charges. Multi-use mandate.on_session: the card is saved with no Mandate, so it cannot be charged withoff_session: true.- Omit (or null) for a one-shot charge that does not save the card.
The resulting mandate
On success, a Mandate is created and linked to the saved payment_method. The mandate id is not echoed on the PaymentIntent response — retrieve it via the Mandates API or from the mandate.created webhook event.
payment_method_options.card.stored_credential_usage
On a saved-card charge, set payment_method_options.card.stored_credential_usage to say what kind of agreement the charge runs under: recurring, installment or unscheduled. Omitted, it is unscheduled. The old payment_method_options.card.mit block is refused with 400.
1{2 "amount": 4900,3 "currency": "USD",4 "customer": "cus_01JQX...",5 "setup_future_usage": "off_session"6}
1{2 "amount": 4900,3 "currency": "USD",4 "customer": "cus_01JQX...",5 "payment_method": "pm_01JQX...",6 "off_session": true,7 "confirm": true,8 "payment_method_options": {9 "card": { "stored_credential_usage": "recurring" }10 }11}
Was this section helpful?
- Need help? Contact Support.
- Check out our changelog.
- Questions? Contact Sales.
- LLM? Read llms.txt.
Powered by CX Pay