Simulate a transaction (sandbox only)

Works in the sandbox only (https://api.sandbox.astrada.co). Production has no such call.

Starts a new simulated transaction on an enrolled card by publishing one transaction message, an authorization or a settlement, as if a card network had sent it. Follow it with POST /simulate/transactions/{transactionId} to add further messages to the transaction.

Besides simulation:write, the access token needs cards:read: the card is read from the public API to resolve its subaccount and network.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Starts a new simulated transaction on an enrolled sandbox card by publishing a single transaction message. Every field other than cardId and type is optional and falls back to a default.

uuid
required

The identifier of the enrolled card to transact against. The card must belong to the account of the access token; the subaccount and, unless network is given, the network are read from the card.

string
enum
required

The first message of the new transaction.

  • authorization: publishes an authorization request, creating a PENDING transaction with amount on hold.
  • settlement: publishes a clearing with no prior authorization, creating a SETTLED transaction with amount settled and nothing on hold. A later authorization step on the transaction joins it.
Allowed:
integer
≥ 1

Transaction amount in minor units of currency (for example 4500 for 45.00 USD). Defaults to 4500.

string
length between 3 and 3

ISO 4217 three-letter currency code of the transaction, case insensitive. Must be a currency transactions can be made in; fund codes and precious metals are rejected with 400. Defaults to USD.

string
enum

Card network the message is published on. Defaults to the card's own network; the request is rejected with 400 when this field is omitted and the card has no network or one outside this list.

Allowed:
merchant
object

The merchant (card acceptor) on the message. Defaults to a fixed sandbox coffee-shop merchant in the United States.

date-time

Timestamp of the message, ISO 8601 with a timezone offset. Must not be in the future. Defaults to the time of the request.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

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