Simulate Card Authorization

Use the /simulateCardAuth endpoint to simulate a card authorization in non-production environments. This endpoint creates but does not settle a card authorization for the account.


📘 Note: This endpoint is only available in non-production environments (local, development, sandbox, cv). Calls to this endpoint in production will return an error.


Requirements:

  • The account must be active
  • For debit accounts, sufficient balance is required
  • Card blocks must be set to 'none' on the account

Result:

When successfully called, this endpoint returns an authId that can be used with Simulate Card Settle to complete the transaction.

Choosing the simulation path (useAttachedCardNetwork):

Some accounts have a card network attached on top of a different primary system of record — for example, a line of credit with an attached card. For those accounts there are two distinct paths that can produce a transaction, and this flag controls which one the simulation exercises:

  • Card network path — the simulation is run against the attached card network. This mirrors what happens in production when a real card swipe is authorized by the network and then forwarded to the primary system.
  • Primary path — the simulation is run directly against the account's system of record (e.g., the loan management system for a line of credit), bypassing the card network. Useful for testing the system-of-record's behavior in isolation.

Behavior by value:

  • Omitted (default) — runs on the attached card network when one is present on the account; otherwise runs on the account's system of record. For standard card accounts (where the card network is also the system of record), this is always the card network.
  • true — forces the attached card network path. Returns a 400 ATTACHED_CARD_NETWORK_NOT_FOUND error if the account has no attached card network.
  • false — forces the account's primary path, even if a card network is attached. For a line-of-credit account this routes the simulation to the loan management system.

For standard card accounts (no separate system of record), all three values resolve to the same simulation.

Body Params

POST /v1/transaction/simulateCardAuth Request body

string
required

Pass in the Spidr account ID

double
required
≤ 10000000

The amount of the simulated authorization

string

The description of the simulated transaction

string
^\d{4}$

The MCC code of the merchant for the simulated transaction

string
length between 1 and 100

The name of the merchant for the simulated transaction

string

The type of simulated card transaction metadata to use

boolean

Controls which path the simulation runs on for accounts that have a card network attached on top of a different system of record (e.g., a line-of-credit account with an attached card). Omit to default to the attached card network when present, otherwise the account's system of record. Set true to force the attached card network — returns a 400 ATTACHED_CARD_NETWORK_NOT_FOUND error if the account has none. Set false to force the account's primary path (e.g., the loan-management-system simulation) even when a card network is attached. For standard card accounts, all three values resolve to the card network. See the endpoint description for full details.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json