Skip to main content
The Marqeta platform provides you with a production environment and a sandbox. The main difference between the production and sandbox environments is that your production environment communicates with a payment card network. This communication allows your program’s cards to pay for goods and services by initiating live transactions over the card network. There are two types of sandbox environments available:
  • Public sandbox: A single-user environment where you can begin building your program and experiment with the Marqeta platform.
  • Private sandbox: A multi-user environment where you can integrate your application with the Marqeta platform.
All funds and transactions are simulated in both types of sandbox environments. Unlike the production environment, a sandbox does not communicate with a card network, so the cards you create within them cannot be used to conduct real-world transactions. Therefore, you must rely on simulated transactions in order to test all objects you create within a sandbox. The sandbox environments provide a set of endpoints that let you simulate various types of card network transactions, such as authorizations, reversals, and balance inquiries. These endpoints are available only within the sandbox, so the details on this page do not apply to production. To use the Simulations API for card transactions:
  • Create a card in your sandbox environment.
  • Use the /simulations/cardtransactions/* endpoints to simulate transaction event types. Each endpoint is its own event type.
  • Use the /webhooks endpoint to send optional customer notifications for system events.
To use the Simulations API for direct deposits, see Simulations 2.0 — Direct Deposits.
Note
You can use Postman to run requests for card transaction and direct deposit simulations endpoints. This collection of requests has been saved as a YAML file for your convenience. To access the YAML file, see Postman Collection for Simulations 2.0.
All card transaction simulations endpoints share the same request/response model, as described below.

Request body

Response body

International card transactions and currency conversion

With Simulations 2.0, you can simulate international card transactions based on currency and location.

Authorization events with currency conversion

You can add currency conversion when simulating an authorization-type transaction by including the currency_conversion object and related details in a POST request to the /simulations/cardtransactions/authorization endpoint. For information about the /simulations/cardtransactions/authorization endpoint, see Simulate authorization. The following example shows an authorization-type transaction, with currency conversion, for a United States card transacting in the United Kingdom. See the full request body structure at Request body.

Sample request body

JSON
See the full response body structure at Response body.

Sample response body

JSON

Clearing events with currency conversion

You can add currency conversion when simulating an authorization.clearing-type transaction by including the currency_conversion object and related details in a POST request to the /simulations/cardtransactions/authorization.clearing endpoint. For more information about the /simulations/cardtransactions/authorization.clearing endpoint, see Simulate authorization clearing. The following example shows an authorization.clearing-type transaction, with currency conversion, for a United States card in the United Kingdom. See the full request body structure at Request body.

Sample request body

JSON
See the full response body structure at Response body.

Sample response body

JSON

Transactions with Account Name Inquiry

Account Name Inquiry (ANI) is an account verification feature that is supported by both the Mastercard and Visa card networks. You can simulate the ANI feature with Simulations 2.0. For more information about ANI, see About Account Name Inquiry. You can add account name verification when simulating an authorization transaction by including the account_name_verification object and related details in a POST request to the /simulations/cardtransactions/authorization endpoint. For information about the /simulations/cardtransactions/authorization endpoint, see Simulate authorization.

ANI for Visa

The following example shows an authorization transaction, with account name verification, for the Visa network. See the full request body structure at Request body.

Sample request body

JSON
See the full response body structure at Response body.

Sample response body

JSON

ANI for Mastercard

The following example shows an authorization transaction, with account name verification, for the Mastercard network. See the full request body structure at Request body.

Sample request body

JSON
See the full response body structure at Response body.

Sample response body

JSON

Transactions with Visa Flexible Credential

The Visa Flexible Credential (VFC) feature allows cardholders to use their debit card for Buy Now, Pay Later (BNPL) credit transactions when you approve that transaction from your Just-in-Time Funding Gateway. By integrating VFC in your program, a single card product can toggle between debit and credit payment methods based on each transaction, bringing multiple funding sources to a single card. You can simulate VFC transactions for authorization, authorization.reversal, authorization.incremental, and refund.authorization transaction by including the flex object and related details in a POST request to the following endpoints:
  • /simulations/cardtransactions/authorization
  • /simulations/cardtransactions/authorization.reversal
  • /simulations/cardtransactions/authorization.incremental
  • /simulations/cardtransactions/refund.authorization
For information about the /simulations/cardtransactions/* endpoints, see Simulate authorization.

Authorization Transaction with VFC

The following example shows an authorization transaction with VFC for the Visa network.
Note
Authorization Transaction with VFC is only available for simulating in the Private sandbox. For more information about how to incorporate Visa Flexible Credential support in your program, contact your Marqeta representative.

Sample request body

See the full request body structure at Request body.
JSON

Sample response body

JSON

Available operations