Skip to main content
POST
Simulate 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

Body

application/json
card_token
string
required

Unique identifier of the card. Useful when a single account holder has multiple cards.

Maximum string length: 36
amount
number
required

Amount of the transaction.

Required range: x >= 0
anticipated_amount
number

Anticipated amount of the transaction, as provided by the card network.

cash_back_amount
number

The cashback amount requested.

is_preauthorization
boolean
default:false

Indicates if the transaction is a pre-authorization. Set to true to mark the amount as an authorization only.

card_acceptor
object

Contains information about the merchant.

force_post
boolean
default:false

Set to true to simulate a forced clearing transaction.

NOTE: If you set this field to true, you must also set the original_transaction_token field to an existing transaction token (the transaction does not need to be related).

fees
object[]

List of fees associated with the transaction.

This array is returned if it exists in the resource.

card_options
object

Contains attributes that govern card usage.

pos
object

Contains information about the point of sale, including details on how the card was presented. May be returned if the request uses Transaction Model v2 of the Marqeta Core API.

Not returned for Transaction Model v1 requests.

Unique identifier of the card. Useful when a single account holder has multiple cards.

Maximum string length: 36
network
enum<string>

Indicates which card network was used to complete the transaction.

Available options:
VISA,
MASTERCARD,
DISCOVER,
PULSE
sub_network
enum<string>

Indicates which subnetwork was used to complete the transaction.

Available options:
VISANET,
VISANETDEBIT,
VISAINTERLINK,
VISAPLUS,
MAESTRO,
CIRRUS,
MASTERCARDDEBIT
currency_conversion
object

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.

currency_code
enum<string>

Currency type of the transaction.

Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYR,
BZD,
CAD,
CDF,
CHF,
CLP,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GGP,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
IMP,
INR,
IQD,
IRR,
ISK,
JEP,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SPL,
SRD,
STD,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TVD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VEF,
VND,
VUV,
WST,
XAF,
XCD,
XDR,
XOF,
XPF,
YER,
ZAR,
ZMW,
ZWD
account_funding
object

Information used when funding an account.

original_credit
object

Contains information about an original credit transaction (OCT), which enables the cardholder to receive funds on the specified card from an external source via the card network.

flex
object

Requests model to invoke Flexible Credential transactions.

account_name_verification
object

Contains name verification data: the full name entered by the cardholder, name data held by the Marqeta platform, and an assertion by the Marqeta platform as to whether the two sets of data match.

address_verification
object

Contains the address of the cardholder for account address verification.

Response

Created

Contains information about the simulated transaction.

transaction
TransactionModel · object

Contains information about the transaction.