CardAuthorizationRequest

Sent in real time when a cardholder initiates a transaction.

Sent in real time when a cardholder initiates a transaction. Unlike notification webhooks, this is a synchronous request — Altery waits for your response to decide whether to approve or decline the transaction.

To reduce the total authorization time, Altery performs its own authorization checks in parallel with the partner decision request. The transaction is approved only if both Altery and you approve the authorization. If either Altery or you decline, the authorization will be declined.

⚠️

Response time is critical

Your endpoint must respond within 2 seconds. If it does not respond within this required timeout, the transaction will be automatically declined. No retries are triggered for this webhook type.


Authorization requests are not retried. Each CardAuthorizationRequest is a single real-time decision, and a missing or late response is treated as a decline.

Request Payload Fields

FieldTypeDescription
authorizationIdstring (UUID)Unique identifier for this authorization request
cardIdstring (UUID)ID of the card being used
transactionAmountnumberAmount in the transaction currency
transactionCurrencyCodestringTransaction currency (ISO 4217, e.g. GBP)
accountAmountnumberEquivalent amount in the card account currency
accountCurrencyCodestringCard account currency (ISO 4217, e.g. EUR)
merchantIdstringMerchant identifier assigned by the card scheme
merchantNamestringMerchant name
merchantCategoryCodestringMCC — merchant category code
merchantCitystringCity where the merchant is located
entryModeTypestringHow the card was presented (e.g. Contactless, Chip, Irrelevant)
isDeclinedbooleanPre-decline flag set by Altery before forwarding to you
createdAtstring (ISO 8601)Timestamp when the authorization was created
datestring (ISO 8601)Transaction date as reported by the card scheme

Sample Request Payload

{
  "event":"CardAuthorizationRequest",
	"authorizationId": "fd01ce3c-0799-43be-b4cd-b95dd107d4d8",
  "cardId": "f16ba382-eb42-481a-b08f-c57bdc9aae24",
  "transactionAmount": 800,
  "transactionCurrencyCode": "GBP",
  "accountAmount": 1000,
  "accountCurrencyCode": "EUR",
  "merchantId": "SHP00000000057",
  "merchantName": "aliexpress.com",
  "merchantCategoryCode": "5651",
  "merchantCity": "London",
  "entryModeType": "Irrelevant",
  "isDeclined": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "date": "2019-08-24T14:15:22Z"
}

Response Format

Your endpoint must return HTTP 200 with the following JSON body:

FieldTypeDescription
authorizestring"true" to approve, "false" to decline
errorCodenumber0 for approved. For declines, use a decline reason code (see below)
errorMsgsarrayOptional array of error message strings for logging

Sample Response — Approved

{
  "authorize": "true",
  "errorCode": 0,
  "errorMsgs": []
}

Sample Response — Declined

{
  "authorize": "false",
  "errorCode": 21,
  "errorMsgs": ["Not sufficient funds"]
}

Decline Behavior

The transaction will be declined in any of the following cases:

ConditionResult
Non-200 HTTP status codeDeclined
errorCode is not 0Declined
authorize is not "true"Declined
🚧

No retries

Unlike notification webhooks, CardAuthorizationRequest is never retried. Each authorization is a single real-time decision.


Decline Reason Codes

When declining a transaction, set errorCode to the appropriate value from the table below.

Altery uses these exact codes internally when reporting decline reasons to the card scheme. While using them is not mandatory, we strongly recommend aligning with this format to ensure consistent reporting across the full transaction flow.

CodeNameDescription
0TechnicalErrorGeneric technical error — also used for approved transactions
1UnsupportedMerchantMerchant is not supported
2DeclineByMerchantDeclined at merchant level
3CVC2orCVV2IncorrectCard security code is incorrect
4CardNotEffectiveCard is not yet effective
5ContactlessPaymentsSwitchedOffContactless payments are disabled on this card
6ExceedsContactlessPaymentsDailyLimitContactless daily limit exceeded
7ExceedsContactlessPaymentsMonthlyLimitContactless monthly limit exceeded
8ExceedsContactlessPaymentsTransactionLimitContactless per-transaction limit exceeded
9ExceedsInternetPurchasePaymentsDailyLimitOnline payments daily limit exceeded
10ExceedsInternetPurchasePaymentsMonthlyLimitOnline payments monthly limit exceeded
11ExceedsInternetPurchasePaymentsTransactionLimitOnline payments per-transaction limit exceeded
12ExceedsPurchasesDailyLimitPurchase daily limit exceeded
13ExceedsPurchasesMonthlyLimitPurchase monthly limit exceeded
14ExceedsPurchasesTransactionLimitPurchase per-transaction limit exceeded
15ExceedsWithdrawalAmountLimitWithdrawal amount limit exceeded
16ExceedsWithdrawalsDailyLimitWithdrawal daily limit exceeded
17ExceedsWithdrawalsMonthlyLimitWithdrawal monthly limit exceeded
18ExceedsWithdrawalsTransactionLimitWithdrawal per-transaction limit exceeded
19ExpiredCardCard has expired
20InternetPurchasePaymentsSwitchedOffOnline payments are disabled on this card
21NotSufficientFundsInsufficient balance
22PurchasesSwitchedOffPurchases are disabled on this card
23WithdrawalsSwitchedOffWithdrawals are disabled on this card
24CardNotActiveCard is not active
25VirtualCardsNotSupportedVirtual cards are not accepted by this merchant
26CardBlockedAfterIncorrectPinCard is blocked due to too many incorrect PIN attempts
27ExceedsLimitGeneric limit exceeded
28PhysicalCardsNotSupportedPhysical cards are not accepted by this merchant
29InCorrectExpiryDateCard expiry date is incorrect