- 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.
- 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
/webhooksendpoint to send optional customer notifications for system events.
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.
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.
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 anauthorization-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
Sample response body
JSON
Clearing events with currency conversion
You can add currency conversion when simulating anauthorization.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
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 anauthorization 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 anauthorization transaction, with account name verification, for the Visa network.
See the full request body structure at Request body.
Sample request body
JSON
Sample response body
JSON
ANI for Mastercard
The following example shows anauthorization transaction, with account name verification, for the Mastercard network.
See the full request body structure at Request body.
Sample request body
JSON
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 forauthorization, 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
/simulations/cardtransactions/* endpoints, see Simulate authorization.
Authorization Transaction with VFC
The following example shows an authorization transaction with VFC for the Visa network.Sample request body
See the full request body structure at Request body.JSON
Sample response body
JSON
Simulate authorization
Action:POSTEndpoint:
/simulations/cardtransactions/authorization
Authorization is the process of confirming whether a card is valid, business rules are met, and funds are sufficient, and then placing a temporary hold on those funds. Use this endpoint to simulate an authorization type transaction by including the card_token and other authorization details in your request.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See Authorization Event.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate authorization advice
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.advice
Authorization advice allows an amount to be decreased after the authorization. This endpoint allows you to simulate post-swipe adjustments. Simulate an authorization.advice transaction by including the preceding_related_transaction_token and other authorization details in your request.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate authorization clearing
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.clearing
Clearing is the process of finalizing the hold on funds and posting the transaction on the cardholder’s account. This process is triggered by the merchant’s capture request. This endpoint simulates an authorization.clearing type transaction by including the preceding_related_transaction_token and amount in your request.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See Authorization Clearing Event.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate authorization reversal
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.reversal
A reversal releases the hold that was placed on account funds by an authorization, thus returning the funds to the account. This endpoint simulates an authorization.reversal type transaction by including the original_transaction_token and amount in your request.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate incremental authorization
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.incremental
Use this endpoint to simulate incremental authorization transactions. An incremental authorization is a request to add an additional dollar amount to an ongoing prior authorization. This type of transaction enables you to increase the final amount authorized as conditions change or additional charges accrue. A common use case is adding the gratuity (an incremental authorization) to the original total (a prior authorization) of a restaurant bill.
For this use case, you use two endpoints: one to create the authorization, and another to increment it.
- Create the authorization using the
/simulations/cardtransactions/authorizationendpoint:
Action:POST
Endpoint:/simulations/cardtransactions/authorization
- Increment the authorization using the
/simulations/cardtransactions/authorization.incrementalendpoint:
Action:POST
Endpoint:/simulations/cardtransactions/authorization.incremental
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate authorization cash back
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.cashback
Use this endpoint to simulate authorization.cashback transactions, which covers authorization for cash back requested at a point-of-sale terminal. This simulation can be used to test dual-message cash back transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate ATM withdrawal authorization
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.atm.withdrawal
Use this endpoint to simulate authorization.atm.withdrawal transactions. In the EU, this includes authorization for withdrawing cash at an ATM. In the US, this event indicates that the cardholder got cash from a bank teller rather than an ATM. This simulation can be used to test dual-message ATM withdrawal transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate ATM withdrawal authorization clearing
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.clearing.atm.withdrawal
Use this endpoint to simulate authorization.clearing.atm.withdrawal transactions, which completes an authorization for withdrawing cash at an ATM. This simulation can be used to test dual-message ATM withdrawal transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate quasi-cash authorization
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.quasi.cash
Use this endpoint to simulate authorization.quasi.cash transactions. This is for authorization at a point-of-sale terminal for items equivalent to cash, such as traveler’s checks, money orders, foreign currency, or gaming chips. This simulation can be used to test dual-message quasi-cash transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate quasi-cash authorization clearing
Action:POSTEndpoint:
/simulations/cardtransactions/authorization.clearing.quasi.cash
Use this endpoint to simulate authorization.clearing.quasi.cash transactions, which completes an authorization at a point-of-sale terminal for items equivalent to cash, such as traveler’s checks, money orders, foreign currency, or gaming chips. This simulation can be used to test dual-message quasi-cash transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate AFT authorization
Action:POSTEndpoint:
/simulations/cardtransactions/account.funding.authorization
Use this endpoint to simulate Account Funding Transactions (AFTs) using account.funding.authorization.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate AFT authorization clearing
Action:POSTEndpoint:
/simulations/cardtransactions/account.funding.authorization.clearing
Use this endpoint to simulate account.funding.authorization.clearing transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate AFT authorization reversal
Action:POSTEndpoint:
/simulations/cardtransactions/account.funding.authorization.reversal
Use this endpoint to simulate account.funding.authorization.reversal transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate AFT authorization and capture
Action:POSTEndpoint:
/simulations/cardtransactions/account.funding.auth_plus_capture
Use this endpoint to simulate account.funding.auth_plus_capture transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate AFT authorization and capture reversal
Action:POSTEndpoint:
/simulations/cardtransactions/account.funding.auth_plus_capture.reversal
Use this endpoint to simulate account.funding.auth_plus_capture.reversal transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate refund
Action:POSTEndpoint:
/simulations/cardtransactions/refund
Use this endpoint to simulate an offline refund. Refunds are not associated with a token, so a preceding_related_transaction_token is not needed.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate refund authorization
Action:POSTEndpoint:
/simulations/cardtransactions/refund.authorization
Online refund refers to the refund.authorization messages that Visa and Mastercard merchants can send to card issuers. These refund authorizations allow merchants to notify customers of a pending refund and give card issuers the opportunity to decline a refund. Like purchase authorizations, refund authorizations are eventually cleared or completed by a refund.authorization.clearing event. That refund authorization clearing is automatically accepted and processed by the Marqeta platform, regardless of your funding model.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate refund authorization reversal
Action:POSTEndpoint:
/simulations/cardtransactions/refund.authorization.reversal
Use this endpoint to reject refund.authorization transactions for online refunds.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate refund authorization clearing
Action:POSTEndpoint:
/simulations/cardtransactions/refund.authorization.clearing
Use this endpoint to simulate online refund clearing.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit
Use this endpoint to simulate transactions using network debit rails.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit reversal
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.reversal
Use this endpoint to simulate transactions using network debit rails.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit authorization
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.authorization
Use this endpoint to simulate PIN-debit authorization transactions. The typical use case for dual-message PIN-debit transactions is automated fuel dispenser transactions. The pump sends an initial authorization message to the card issuer. When fueling completes, a clearing message is sent with the final amount.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit authorization clearing
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.authorization.clearing
Use this endpoint to clear pindebit.authorization transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit authorization reversal
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.authorization.reversal
Use this endpoint to reverse pindebit.authorization transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit cash back
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.cashback
Simulate a PIN-debit transaction for cash back requested at a point-of-sale terminal.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit refund
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.refund
Use this endpoint to simulate a PIN-debit transaction refund.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit ATM withdrawal
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.atm.withdrawal
Use this endpoint to simulate a cash withdrawal at an ATM.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit balance inquiry
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.balanceinquiry
Use this endpoint to simulate a balance inquiry via the card network. This is a non-financial transaction.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate PIN-debit quasi-cash
Action:POSTEndpoint:
/simulations/cardtransactions/pindebit.quasi.cash
Use this endpoint to simulate pindebit.quasi.cash transactions. This PIN-debit transaction occurs at a point-of-sale terminal for items equivalent to cash, such as traveler’s checks, money orders, foreign currency, or gaming chips. This simulation can be used to test single-message cash back transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate OCT authorization
Action:POSTEndpoint:
/simulations/cardtransactions/original.credit.authorization
Use this endpoint to simulate original.credit.authorization transactions. This is for original credit transaction (OCT) authorization for disbursing funds to a credit card. This simulation can be used to test dual-message OCT transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate OCT authorization clearing
Action:POSTEndpoint:
/simulations/cardtransactions/original.credit.authorization.clearing
Use this endpoint to simulate original.credit.authorization.clearing transactions, which completes an original credit transaction (OCT) authorization. This simulation can be used to test dual-message OCT transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate OCT authorization and capture
Action:POSTEndpoint:
/simulations/cardtransactions/original.credit.auth_plus_capture
Use this endpoint to simulate original.credit.auth_plus_capture transactions for single-message original credit transaction (OCT) for disbursing funds to a credit card. This simulation can be used to test single-message OCT transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate OCT authorization and capture reversal
Action:POSTEndpoint:
/simulations/cardtransactions/original.credit.auth_plus_capture.reversal
Use this endpoint to simulate original.credit.auth_plus_capture.reversal transactions to reverse the financial impact of a single-message original credit transaction (OCT). This simulation can be used to reverse single-message OCT transactions.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON
Simulate Product Inquiry
Action:POSTEndpoint:
/simulations/cardtransactions/product.inquiry
Use this endpoint to simulate a product.inquiry type transaction.
You can view the full request body structure on the Simulations 2.0 — Card Transactions page.
Request body
See the full request body structure at Request body.Sample request body
JSON
Response body
See Card Transaction Simulation Response.Sample response body
JSON