Every gateway reports declines differently. OrderCard maps each one onto the same codes, so your handling does not depend on which gateway you charge through. A transaction that did not succeed has:
status:declinedwhen the issuer or gateway said no,failedwhen it could not be processed.response.error_code: the category (see Errors).response.decline_code: the reason, when there is one.response.message: a short message that is safe to show the customer.response.gateway_message: the gateway’s own words, for your logs and support.
Decline codes
| Decline code | Meaning | What to tell the customer |
|---|---|---|
generic_decline |
The issuer declined without saying why. | Use another card or contact the bank. |
insufficient_funds |
Not enough money or credit. | Use another card. |
do_not_honor |
The issuer declined. | Contact the bank. |
call_issuer |
The issuer wants to speak to the cardholder. | Contact the bank. |
lost_card, stolen_card, pickup_card |
The card was reported lost or stolen, or must be kept. | Use another card (do not say why). |
fraudulent |
The issuer suspects fraud. | Use another card. |
restricted_card |
The card cannot be used for this kind of purchase. | Use another card. |
transaction_not_allowed |
The card or account does not allow this transaction. | Use another card. |
card_not_supported |
The gateway or merchant account does not take this card type. | Use another card. |
card_velocity_exceeded |
Too many attempts or over a limit. | Try again later or use another card. |
expired_card |
The card has expired. | Check the expiry date. |
incorrect_cvc |
The security code is wrong. | Check the security code. |
incorrect_number |
The card number is wrong. | Check the number. |
address_verification_failed |
The billing address does not match the card. | Check the billing address. |
invalid_amount |
The amount is not acceptable to the issuer. | |
duplicate_transaction |
The gateway saw the same charge moments ago. | Check whether the first one went through. |
processing_error |
The processor failed. | Try again. |
try_again_later |
The issuer is temporarily unavailable. | Try again later. |
Address verification (AVS)
response.avs_code is the gateway’s raw code and response.avs_result the normalized result:
avs_result |
Meaning |
|---|---|
match |
Street and postal code match. |
street_only |
The street matches, the postal code does not. |
postal_only |
The postal code matches, the street does not. |
no_match |
Neither matches. |
unavailable |
The issuer could not check. |
not_checked |
No address was sent, or the gateway did not check. |
Security code (CVV)
cvv_result |
Meaning |
|---|---|
match |
The security code matches. |
no_match |
It does not match. |
unavailable |
The issuer did not check it. |
not_checked |
No security code was sent, as for merchant-initiated charges. |
Most issuers approve charges even when AVS or CVV do not match; the result is information for you. If your policy is stricter, void the authorization when the results are not acceptable. The card keeps its last results in checks so you can see them without opening transactions.
