/simulate/advanced API endpoint.
You will not find comprehensive documentation of this endpoint here. Any interactions not described below are unsupported.
Note
Distribution of this page is limited; all information contained herein is confidential.
Distribution of this page is limited; all information contained herein is confidential.
/simulate endpoint, see Simulating Transactions.
Simulate Automated Teller Machine (ATM) withdrawals with fees
Simulate apindebit.atm.withdrawal type authorization transaction, including fees, by including the card_token, amount, and network_fees object parameters with the request.
Action: POSTEndpoint:
/simulate/advanced/authorization
Body field details
| Fields | Description |
|---|---|
| mid string Optional | Merchant ID. The unique identification number of a merchant. Allowable Values: 50 char max |
| card_token string Required | The unique identifier of the card used in the transaction. Allowable Values: Existing card token. |
| pin string Conditionally required | The PIN number for the associated card. Required when the transaction involves a PIN-protected account. This requirement may be set at the program level. Allowable Values: 4 char max |
| amount number Required | The amount of money to withdraw. Allowable Values: Format: 0.00 |
| card_acceptor object Optional | Contains attributes that describe the merchant. Allowable Values: A valid card_acceptor object. |
| network_fees array of objects Optional | Simulates various types of fees levied on the transaction. Allowable Values: A valid array of network_fees objects. |
| mti string Required | ISO 8583 message type indicator. Allowable Values: - 0100 for dual-message transactions- 0200 for single-message transactions such as ATM withdrawals |
| processing_code string Conditionally required | Internal Marqeta field. Required when the value of mti is 0200.Allowable Values: 01 |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
The card_acceptor object
| Fields | Description |
|---|---|
| mcc string Optional | Merchant category code. Allowable Values: 5 char max |
| name string Optional | Merchant name. Allowable Values: 255 char max |
| address string Optional | Merchant address. Allowable Values: 255 char max |
| city string Optional | Merchant city. Allowable Values: 255 char max |
| state string Optional | Merchant state. Allowable Values: 2 char max |
| zip string Optional | Merchant ZIP or postal code. Allowable Values: 10 char max |
| country string Optional | Merchant country. Allowable Values: 40 char max |
The network_fees object
| Fields | Description |
|---|---|
| type string Optional | Specifies the type of fee. - ISSUER_FEE – Fee charged by the issuing bank. Does not impact account balance. - SWITCH_FEE – Fee charged per transaction by the card network. Does not impact account balance. - PINDEBIT_ASSOC_FEE – Fee associated with a PIN-debit transaction, such as at an ATM. Impacts account balance. - ACQUIRER_FEE – Fee charged by the acquiring bank. Impacts account balance. - INTERCHANGE_FEE – Fee charged per transaction by the card network. Does not impact account balance. - CUR_CONV_CARDHOLDER_FEE – Currency conversion fee charged to the cardholder by the card network. Impacts account balance. - CUR_CONV_ISSUER_FEE – Currency conversion fee paid for by the issuer. Does not impact account balance. - CROSS_BORDER_ISSUER_FEE – Cross-border fee charged by the network, and paid for by the issuer. Does not impact account balance. - CROSS_BORDER_CARDHOLDER_FEE – Cross-border fee charged to the cardholder by the card network. Impacts account balance. Allowable Values: ISSUER_FEE, SWITCH_FEE, PINDEBIT_ASSOC_FEE, ACQUIRER_FEE, INTERCHANGE_FEE, CUR_CONV_CARDHOLDER_FEE, CUR_CONV_ISSUER_FEE, CROSS_BORDER_ISSUER_FEE |
| amount decimal Optional | Specifies the amount of the fee. Allowable Values: Format: 0.00 |
| credit_debit string Optional | Specifies whether the fee credits or debits the account balance. Allowable Values: C, DThe default value depends on the setting of the type field, as listed below:Fee Type / Default ISSUER_FEE / CSWITCH_FEE / DPINDEBIT_ASSOC_FEE / DACQUIRER_FEE / DINTERCHANGE_FEE / CCUR_CONV_CARDHOLDER_FEE / DCUR_CONV_ISSUER_FEE / CCROSS_BORDER_ISSUER_FEE / CCROSS_BORDER_CARDHOLDER_FEE / D |
The webhook object
| Fields | Description |
|---|---|
| endpoint string Optional | Endpoint to which a copy of the response is sent. Allowable Values: - HTTPS URL - 250 char max - Empty string not allowed |
| username string Optional | Username for accessing the endpoint. Allowable Values: 50 char max |
| password string Optional | Password for accessing the endpoint. Allowable Values: Marqeta does not impose specific requirements for this password. |
Sample request body
JSON
Sample response body
JSON
Simulate transactions from different card networks
Simulate a transaction across the different card networks and subnetworks by including values fornetwork and sub_network in your request.
Note
You do not have to include
You do not have to include
sub_network in the request. Visa defaults to VISANET, Mastercard defaults to MAESTRO, and Pulse and Discover do not have subnetworks.POSTEndpoint:
/simulate/advanced/authorization
Body field details
| Fields | Description |
|---|---|
| mid string Optional | Merchant ID. The unique identification number of a merchant. Allowable Values: 50 char max |
| card_token string Required | The unique identifier of the card used in the transaction. Allowable Values: Existing card token. |
| pin string Conditionally required | The PIN number for the associated card. Required when the transaction involves a PIN-protected account. This requirement may be set at the program level. Allowable Values: 4 char max |
| network string Required | Indicates which card network was used to complete the transaction. Allowable Values: VISA, MASTERCARD, DISCOVER, PULSE |
| sub_network string Optional | Indicates which subnetwork was used to complete the transaction. NOTE: This field is called sub_network in the request, but is returned in the response as subnetwork.Allowable Values: - VISANET – Used for VisaNet signature-based transactions. - VISANETDEBIT – Used for VisaNet Debit PIN-based transaction. - VISAINTERLINK – Used for Visa Interlink PIN-based transactions. - VISAPLUS – Used for ATM withdrawals on Visa. - MAESTRO – Used for PIN-based transactions on Mastercard. - CIRRUS – Used for ATM withdrawals on Mastercard. - MASTERCARDDEBIT – Used for signature-based transactions on Mastercard. - GATEWAY_JIT – Used for Gateway JIT Funding transactions. - MANAGED_JIT – Used for Managed JIT Funding transactions or for transactions that occur while Commando Mode is enabled. |
| amount number Required | The amount of the transaction. Allowable Values: Format: 0.00 |
| card_acceptor object Optional | Contains attributes that describe the merchant. Allowable Values: A valid card_acceptor object. |
| mti string Required | ISO 8583 message type indicator. Allowable Values: - 0100 for dual-message transactions- 0200 for single-message transactions such as ATM withdrawals |
| processing_code string Conditionally required | Internal Marqeta field. Required when the value of mti is 0200.Allowable Values: 01 |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
The card_acceptor object
| Fields | Description |
|---|---|
| mcc string Optional | Merchant category code. Allowable Values: 5 char max |
| name string Optional | Merchant name. Allowable Values: 255 char max |
| address string Optional | Merchant address. Allowable Values: 255 char max |
| city string Optional | Merchant city. Allowable Values: 255 char max |
| state string Optional | Merchant state. Allowable Values: 2 char max |
| zip string Optional | Merchant ZIP or postal code. Allowable Values: 10 char max |
| country string Optional | Merchant country. Allowable Values: 40 char max |
The webhook object
| Fields | Description |
|---|---|
| endpoint string Optional | Endpoint to which a copy of the response is sent. Allowable Values: - HTTPS URL - 250 char max - Empty string not allowed |
| username string Optional | Username for accessing the endpoint. Allowable Values: 50 char max |
| password string Optional | Password for accessing the endpoint. Allowable Values: Marqeta does not impose specific requirements for this password. |
Sample request body
JSON
Sample response body
JSON
Simulate transactions with different modes of entry
Use this endpoint to simulate points of interaction with cards. When simulating transactions, you can test various modes of PAN entry for transactions—such as tapping a card versus swiping it—by including different values for thepos_pan_entry_mode field in your request.
Note
The value for
The value for
pos_pan_entry_mode in your request is not included in the response.POSTEndpoint:
/simulate/advanced/transactions
Body field details
| Fields | Description |
|---|---|
| mid string Optional | Merchant ID. The unique identification number of a merchant. Allowable Values: 50 char max |
| card_token string Required | The unique identifier of the card used in the transaction. Allowable Values: Existing card token. |
| pos_pan_entry_mode string Conditionally required | How the card PAN was captured at the point of sale. The Marqeta platform supports different values, depending on which network was specified using the network field. The following table lists the supported PAN capture methods per network:Visa / Mastercard / Pulse / Discover MAG_STRIPE / MAG_STRIPE / MAG_STRIPE / NoneMANUAL / MANUAL / MANUALCARD_ON_FILE / CARD_ON_FILE / CARD_ON_FILECHIP_FALLBACK / CHIP_FALLBACK / BAR_CODE/ / OCRAllowable Values: - MAG_STRIPE – Magnetic stripe card’s swipe method was used. - MANUAL – Card PAN was entered manually. - CARD_ON_FILE – Merchant initiated the transaction using card information stored on file. - CHIP_FALLBACK – Chip card was processed as a magnetic stripe transaction. - BAR_CODE – Bar code was used. - OCR – Optical code reader was used. |
| pin string Conditionally required | The PIN number for the associated card. Required when the transaction involves a PIN-protected account. This requirement may be set at the program level. Allowable Values: 4 char max |
| network string Required | Indicates which card network was used to complete the transaction. Allowable Values: VISA, MASTERCARD, DISCOVER, PULSE |
| sub_network string Optional | Indicates which subnetwork was used to complete the transaction. NOTE: This field is called sub_network in the request, but is returned in the response as subnetwork.Allowable Values: - VISANET – Used for VisaNet signature-based transactions. - VISANETDEBIT – Used for VisaNet Debit PIN-based transaction. - VISAINTERLINK – Used for Visa Interlink PIN-based transactions. - VISAPLUS – Used for ATM withdrawals on Visa. - MAESTRO – Used for PIN-based transactions on Mastercard. - CIRRUS – Used for ATM withdrawals on Mastercard. - MASTERCARDDEBIT – Used for signature-based transactions on Mastercard. - GATEWAY_JIT – Used for Gateway JIT Funding transactions. - MANAGED_JIT – Used for Managed JIT Funding transactions or for transactions that occur while Commando Mode is enabled. |
| amount number Required | The amount of the transaction. Allowable Values: Format: 0.00 |
| card_acceptor object Optional | Contains attributes that describe the merchant. Allowable Values: A valid card_acceptor object. |
| mti string Required | ISO 8583 message type indicator. Allowable Values: - 0100 for dual-message transactions- 0200 for single-message transactions such as ATM withdrawals |
| processing_code string Conditionally required | Internal Marqeta field. Required when the value of mti is 0200.Allowable Values: 01 |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
The card_acceptor object
| Fields | Description |
|---|---|
| mcc string Optional | Merchant category code. Allowable Values: 5 char max |
| name string Optional | Merchant name. Allowable Values: 255 char max |
| address string Optional | Merchant address. Allowable Values: 255 char max |
| city string Optional | Merchant city. Allowable Values: 255 char max |
| state string Optional | Merchant state. Allowable Values: 2 char max |
| zip string Optional | Merchant ZIP or postal code. Allowable Values: 10 char max |
| country string Optional | Merchant country. Allowable Values: 40 char max |
The webhook object
| Fields | Description |
|---|---|
| endpoint string Optional | Endpoint to which a copy of the response is sent. Allowable Values: - HTTPS URL - 250 char max - Empty string not allowed |
| username string Optional | Username for accessing the endpoint. Allowable Values: 50 char max |
| password string Optional | Password for accessing the endpoint. Allowable Values: Marqeta does not impose specific requirements for this password. |
Sample request body
JSON
Sample response body
JSON
Simulate international transactions
Simulate international transactions using thelocal_currency_code and settlement_currency_code fields.
Action: POSTEndpoint:
/simulate/advanced/authorization
Body field details
| Fields | Description |
|---|---|
| mid string Optional | Merchant ID. The unique identification number of a merchant. Allowable Values: 50 char max |
| card_token string Required | The unique identifier of the card used in the transaction. Allowable Values: Existing card token. |
| local_transaction_amount number Optional | Amount paid in the currency used to complete the transaction. Allowable Values: Format: 0.00 |
| local_currency_code string Optional | Currency code for the country where the transaction took place. Allowable Values: ISO 4217 currency codes, either alphabetic or numeric |
| settlement_currency_code string Optional | Currency code for the country where the transaction was settled. If not provided, the default currency is USD. Allowable Values: ISO 4217 currency codes, either alphabetic or numeric |
| cardholder_billing_conversion_rate number Optional | Ratio between the amount the payee receives in their local currency, and the amount the cardholder pays in the currency of their account. Should be defined for multi-currency transactions. Allowable Values: Greater than zero. |
| pin string Conditionally required | The PIN number for the associated card. Required when the transaction involves a PIN-protected account. This requirement may be set at the program level. Allowable Values: 4 char max |
| network string Required | Indicates which card network was used to complete the transaction. Allowable Values: VISA, MASTERCARD, DISCOVER, PULSE |
| amount number Required | The amount of the transaction. Allowable Values: Format: 0.00 |
| card_acceptor object Optional | Contains attributes that describe the merchant. Allowable Values: A valid card_acceptor object. |
| mti string Required | ISO 8583 message type indicator. Allowable Values: - 0100 for dual-message transactions- 0200 for single-message transactions such as ATM withdrawals |
| processing_code string Conditionally required | Internal Marqeta field. Required when the value of mti is 0200.Allowable Values: 01 |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
The card_acceptor object
| Fields | Description |
|---|---|
| mcc string Optional | Merchant category code. Allowable Values: 5 char max |
| name string Optional | Merchant name. Allowable Values: 255 char max |
| address string Optional | Merchant address. Allowable Values: 255 char max |
| city string Optional | Merchant city. Allowable Values: 255 char max |
| state string Optional | Merchant state. Allowable Values: 2 char max |
| zip string Optional | Merchant ZIP or postal code. Allowable Values: 10 char max |
| country string Optional | Merchant country. Allowable Values: 40 char max |
The webhook object
| Fields | Description |
|---|---|
| endpoint string Optional | Endpoint to which a copy of the response is sent. Allowable Values: - HTTPS URL - 250 char max - Empty string not allowed |
| username string Optional | Username for accessing the endpoint. Allowable Values: 50 char max |
| password string Optional | Password for accessing the endpoint. Allowable Values: Marqeta does not impose specific requirements for this password. |
The currency_conversion object
| Fields | Description |
|---|---|
| network object Conditionally returned | Contains information from the card network about currency conversion, including the original currency of the transaction, the amount of the transaction in the origination currency, and the conversion rate. Returned if the transaction involves currency conversion. Allowable Values: A valid network object. |
| network.original_amount number Conditionally returned | Amount of the transaction in the currency in which it originated. Returned if the transaction involves currency conversion. Allowable Values: Format 0.00 |
| network.conversion_rate number Conditionally returned | Conversion rate between the origination currency and the settlement currency. Returned when the transaction currency is different from the origination currency. Allowable Values: Current conversion rate. NOTE|OPEN|| CALLOUTTITLE:Note|TITLEBREAK|A value of 0 or 1 indicates no conversion; the currencies are the same. NOTE|CLOSE |
| network.original_currency_code string Conditionally returned | Currency type of the origination currency. Returned if the transaction involves currency conversion. Allowable Values: A valid three-digit ISO 4217 currency type. |
Sample request body
JSON
Sample response body
JSON
Simulate international ATM withdrawals
Simulate international ATM withdrawals using thelocal_currency_code and settlement_currency_code fields.
Action: POSTEndpoint:
/simulate/advanced/authorization
Body field details
| Fields | Description |
|---|---|
| mid string Optional | Merchant ID. The unique identification number of a merchant. Allowable Values: 50 char max |
| card_token string Required | The unique identifier of the card used in the transaction. Allowable Values: Existing card token. |
| pin string Conditionally required | The PIN number for the associated card. Required when the transaction involves a PIN-protected account. This requirement may be set at the program level. Allowable Values: 4 char max |
| amount number Required | The amount of money to withdraw. Allowable Values: Format: 0.00 |
| local_transaction_amount number Optional | Amount withdrawn in the currency used to complete the transaction. Allowable Values: Format: 0.00 |
| local_currency_code string Optional | Currency code for the country where the withdrawal took place. Allowable Values: ISO 4217 currency codes, either alphabetic or numeric |
| settlement_currency_code string Optional | Currency code for the country where the transaction was settled. If not provided, the default currency is USD. Allowable Values: ISO 4217 currency codes, either alphabetic or numeric |
| cardholder_billing_conversion_rate number Optional | Ratio between the amount the cardholder withdrew in the local currency, and the amount in the currency of the account. Should be defined for multi-currency transactions. Allowable Values: Greater than zero. |
| card_acceptor object Optional | Contains attributes that describe the merchant. Allowable Values: A valid card_acceptor object. |
| mti string Required | ISO 8583 message type indicator. Allowable Values: - 0100 for dual-message transactions- 0200 for single-message transactions such as ATM withdrawals |
| processing_code string Conditionally required | Internal Marqeta field. Required when the value of mti is 0200.Allowable Values: 01 |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
The card_acceptor object
| Fields | Description |
|---|---|
| mcc string Optional | Merchant category code. Allowable Values: 5 char max |
| name string Optional | Merchant name. Allowable Values: 255 char max |
| address string Optional | Merchant address. Allowable Values: 255 char max |
| city string Optional | Merchant city. Allowable Values: 255 char max |
| state string Optional | Merchant state. Allowable Values: 2 char max |
| zip string Optional | Merchant ZIP or postal code. Allowable Values: 10 char max |
| country string Optional | Merchant country. Allowable Values: 40 char max |
The webhook object
| Fields | Description |
|---|---|
| endpoint string Optional | Endpoint to which a copy of the response is sent. Allowable Values: - HTTPS URL - 250 char max - Empty string not allowed |
| username string Optional | Username for accessing the endpoint. Allowable Values: 50 char max |
| password string Optional | Password for accessing the endpoint. Allowable Values: Marqeta does not impose specific requirements for this password. |
Sample request body
JSON
Sample response body
JSON
Simulate incremental authorization transactions
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. They enable 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
/simulate/advanced/transactionsendpoint:
Action:POST
Endpoint:/simulate/advanced/transactions
- Increment the authorization using the
/simulate/advanced/authorization/incrementalendpoint:
Action:POST
Endpoint:/simulate/advanced/authorization/incremental
Body field details (create authorization)
| Fields | Description |
|---|---|
| card_token string Required | The unique identifier of the card used in the transaction. Allowable Values: Existing card token. |
| amount number Required | The amount of the transaction. Allowable Values: Format: 0.00 |
| network_reference_id string Required | The unique identifier of the transaction to increment. Supplied by the card network. Allowable Values: Depends on the card network |
| merchant_id string Required | Merchant ID. The unique identification number of a merchant. Allowable Values: 50 char max |
| network string Required | Indicates which card network was used to complete the transaction. Allowable Values: VISA, MASTERCARD, DISCOVER, PULSE |
| sub_network string Optional | Indicates which subnetwork was used to complete the transaction. NOTE: This field is called sub_network in the request, but is returned in the response as subnetwork.Allowable Values: - VISANET – Used for VisaNet signature-based transactions.- VISANETDEBIT – Used for VisaNet Debit PIN-based transaction.- VISAINTERLINK – Used for Visa Interlink PIN-based transactions.- VISAPLUS – Used for ATM withdrawals on Visa.- MAESTRO – Used for PIN-based transactions on Mastercard.- CIRRUS – Used for ATM withdrawals on Mastercard.- MASTERCARDDEBIT – Used for signature-based transactions on Mastercard. |
| network_fees array of objects Optional | Simulates various types of fees levied on the transaction. Allowable Values: A valid array of network_fees objects. |
| local_amount number Optional | Amount paid in the currency used to complete the transaction. Allowable Values: Format: 0.00 |
| local_currency string Optional | Currency code for the country where the transaction took place. Allowable Values: ISO 4217 currency codes, either alphabetic or numeric |
| currency_conversion_rate number Optional | Ratio between the amount the payee receives in their local currency, and the amount the cardholder pays in the currency of their account. Should be defined for multi-currency transactions. Allowable Values: Greater than zero. |
| settlement_currency string Optional | Currency code for the country where the transaction was settled. If not provided, the default currency is USD. Allowable Values: ISO 4217 currency codes, either alphabetic or numeric |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
The network_fees object
| Fields | Description |
|---|---|
| type string Optional | Specifies the type of fee. - ISSUER_FEE – Fee charged by the issuing bank. Does not impact account balance. - SWITCH_FEE – Fee charged per transaction by the card network. Does not impact account balance. - PINDEBIT_ASSOC_FEE – Fee associated with a PIN-debit transaction, such as at an ATM. Impacts account balance. - ACQUIRER_FEE – Fee charged by the acquiring bank. Impacts account balance. - INTERCHANGE_FEE – Fee charged per transaction by the card network. Does not impact account balance. - CUR_CONV_CARDHOLDER_FEE – Currency conversion fee charged to the cardholder by the card network. Impacts account balance. - CUR_CONV_ISSUER_FEE – Currency conversion fee paid for by the issuer. Does not impact account balance. - CROSS_BORDER_ISSUER_FEE – Cross-border fee charged by the network, and paid for by the issuer. Does not impact account balance. - CROSS_BORDER_CARDHOLDER_FEE – Cross-border fee charged to the cardholder by the card network. Impacts account balance. Allowable Values: ISSUER_FEE, SWITCH_FEE, PINDEBIT_ASSOC_FEE, ACQUIRER_FEE, INTERCHANGE_FEE, CUR_CONV_CARDHOLDER_FEE, CUR_CONV_ISSUER_FEE, CROSS_BORDER_ISSUER_FEE |
| amount decimal Optional | Specifies the amount of the fee. Allowable Values: Format: 0.00 |
| credit_debit string Optional | Specifies whether the fee credits or debits the account balance. Allowable Values: C, DThe default value depends on the setting of the type field, as listed below:Fee Type / Default ISSUER_FEE / CSWITCH_FEE / DPINDEBIT_ASSOC_FEE / DACQUIRER_FEE / DINTERCHANGE_FEE / CCUR_CONV_CARDHOLDER_FEE / DCUR_CONV_ISSUER_FEE / CCROSS_BORDER_ISSUER_FEE / CCROSS_BORDER_CARDHOLDER_FEE / D |
The webhook object
| Fields | Description |
|---|---|
| endpoint string Optional | Endpoint to which a copy of the response is sent. Allowable Values: - HTTPS URL - 250 char max - Empty string not allowed |
| username string Optional | Username for accessing the endpoint. Allowable Values: 50 char max |
| password string Optional | Password for accessing the endpoint. Allowable Values: Marqeta does not impose specific requirements for this password. |
Sample request body (create authorization)
Endpoint:/simulate/advanced/transactions
JSON
Sample response body (create authorization)
JSON
Sample request body (increment authorization)
Endpoint:/simulate/advanced/authorization/incremental
JSON
Sample response body (increment authorization)
JSON
Simulate PIN-Debit Authorization Transactions
Simulate PIN-debit authorization and clearing transactions. The typical use case 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. For this use case, you use two endpoints: one to create the authorization and another to clear it.- Create the authorization using the
/simulate/advanced/pindebit/authorizationendpoint:
Action:POST
Endpoint:/simulate/advanced/pindebit/authorization
- Clear the authorization using the
/simulate/financial/adviceendpoint:
Action:POST
Endpoint:/simulate/financial/advice
Body field details (create authorization)
| Fields | Description |
|---|---|
| card_token string Required | The unique identifier of the card used in the transaction. Allowable Values: Existing card token. |
| amount number Required | The amount of the transaction. Allowable Values: Format: 0.00 |
| merchant_id string Required | Merchant ID. The unique identification number of a merchant. Allowable Values: 50 char max |
| network string Required | Indicates which card network was used to complete the transaction. Allowable Values: VISA, MASTERCARD, DISCOVER, PULSE |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
The webhook object
| Fields | Description |
|---|---|
| endpoint string Optional | Endpoint to which a copy of the response is sent. Allowable Values: - HTTPS URL - 250 char max - Empty string not allowed |
| username string Optional | Username for accessing the endpoint. Allowable Values: 50 char max |
| password string Optional | Password for accessing the endpoint. Allowable Values: Marqeta does not impose specific requirements for this password. |
Sample request body (create authorization)
Endpoint:/simulate/advanced/pindebit/authorization
JSON
Sample response body (create authorization)
JSON
Body field details (clear authorization)
| Fields | Description |
|---|---|
| original_transaction_token string Required | The unique identifier of the original transaction. Allowable Values: Existing transaction token. |
| amount number Required | The amount of the transaction. Allowable Values: Format: 0.00 |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
Sample request body (clear authorization)
Endpoint:/simulate/financial/advice
JSON
Sample response body (clear authorization)
JSON
Reverse ATM transactions
Simulate reversing ATM and PIN-debit transactions. A reversal releases the hold that was placed on account funds by an authorization and returns the funds to the account. For this use case, you use two endpoints: one to create the transaction and another to reverse and refund the transaction.- Create the transaction using the
/simulate/advancedendpoint:
Action:POST
Endpoint:/simulate/advanced/authorization
- Reverse the transaction using the public
/simulateendpoint:
Action:POST
Endpoint:/simulate/reversal
Body field details (create transaction)
| Fields | Description |
|---|---|
| mid string Optional | Merchant ID. The unique identification number of a merchant. Allowable Values: 50 char max |
| card_token string Required | The unique identifier of the card used in the transaction. Allowable Values: Existing card token. |
| pin string Conditionally required | The PIN number for the associated card. Required when the transaction involves a PIN-protected account. This requirement may be set at the program level. Allowable Values: 4 char max |
| amount number Required | The amount of money to withdraw. Allowable Values: Format: 0.00 |
| card_acceptor object Optional | Contains attributes that describe the merchant. Allowable Values: A valid card_acceptor object. |
| network_fees array of objects Optional | Simulates various types of fees levied on the transaction. Allowable Values: A valid array of network_fees objects. |
| mti string Required | ISO 8583 message type indicator. Allowable Values: - 0100 for dual-message transactions- 0200 for single-message transactions such as ATM withdrawals |
| processing_code string Conditionally required | Internal Marqeta field. Required when the value of mti is 0200.Allowable Values: 01 |
| rrn string Optional | The Retrieval Reference Number. Allowable Values: 01 |
| stan string Optional | The Systems Trace Audit Number. Allowable Values: Must be 6 digits. |
| webhook object Optional | Allows information to be posted asynchronously to endpoints hosted in your environment. Allowable Values: A valid webhook object. |
The card_acceptor object
| Fields | Description |
|---|---|
| mcc string Optional | Merchant category code. Allowable Values: 5 char max |
| name string Optional | Merchant name. Allowable Values: 255 char max |
| address string Optional | Merchant address. Allowable Values: 255 char max |
| city string Optional | Merchant city. Allowable Values: 255 char max |
| state string Optional | Merchant state. Allowable Values: 2 char max |
| zip string Optional | Merchant ZIP or postal code. Allowable Values: 10 char max |
| country string Optional | Merchant country. Allowable Values: 40 char max |
The network_fees object
| Fields | Description |
|---|---|
| type string Optional | Specifies the type of fee. - ISSUER_FEE – Fee charged by the issuing bank. Does not impact account balance. - SWITCH_FEE – Fee charged per transaction by the card network. Does not impact account balance. - PINDEBIT_ASSOC_FEE – Fee associated with a PIN-debit transaction, such as at an ATM. Impacts account balance. - ACQUIRER_FEE – Fee charged by the acquiring bank. Impacts account balance. - INTERCHANGE_FEE – Fee charged per transaction by the card network. Does not impact account balance. - CUR_CONV_CARDHOLDER_FEE – Currency conversion fee charged to the cardholder by the card network. Impacts account balance. - CUR_CONV_ISSUER_FEE – Currency conversion fee paid for by the issuer. Does not impact account balance. - CROSS_BORDER_ISSUER_FEE – Cross-border fee charged by the network, and paid for by the issuer. Does not impact account balance. - CROSS_BORDER_CARDHOLDER_FEE – Cross-border fee charged to the cardholder by the card network. Impacts account balance. Allowable Values: ISSUER_FEE, SWITCH_FEE, PINDEBIT_ASSOC_FEE, ACQUIRER_FEE, INTERCHANGE_FEE, CUR_CONV_CARDHOLDER_FEE, CUR_CONV_ISSUER_FEE, CROSS_BORDER_ISSUER_FEE |
| amount decimal Optional | Specifies the amount of the fee. Allowable Values: Format: 0.00 |
| credit_debit string Optional | Specifies whether the fee credits or debits the account balance. Allowable Values: C, DThe default value depends on the setting of the type field, as listed below:Fee Type / Default ISSUER_FEE / CSWITCH_FEE / DPINDEBIT_ASSOC_FEE / DACQUIRER_FEE / DINTERCHANGE_FEE / CCUR_CONV_CARDHOLDER_FEE / DCUR_CONV_ISSUER_FEE / CCROSS_BORDER_ISSUER_FEE / CCROSS_BORDER_CARDHOLDER_FEE / D |
The webhook object
| Fields | Description |
|---|---|
| endpoint string Optional | Endpoint to which a copy of the response is sent. Allowable Values: - HTTPS URL - 250 char max - Empty string not allowed |
| username string Optional | Username for accessing the endpoint. Allowable Values: 50 char max |
| password string Optional | Password for accessing the endpoint. Allowable Values: Marqeta does not impose specific requirements for this password. |
Sample request body (create transaction)
Endpoint:/simulate/advanced/authorization
JSON
Sample response body (create transaction)
JSON
Body field details (reverse transaction)
See Simulate reversal in Simulating Transactions.Sample request body (reverse transaction)
Endpoint:/simulate/reversal
JSON
Sample response body (reverse transaction)
JSON
Get a list of transactions as a batch
Request transactions using the instructions provided for theGET /transactions endpoint of the Transactions page.
To subscribe to webhooks for transactions, see Step 2 — Subscribe to event notifications in the Tutorial section of About Webhooks.