Skip to main content
We are planning to deprecate these endpoints in the future. Please consider updating your tests to use Simulations 2.0 as soon as possible. If you are new to Marqeta’s Simulations service, start testing your integration using the recently released Simulations 2.0 API for card transactions and direct deposits. If you are currently using the Simulations service described on this page, consider switching to the Simulations 2.0 service. The Simulations 2.0 service includes all the capabilities of the previous versions of Simulations, plus it offers a new set of endpoints and a Postman collection. The Marqeta platform provides you with a production environment, as well as a test environment known as the sandbox. There are two types of sandbox environments available:
  • Public sandbox: A single-user environment where you can begin building your program. Public sandbox users are typically potential customers who are evaluating Marqeta as a partner in their application.
  • Private sandbox: A multi-user environment where you can integrate your application with the Marqeta platform. Marqeta customers use the private sandbox and its connected microservices to validate their application’s integration, as well as ongoing API changes.
All funds and transactions are simulated in both types of sandbox environments. The sandbox may give you access to features not available in production environments, depending on your integration. The most significant functional 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. The public and private sandbox environments, on the other hand, do not communicate with a card network and the cards you create within them cannot be used to conduct real-world transactions. You must, therefore, rely on simulated transactions in order to test the cards, users, and other objects you create within the sandbox. The public and private sandbox environments provide a set of endpoints that allow you to simulate various types of card network transactions, such as authorizations, reversals, and balance inquiries. These endpoints are available only within the public and private sandbox environments, and not within your production environment. This page, therefore, applies only to the public and private sandbox environments.

Simulate authorization

Action: POST
Endpoint: /simulate/authorization
Simulate an authorization type transaction by including the card_token and other authorization details in your request.

Body field details

The card_options object

The card_options.billing_address object

The card_acceptor object

The transaction_options object

The network_fees object

The webhook object

Sample request body

JSON

Sample response body

JSON

Simulate authorization advice

Action: POST
Endpoint: /simulate/authorization/advice
An authorization advice allows an amount to be decreased after the authorization. This endpoint allows you to simulate post-swipe adjustments. Simulate an authorization.advice type transaction by including the original_transaction_token and other authorization details in your request.

Body field details

The transaction_options object

The network_fees object

The webhook object

Sample request body

JSON

Sample response body

JSON

Simulate clearing or refund

Action: POST
Endpoint: /simulate/clearing
Simulate an authorization.clearing type transaction by including the original_transaction_token and amount in your request. To simulate a refund type transaction, set the is_refund field to true.

Body field details

The card_acceptor object

The network_fees object

The webhook object

Sample request body

Send the following request to simulate an authorization.clearing type transaction.
JSON
Send the following request to simulate a refund type transaction.
JSON

Sample response body

The following response shows an authorization.clearing type transaction.
JSON
The following response shows a refund type transaction.
JSON

Simulate financial

Action: POST
Endpoint: /simulate/financial
A “financial” is a transaction message class that includes ATM transactions, PIN-debit transactions, and balance inquiries. Simulate a pindebit type transaction by including the card_token and amount in your request.

Body field details

The card_acceptor object

The transaction_options object

The webhook object

Sample request body

JSON

Sample response body

JSON

Simulate financial advice

Action: POST
Endpoint: /simulate/financial/advice
Simulate a financial advice by including the original_transaction_token and other authorization details in JSON format in the body of the request.

Body field details

The transaction_options object

The network_fees object

The webhook object

Sample request body

JSON

Sample response body

The following response shows a pindebit.authorization.clearing type transaction.
JSON

Simulate balance inquiry

Action: POST
Endpoint: /simulate/financial/balanceinquiry
Simulate a pindebit.balanceinquiry type transaction by sending a POST request to the /simulate/financial/balanceinquiry endpoint.

Body field details

The card_acceptor object

The network_fees object

The webhook object

Sample request body

JSON

Sample response body

JSON

Simulate ATM withdrawal

Action: POST
Endpoint: /simulate/financial/withdrawal
Simulate a pindebit.atm.withdrawal type transaction by including the card_token and amount in your request.

Body field details

The card_acceptor object

The webhook object

Sample request body

JSON

Sample response body

JSON

Simulate reversal

Action: POST
Endpoint: /simulate/reversal
A reversal releases the hold that was placed on account funds by an authorization, thus returning the funds to the account. Simulate an authorization.reversal type transaction by including the original_transaction_token and amount in your request.

Body field details

The network_fees object

The webhook object

Sample request body

JSON

Sample response body

JSON

Simulate ACH Receiving

Action: POST
Endpoint: /simulate/directdeposits
Simulate a direct deposit of funds to a user account by including the deposit account number of the account to be debited or 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 ACH Receiving. If type is CREDIT, the response contains a simulated transaction message (i.e., a direct deposit record) and the corresponding transaction that is created is of the type directdeposit.credit.pending. If type is DEBIT, the response contains a simulated transaction message (i.e., a direct deposit record) and the corresponding transaction that is created is of the type directdeposit.debit.pending. This endpoint returns a directdeposit object with a direct deposit token, and its state will be PENDING. Calling this endpoint does not return the transactions object; you cannot take the token from the response and look up the direct deposit record using the /transactions endpoint. You can, however, look it up by sending a GET request to the /directdeposits/token endpoint.
Note
You can use this endpoint to simulate directdeposit.credit.pending and directdeposit.debit.pending events only. Simulating other types of events is not currently supported.

Body field details

Sample requests

Send the following request to simulate a directdeposit.credit.pending type transaction.
JSON
Send the following request to simulate a directdeposit.debit.pending type transaction.
JSON

Sample responses

The following response shows a directdeposit.credit.pending type transaction. Note that the state of the direct deposit is PENDING. You now need to use the Direct Deposit Transitions endpoint /directdeposits/transitions to transition the pending direct deposit to either APPLIED (to settle the direct deposit) or REVERSED (to fail the direct deposit).
JSON
The following response shows a directdeposit.debit.pending type transaction. Note that the state of the direct deposit is PENDING. You now need to use the Direct Deposit Transitions endpoint /directdeposits/transitions to transition the pending direct deposit to either APPLIED (to settle the direct deposit) or REVERSED (to fail the direct deposit).
JSON

Simulate OCT

Action: POST
Endpoint: /simulate/financial/originalcredit
This Original Credit Transaction (OCT) enables the cardholder to receive funds on the specified card from an external source via the card network. Use this endpoint to simulate a transaction that is similar to a wire transfer and not linked to any purchase. Simulate an OCT by including the card_token, amount, mid, and type in your request.

Body field details

The card_acceptor object

The sender_data object

The webhook object

Sample request body

Send the following request to simulate a disbursement type transaction.
JSON

Sample response body

The following response simulates a disbursement type transaction.
JSON