Skip to main content

Decline codes

When a payment, refund or payout fails, the object in the webhook event carries a failure field with a stable dpay code. The code is shared by all payment methods, so one piece of logic handles a BLIK, card or bank transfer decline. The original provider code comes alongside, for diagnostics.

Decline codes and error codes

Error codes are API responses to an invalid request, returned immediately. Decline codes describe why a payment, refund or payout did not go through - they arrive in the payment.failed, refund.failed and payout.failed events.

The failure object​

"failure": {
"code": "insufficient_funds",
"message": "Insufficient funds",
"category": "customer",
"retryable": true,
"provider_code": "INSUFFICIENT_FUNDS"
}
FieldDescription
codedpay decline code from the table below. Base your logic on it.
messageA short description in English - for logs and your team. Show the customer your own message.
categoryWho can remove the cause: customer, merchant, risk or system.
retryabletrue when retrying the same payment may succeed.
provider_codeThe provider code (BLIK, card processor, bank) or null. For diagnostics only - the list of provider codes changes.

In events that are not declines, failure is null.

Categories​

CategoryMeaningWhat to do
customerThe cause is on the customer's side: funds, limit, code, bank, card.Tell the customer and offer a retry or another payment method.
merchantThe cause is on your side: the request, recurring payment terms, the refund deadline or amount.Fix the request or the data - a retry alone will not help.
riskDeclined for security reasons.Do not retry automatically and do not give the customer details.
systemA temporary error at the bank, the provider or dpay.Retry later.

Retry (retryable)​

retryable: true means that the same payment may succeed on another attempt - e.g. when the customer tops up the account, enters a new BLIK code or confirms the payment in time. With false, a retry without a change (another card, another method, a corrected request) will not succeed.

For recurring payment charges, retry automatically only declines with retryable: true and with a reasonable interval. Declines with retryable: false require contacting the customer.

Code table​

CodeCategoryRetryMeaning
insufficient_fundscustomeryesInsufficient funds on the account or card.
limit_exceededcustomeryesThe customer's limit was exceeded - amount or number of transactions.
customer_declinedcustomeryesThe customer declined the payment, e.g. in the banking app.
customer_timeoutcustomeryesThe customer did not confirm the payment in time.
invalid_codecustomeryesInvalid, expired or already used code (e.g. BLIK).
expiredcustomeryesThe payment was not paid within 7 days.
app_update_requiredcustomeryesThe customer needs to update the banking app.
issuer_declinedcustomernoDeclined by the bank or card issuer, also for a closed or blocked account.
card_invalidcustomernoInvalid or expired card.
authentication_requiredcustomernoStrong customer authentication (3-D Secure) failed.
alias_invalidcustomernoThe saved payment alias (BLIK OneClick, recurring payment) is no longer valid.
unsupported_by_bankcustomernoThe customer's bank does not support this type of payment.
generic_declinecustomernoDeclined without a more specific reason. Every new or unknown provider code also gets it - you will see that code in provider_code.
security_declinedrisknoDeclined for security reasons, e.g. by an anti-fraud system or because the card was reported lost.
blockedrisknoCode payments temporarily blocked after a series of invalid codes.
recurring_conditions_not_metmerchantnoThe charge does not meet the recurring payment terms, e.g. the amount exceeds the limit.
invalid_requestmerchantnoInvalid request, e.g. the alias already exists, a wrong account number or recurring payments not enabled for the service.
refund_window_expiredmerchantnoThe refund period has expired.
refund_amount_exceededmerchantnoThe refund exceeds the refundable amount.
payout_failedmerchantnoThe payout could not be completed (see Payouts).
refund_failedsystemnoThe refund could not be completed.
processing_errorsystemyesA temporary processing error at the bank, the provider or dpay.
New codes

The list of codes may grow. Handle an unknown code based on category and retryable, the same way as generic_decline.

Provider code mapping​

provider_code carries the original provider code. Below are the codes we translate into dpay codes. A code outside these tables (also from other providers, e.g. for online bank transfers) results in generic_decline with that code in provider_code.

BLIK​

dpay codeBLIK codes
insufficient_fundsINSUFFICIENT_FUNDS
limit_exceededLIMIT_EXCEEDED, LOW_LIMIT, LIMIT_LOCKED
customer_declinedUSER_DECLINED
customer_timeoutTIMEOUT, USER_TIMEOUT, AM_TIMEOUT, LONG_TIMEOUT
invalid_codeBAD_PIN, ER_WRONG_TICKET, ER_TIC_EXPIRED, ER_TIC_USED
app_update_requiredOLD_APK_VERSION
issuer_declinedISSUER_DECLINED, ACCOUNT_CLOSED, ACCOUNT_DISABLED, BLIKL_DECLINED, LIMIT_NOT_APPROVED, LIMIT_IN_OTHER_BANK, LIMIT_ALREADY_ACTIVE, TFR_REJECTED
alias_invalidALIAS_DECLINED, ALIAS_NOT_FOUND, ALIAS_APP_NOT_FOUND, ALIAS_EXPIRED, ALIAS_NOT_AVAILABLE
unsupported_by_bankOFFUS_NOT_ALLOWED, TXTYPE_USR_UNHANDLED, BLIK-L_NOTSUPPORTED, SPLITPAYMENT_UNHANDL
security_declinedSEC_DECLINED, TAS_DECLINED, SENDER_BLOCKED, SENDER_UNKNOWN, WRONG_DEVLOC_DATA, PEP_VERIFICATION, PESEL_RESTRICTED
blockedTOO_MANY_TRIES
recurring_conditions_not_metAUTOCONF_REQ_NOT_MET, AMOUNT_LIMIT_EXCEEDED
invalid_requestALIAS_ALR_EXISTS, BAD_IBAN, RECURRING_NOT_ENABLED, ALIAS_APP_AMBIGUOUS
refund_window_expiredRET_LATE, TFR_LATE
refund_amount_exceededRET_AMT_EXCEEDED
processing_errorSYSTEM_ERROR, GENERAL_ERROR, ISS_OUTOFSERVICE, PESEL_SERVICE_FAILED, TX_NOTFOUND, TFR_NOT_POSSIBLE, INTERNAL_ERROR

Cards (ISO 8583)​

Card codeMeaningdpay code
51Insufficient fundsinsufficient_funds
61Amount limit exceededlimit_exceeded
65Transaction count limit exceededlimit_exceeded
05Do not honorissuer_declined
46Closed accountissuer_declined
57Transaction not permitted to cardholderissuer_declined
62Restricted cardissuer_declined
14Invalid card numbercard_invalid
54Expired cardcard_invalid
04Pick up cardsecurity_declined
41Lost cardsecurity_declined
43Stolen cardsecurity_declined
59Suspected fraudsecurity_declined
03Invalid merchantinvalid_request
12Invalid transactioninvalid_request
13Invalid amountinvalid_request
30Format errorinvalid_request
58Transaction not permitted to terminalinvalid_request
91Issuer unavailableprocessing_error
96System malfunctionprocessing_error

dpay codes​

CodeMeaningdpay code
SCA_REJECTEDStrong customer authentication (3-D Secure) rejectedauthentication_required
WRONG_TICKET_BLOCKEDBLIK code payments temporarily blocked after a series of invalid codesblocked

Payouts​

A rejected payout (payout.failed) always has the payout_failed code, and provider_code tells what happened to the funds:

provider_codeMeaning
refunded_to_dpayThe funds went back to the account balance at dpay.
refunded_to_nrbThe funds were returned to the bank account.
frozenThe funds are frozen.
blockedThe funds are blocked.
nullNo additional information.

Contact dpay support for the details of a rejected payout.