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 direct deposits:
  • Create a card in your sandbox environment.
  • Use the /simulations/directdeposits/* 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 card transactions, see Simulations 2.0 — Card Transactions.
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 direct deposit simulations endpoints share the same request/response model, as described below.

Request body

Response body

Simulate credit

Action: POST
Endpoint: /simulations/directdeposits/credit
Use this endpoint to simulate crediting funds to a deposit account. Simulate a direct deposit of funds to a user account by including the deposit account number of the account to be credited. You can find the account number in the account_number field of the response when you create a new deposit account. Alternatively, you can retrieve it by sending a GET request to the /depositaccounts/user/{user_token} endpoint. For more information, see Direct Deposit. You can view the full request body structure on the Simulations 2.0 — Direct Deposits page.

Request body

See Request Body.

Sample request body

JSON

Response body

See Response Body.

Sample response body

JSON

Simulate debit

Action: POST
Endpoint: /simulations/directdeposits/debit
Use this endpoint to simulate debiting funds from a deposit account. Simulate a direct deposit of funds to a user account by including the deposit account number of the account to be debited. You can find the account number in the account_number field of the response when you create a new deposit account. Alternatively, you can retrieve it by sending a GET request to the /depositaccounts/user/{user_token} endpoint. For more information, see Direct Deposit. You can view the full request body structure on the Simulations 2.0 — Direct Deposits page.

Request body

See Request Body.

Sample request body

JSON

Response body

See Response Body.

Sample response body

JSON