Skip to main content
POST
Create simulation estimates the amounts, rates and fees of an on-ramp or off-ramp order before you create a quote. Use it, for example, to show the fees of each card or payment method before the user picks one or signs up. A simulation is only an estimate:
  • It is not stored and cannot be used to create an order. To place the order, call Create quote and pass its ID to Create order.
  • A simulation can succeed where a quote for the same order fails, since it does not check the user’s capabilities, amount limits, rail features or external account status.
  • Rates and fees can change between the simulation and the quote. Always present the quote values to the user before they confirm the order.

Origin and destination

The request accepts the node types of Create quote, plus simulated nodes that have no id. An on-ramp goes from a card or APM to a crypto destination, and an off-ramp goes from a crypto address to a card. The nodes follow these rules:
  • Card, APM and crypto nodes must use a rail enabled for your organization. For a simulated node, the rail must match its asset and its method, or its network for crypto nodes, and its card network when you send one. Otherwise, the request fails with a 404.
  • Unlike a quote, a simulation doesn’t check the rail’s features, so it also estimates a deposit or withdrawal the rail doesn’t allow.
  • An invalid node, such as a node of an external account type that isn’t allowed for that side of the order, fails with a 409 transaction_node_invalid error. As an off-ramp destination, a card External account must be a debit card, since withdrawals only go to debit cards, or it fails in the same way.
Each node is either plain or simulated. Read more about the Anatomy of a quote request and the denomination.

Plain nodes

External account and APM nodes work as in a quote:
  • An External account references an external account of the user by id: a card or APM external account for on-ramp origins, a crypto external account for on-ramp destinations, and a card external account for off-ramp destinations.
  • External accounts belong to users, so referencing one requires acting on behalf of a user. Organization-wide clients do it with the X-On-Behalf-Of header, while single-user clients already act on behalf of their user and don’t need the header.
  • An APM node without an asset also requires acting on behalf of a user, in the same way. Its asset is then the currency of the method in the user’s country. If the method isn’t available in the user’s country, no rail matches it and the response is 404.

Simulated nodes

Simulated nodes, such as Card external account (simulated), describe the node without an id. You can send them with or without acting on behalf of a user:

Response

The simulation object contains:
  • The order type.
  • The estimated origin and destination, each with its asset, amount, rate and node.
  • The denomination.
  • The estimated fees.
  • simulatedAt, the time at which the rates of the simulation were quoted.
APM and crypto address nodes are returned as sent in the request. External account nodes return:
  • The id, if you sent one.
  • via, which says how the order is made.
  • The network used, when there is one. A simulated card sent without a network is returned without it.
  • The card method, if you sent one, or the method of an APM.
The asset of an external account node is returned in origin.asset or destination.asset, not in the node. Networks are matched in any case and returned in lowercase, e.g. Bitcoin is returned as bitcoin. Unlike quotes, simulations have no id, pricing, expiresAt, refreshAt or requirements. Check the requirements on the quote before you create the order.

Precision

The more the simulation knows about the user and the external accounts, the closer it is to the quote. Fees and amounts are less precise in these cases:

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication

Scopes

on-off-ramp.orders.quotes:simulate

Grants access to simulate order quotes.

Body

application/json
type
enum<string>
required

The type of the simulation.

Available options:
on-ramp
origin
External account · object
required
destination
External account · object
required
denomination
object
required

Response

Order simulated.

simulation
On-ramp · object
required