Simulate authorization

Simulate an authorization request with a card you issued previously.

Body·
required
application/json
  • card
    Type: object ·

    The card to simulate an authorization with.

  • transaction
    Type: object ·

    The transaction to simulate with the specified card. For example, a purchase.

    • type
      Discriminator
      Type: string
      required

      The transaction type.

    • amount
      Type: integer
      min:  
      0

      The payment amount, in minor currency units.

      To perform a card verification, set amount to 0, or omit the field entirely.

    • currency
      Type: string
      min length:  
      3
      max length:  
      3

      The currency to use for the transaction, as a three-letter ISO currency code. If this currency differs from the cardholder's billing currency, the billing amount will be adjusted according to the applicable conversion rate. If no currency is provided, the transaction will default to the cardholder's billing currency.

    • merchant
      Type: object ·

      The merchant related data to use for the transaction.

    • authorization_type
      Type: string · enum

      Use authorization for a known final amount or pre_authorization for an estimated amount.

      values
      • authorization
      • pre_authorization
Responses
  • application/json
  • 401

    Unauthorized

  • application/json
  • 500

    Internal Server Error

Request Example for post/issuing/simulate/authorizations
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/simulate/authorizations' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "card": {
    "id": "crd_fa6psq242dcd6fdn5gifcq1491",
    "expiry_month": 5,
    "expiry_year": 2025
  },
  "transaction": {
    "type": "purchase",
    "amount": 2500,
    "currency": "GBP",
    "merchant": {
      "category_code": "7399"
    }
  }
}'
{
  "id": "trx_aaqc4uaaybigcaaqc4uaayfiga",
  "status": "Authorized"
}