Skip to main content

Failure Codes Reference

When a payment fails, Uplef sends a payment.failed webhook with a failureCode and failureReason. These codes follow a unified 5-digit format regardless of which underlying payment processor handled the transaction.

Code Categories​

PrefixCategoryMeaning
10xxxApprovedPayment succeeded (you'll see this in payment.success, not payment.failed)
20xxxSoft declineTemporary issue — customer can usually retry with the same card
30xxxHard declinePermanent issue with the card — do not retry
40xxxRiskBlocked by risk engine or compliance
Hard vs soft declines

A 20xxx code means "try again." A 30xxx code means "this card cannot be used — block it permanently or ask for a different card." Auto-retrying a hard decline can result in chargebacks or scheme fees.

Soft Declines (20xxx)​

These represent temporary issues. The customer may retry with the same card after addressing the issue (e.g., add funds, retry CVV, complete 3DS).

CodeMessage
20001Refer to card issuer
20002Refer to card issuer — special condition
20003Invalid merchant
20005Declined by issuer
20006Gateway error
20009Transaction pending
20012Invalid transaction
20013Invalid amount
20014Invalid card number
20017Customer cancelled
20019Re-enter transaction
20020Acquirer unavailable
20025Card record not found
20030Format error
20039No credit account
20040Function not supported
20051Insufficient funds
20052No cheque account
20053No savings account
20054Card expired
20055Incorrect PIN or security code
20056Unknown card
20057Transaction not permitted on this card
20058Transaction not permitted on this terminal
20059Suspected fraud — declined
20061Withdrawal limit exceeded
20062Restricted card
20063Security violation
20064Amount exceeds pre-authorized total
20065Withdrawal frequency exceeded
20068Issuer response timed out
20070Contact card issuer
20071PIN not changed
20072Card not yet activated
20075PIN attempts exceeded
20078Card blocked — first use
20079Card lifecycle issue
20082No security model
20083No accounts available
20091Issuer unavailable
20092Routing failed
20093Transaction prohibited by law
20094Duplicate transaction
20096System malfunction
20099Other — declined

3D Secure (3DS)​

CodeMessage
201503D Secure not enrolled
201513D Secure authentication failed
201523D Secure session timed out
201533D Secure system error
201543D Secure authentication required
201593D Secure ACS malfunction

Special codes​

CodeMessage
200N7CVV check failed
200N3Cashback service unavailable
200N4Cashback amount exceeded
200P1Over daily limit
200P9Limit exceeded — try a smaller amount
200R1Issuer stop payment
200R3Issuer revoked authorization
2005CCard not supported by issuer
2009GBlocked by cardholder

Issuer policy / lifecycle​

CodeMessage
20179Card lifecycle — issuer declined
20182Issuer policy decline
20183Issuer security decline
20184Issuer lifecycle decline

Hard Declines (30xxx)​

Do not retry these cards. Block them in your system to avoid further declines or chargebacks.

CodeMessage
30004Card flagged for pickup
30007Card flagged for pickup — special
30015Invalid card issuer
30033Card expired — flagged for pickup
30034Suspected fraud — flagged for pickup
30035Contact acquirer — pickup
30036Restricted card — pickup
30037Security flag — pickup
30038PIN attempts exceeded — pickup
30041Lost card — do not retry
30043Stolen card — do not retry
30044Transaction rejected — compliance (AMLD5)

Risk Responses (40xxx)​

These come from Uplef's or the gateway's risk engine, not the cardholder's bank.

CodeMessage
40101Blocked by risk engine
40102Country not supported
40104CVV missing or invalid
40111Address verification failed
43201Card on decline list
function handlePaymentFailed(data) {
const code = data.failureCode;
const family = code.substring(0, 2);

if (family === '20') {
// Soft decline — customer can retry
showRetryPrompt(data.failureReason);
} else if (family === '30') {
// Hard decline — block this card permanently
blockCard(data.gatewayPaymentId);
showUseDifferentCardPrompt();
} else if (family === '40') {
// Risk block — review manually
flagForReview(data.transactionId);
}

// Code-specific actions
switch (code) {
case '20051':
// Insufficient funds — suggest different card
break;
case '20151':
// 3DS failed — suggest retry with proper OTP entry
break;
case '20054':
case '30033':
// Expired card
promptUpdateCard();
break;
}
}

Need More Detail?​

If you need the underlying gateway's raw response code for a specific transaction (e.g., for reconciling with the gateway's dashboard), contact Uplef support with the transactionId. We preserve the raw gateway response internally.