Simulate authorization
Simulate an authorization request with a card you issued previously.
- Type: object ·
The card to simulate an authorization with.
- Type: object ·
The transaction to simulate with the specified card. For example, a purchase.
- typeDiscriminatorType: stringrequired
The transaction type.
- amountType: integermin:0
The payment amount, in minor currency units.
To perform a card verification, set
amountto0, or omit the field entirely. - currencyType: stringmin length:3max 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.
- merchantType: object ·
The merchant related data to use for the transaction.
- authorizationType: string · enum
_type Use
authorizationfor a known final amount orpre_authorizationfor an estimated amount.values- authorization
- pre
_authorization
- application/json
- 401
Unauthorized
- application/json
- 500
Internal Server Error
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"
}