Simulate a card transaction
Available only where livemode is false (a Sandbox platform, or any platform outside production), on card programs with a test issuer connection. Requires simulations:write. A live platform in production and live credentials are refused. The card and any source transaction must belong to the selected account holder.
Supports AUTHORIZATION, INCREMENTAL_AUTHORIZATION, CAPTURE, FORCE_CAPTURE, REVERSAL and REFUND on test card programs. INCREMENTAL_AUTHORIZATION, CAPTURE and REVERSAL name an authorization transaction; REFUND names a captured purchase. AUTHORIZATION and FORCE_CAPTURE name only the card. FORCE_CAPTURE posts a purchase with no prior authorization. An incremental authorization’s amount is the increase. Amount is positive and in minor currency units, in the source transaction’s currency. The issuer applies its own limits to follow-up amounts, such as how much of an authorization a capture or reversal may take, and refuses what it does not allow with PROVIDER_REJECTED. To exercise a decline, freeze the card with the ordinary card API, then simulate AUTHORIZATION; the issuer decides the outcome. There is no forced approval or decline override. To simulate a dispute’s outcome, see POST /simulations/disputes/{disputeId}/submit.
A 200 means the issuer accepted the simulation, not that its transactions are recorded yet. The issuer reports the simulated activity as it reports real card activity, which creates or updates transactions, journal entries where enabled, and transaction events. Subscribe to transaction events and read GET /transactions for transaction IDs before the next step. The simulation ID identifies this request, not a transaction. On some card programs a simulated refund is a new transaction that need not link to the purchase.
Reuse the Idempotency-Key for retries. An uncertain result returns OPERATION_OUTCOME_UNKNOWN; do not switch to a new key. Recovery confirms the outcome with the issuer and never runs the simulation twice; on some card programs an outcome still unknown after 20 hours is held for investigation. No simulation webhook is synthesized.
Authentication
Access token from POST /access-token. Valid for at most 30 minutes.
Headers
The account holder a platform API key acts on. Platform keys must send it on account holder operations. A company API key acts on its own account holder; it may omit the header or send its own account holder ID.
Your unique key for this operation: 1 to 255 visible ASCII characters, ideally a new UUID v4 for each operation. A value in double quotes is accepted and the quotes are removed. Retrying with the same key and the same request returns the first response with Idempotent-Replayed: true; the same key with a different request is refused with IDEMPOTENCY_KEY_REUSED. A key can be used again 30 days after its operation completes.
Your own correlation ID for this request. It is recorded with the request. The X-Request-Id response header is always generated by the server.
Request
A resource ID. Treat it as an opaque, case-sensitive string.
AUTHORIZATION and FORCE_CAPTURE take no transactionId. INCREMENTAL_AUTHORIZATION, CAPTURE and REVERSAL take an authorization’s transactionId; REFUND takes a captured purchase’s.
Positive integer in minor currency units. For INCREMENTAL_AUTHORIZATION, the increase. The issuer applies its own limits to follow-up amounts.
A transaction ID from the normal transaction API. Required except for AUTHORIZATION and FORCE_CAPTURE.
Response headers
Remaining budget for each rate limit policy, for example "burst"; r=57; t=6 (requests remaining and seconds until the window resets).
The rate limit policies applied to this request, for example "burst"; q=60; w=10 (requests allowed per window of seconds).
Sent as true when this response repeats the first response to the same Idempotency-Key. A replay keeps the first response’s status and body, including the requestId of a problem; X-Request-Id is new.
Response
The issuer accepted the simulation; its transactions arrive asynchronously.
A resource ID. Treat it as an opaque, case-sensitive string.
Always cardTransactionSimulation.
Always false. Simulations run only on a Sandbox platform or outside production.
A resource ID. Treat it as an opaque, case-sensitive string.
A resource ID. Treat it as an opaque, case-sensitive string.
AUTHORIZATION and FORCE_CAPTURE take no transactionId. INCREMENTAL_AUTHORIZATION, CAPTURE and REVERSAL take an authorization’s transactionId; REFUND takes a captured purchase’s.
Always SUBMITTED. The result arrives as a transaction and its events.