Skip to main content
When a payment fails at the provider (the issuer, the acquirer, or the gateway between them), Yuno wraps the failure in its standard error envelope and surfaces the provider’s raw response so you can inspect it.

How provider errors are returned

Errors that originate downstream are returned with a PROVIDER_* prefixed code in the standard error envelope, and the provider’s raw text in messages.
{
  "code": "PROVIDER_INVALID_REQUEST",
  "messages": [
    "Insufficient funds (provider response code 51)"
  ]
}
The full set of PROVIDER_* codes is documented in Error codes. Common ones include PROVIDER_INVALID_REQUEST, PROVIDER_REQUEST_TIMEOUT, PROVIDER_PAYMENT_NOT_FOUND, PROVIDER_INVALID_AMOUNT, PROVIDER_COUNTRY_NOT_SUPPORTED, PROVIDER_CURRENCY_NOT_ALLOWED, and PROVIDER_UNAVAILABLE_PAYMENT_METHOD. For card payments that the issuer declined, retrieve the payment with Get Payment and inspect the transaction history. Each transaction includes the provider’s raw response, including the ISO 8583 decline code.

Soft vs hard declines

Whether you should retry a card decline depends on the type of decline. Soft declines may resolve on their own. Hard declines will not.
TypeDescriptionRetry?Examples
Soft declineTemporary issue that may resolve.Yes, with backoff and a sensible attempt cap.Insufficient funds, issuer timeout, network error.
Hard declinePermanent issue that will not resolve on retry.No. Surface to the customer.Invalid card number, stolen card, closed account.
Retrying hard declines wastes processing capacity and can trigger card network fraud rules. Always classify the decline type before deciding to retry.

Common ISO 8583 decline codes

These are standard codes returned by card issuers and surfaced by every major acquirer. Yuno passes them through verbatim in the transaction response.

Card declines

CodeDescriptionTypeRecommended action
01Refer to issuerSoftAsk the customer to contact their bank.
02Refer to issuer (special)SoftAsk the customer to contact their bank.
04Pick up cardHardDo not retry. Card reported lost or stolen.
05Do not honorSoftRetry once. If it fails, ask for an alternate method.
12Invalid transactionHardVerify transaction parameters.
13Invalid amountHardCheck amount format and provider limits.
14Invalid card numberHardAsk the customer to re enter card details.
41Lost cardHardDo not retry.
43Stolen cardHardDo not retry.
51Insufficient fundsSoftInform the customer. Suggest a lower amount or retry later.
54Expired cardHardAsk the customer for a valid card.
55Incorrect PINSoftAsk the customer to re enter the PIN.
57Transaction not permittedHardCard type is not allowed for this transaction.
61Exceeds withdrawal limitSoftSuggest a lower amount or retry the next day.
65Activity count limit exceededSoftRetry later.

Network and gateway issues

CodeDescriptionTypeRecommended action
91Issuer unavailableSoftRetry with exponential backoff.
96System malfunctionSoftRetry after a short delay.
For non card methods (PIX, Boleto, OXXO, PSE, SEPA DD, ACH DD, and others), providers do not use ISO 8583 codes. The Yuno code will still be a PROVIDER_* value and the provider’s raw text will be in messages. Inspect the message for the provider specific reason.

MCC restrictions

Some declines relate to the Merchant Category Code (MCC) on your account.
ScenarioCauseResolution
”Transaction not permitted” for specific card typesMCC restriction by issuerContact Yuno support to verify MCC assignment.
High decline rates for certain countriesMCC flagged for risk in that regionReview with the provider.
Recurring payment declinesMCC not enabled for recurringUpdate MCC configuration.

Retry strategy

1

Classify the decline

Read the ISO 8583 code (cards) or the provider message (non card) and decide if it is soft or hard using the tables above.
2

For a soft decline, retry with backoff

Use exponential backoff with full jitter. Cap retries at 3 attempts. Do not retry faster than every 1 s.
const SOFT_DECLINES = new Set(["01", "02", "05", "51", "55", "61", "65", "91", "96"]);

if (SOFT_DECLINES.has(providerResponseCode)) {
  // Retry with exponential backoff and full jitter, max 3 attempts.
}
3

For a hard decline, do not retry

Surface a clear message to the customer and offer an alternate payment method.
Card networks impose retry limits. Mastercard allows up to 10 retries per card per 24 hours. Visa allows up to 15 retries per card per 30 days. Exceeding these limits can result in fines from the network. Track your per card retry counts.

Escalating provider issues

If you encounter persistent provider errors that are not listed here, open a support ticket with:
  • The Yuno payment_id and the response x-trace-id header.
  • The provider name and the raw response code or message.
  • Timestamp and frequency.