Simulations 2.0 — Card Transactions

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.

post/simulations/cardtransactions/authorization

Request

Request body

event_typestring
card_tokenstring

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

amountnumber

Amount of the transaction.

anticipated_amountnumber

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

cash_back_amountnumber

The cashback amount requested.

is_preauthorizationboolean

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

force_postboolean

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).

preceding_related_transaction_tokenstring

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

network'VISA' | 'MASTERCARD' | 'DISCOVER' | 'PULSE'

Indicates which card network was used to complete the transaction.

sub_network'VISANET' | 'VISANETDEBIT' | 'VISAINTERLINK' | 'VISAPLUS' | 'MAESTRO' | 'CIRRUS' | 'MASTERCARDDEBIT'

Indicates which subnetwork was used to complete the transaction.

currency_code'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'

Currency type of the transaction.

Response

Created

Example response

{
  "transaction": {
    "type": "authorization",
    "state": "PENDING",
    "token": "**AUTHORIZATION_TRANSACTION_TOKEN**",
    "user_token": "**USER_TOKEN**",
    "card_token": "**CARD_TOKEN**",
    "response": {
      "code": "0000",
      "memo": "Approved or completed successfully"
    },
    "created_time": "2024-12-06T21:39:43Z",
    "user_transaction_time": "2024-12-06T21:39:43Z",
    "settlement_date": "2024-12-06T00:00:00Z",
    "amount": 10,
    "gpa": {
      "ledger_balance": 250,
      "available_balance": 240,
      "impacted_amount": -10
    },
    "currency_code": "USD",
    "currency_conversion": {
      "original_amount": 10,
      "conversion_rate": 1,
      "original_currency_code": "840"
    },
    "network": "VISA",
    "subnetwork": "VISANET",
    "card_acceptor": {
      "mid": "000000000011111",
      "mcc": "6411",
      "name": "Marqeta Storefront",
      "city": "St. Petersburg",
      "state": "FL"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.