Vayapay Docs

Error reasons

Why a payment was declined or failed, and what you or your customer can do about it.

When a payment isn't successful, the API still responds with HTTP status 200 OK or 201 Created, but the transaction status is error. When the card issuer or the card network declines a card payment, the payment_method_details of the transaction tell you why:

  • elavon_response_code: the response code, three digits. See Response codes.
  • elavon_advice_code: the merchant advice code, two digits. It tells you whether and when you can try again. See Merchant advice codes.

The reason of the transaction is Denied at Elavon. Base your logic on the codes, not on the reason.

{
  "status": "error",
  "transactions": [
    {
      "status": "error",
      "payment_method": "credit-card",
      "payment_method_brand": "mastercard",
      "reason": "Denied at Elavon",
      "payment_method_details": {
        "elavon_response_code": "173",
        "elavon_advice_code": "02"
      }
    }
  ]
}

The response is shortened. In this example, the issuer declined the payment for its own policy (173) and advises to try again later (02).

Soft declines

With a soft decline, the issuer doesn't refuse the payment, but asks for strong customer authentication first: response code 144, or 148 to 150 when an exemption from strong customer authentication can't be used. The transaction then also has a soft_declined event. Retry the payment with 3-D Secure.

Response codes

elavon_response_code holds one of these codes.

CodeDescription
000Approved
001Partial approval
100Do not honour
101Expired card
106PIN retries exceeded
107Refer to card issuer
108Refer to card issuer, special conditions
109Invalid merchant
110Invalid amount
111Invalid card number
117Invalid PIN
118No card record
120Transaction not permitted to terminal
123Exceeds withdrawal frequency limit
125Card not active
130Invalid terminal
131Sequence number error
132Must settle batch
133No transactions
134Invalid expiry date
135Invalid BIN
136Invalid currency
137Invalid batch number
138Insufficient funds or over credit limit
139Transaction not permitted to issuer or cardholder
140Soft decline: switch from contactless to contact with PIN, or exceeds withdrawal count limit
144Soft decline: 3-D Secure version 2 authentication requested on an unsecured e-commerce transaction
145Soft decline: process the transaction as single tap with online PIN for cardholder authentication
148SCA exemption soft decline 1: exemption criteria not met
149SCA exemption soft decline 2: merchant not enabled for the exemption
150SCA exemption soft decline 3: Transaction Risk Analysis service not available
151Pick up card
152Pick up card, special conditions
153No such issuer
154Lost card, pick up
155Stolen card, pick up
156Restricted card
157Blocked, first use
158Transaction cannot be completed
159Stop payment order
160Revocation of authorisation order
161Revocation of all authorisations
162Re-enter transaction
163Suspected fraud
164Exceeds approval amount limits
165Issuer or switch is inactive
166Cashback service not available
167Cashback request exceeds issuer limit
168Negative online CAM, dCVV, iCVV or CVV
169Declined for CVV failure
170Closed account
171Cannot verify PIN
172Life cycle decline
173Policy decline
174Security decline
190Non-DCC transaction not allowed
301Not supported
306Not successful
400Successful reversal
500Reconciliation in balance
501Reconciliation out of balance
902Invalid transaction
904Format error
909Malfunction
916MAC incorrect
992Inconsistent with message specification

Merchant advice codes

elavon_advice_code tells you whether and when you can try the payment again. Don't retry a payment with code 03 or 21. With codes 24 to 30, wait at least the time of the code before you retry.

CodeDescription
01Updated or additional information needed: obtain new account information
02Try again later
03Do not try again
04Token requirements not fulfilled for this token type
05Negotiated value not approved
21Payment cancellation: do not resubmit the transaction
22Merchant does not qualify for product code
24Retry after 1 hour
25Retry after 24 hours
26Retry after 2 days
27Retry after 4 days
28Retry after 6 days
29Retry after 8 days
30Retry after 10 days
40Issuer recognises the product as a consumer non-reloadable prepaid card
41Issuer recognises the product as a consumer single-use virtual card number