Skip to Content
Docs

Mastercard merchant advice codes

Reference for Mastercard Merchant Advice Codes (MAC) returned in charge and hold responses, with retry guidance for each code.

When a Mastercard transaction is approved or declined, the issuing bank can return a Merchant Advice Code (MAC) alongside the response. These codes tell you why a payment failed and whether to retry it, helping you avoid unnecessary retries that can trigger Mastercard penalty fees.

Advice codes reference

Each Merchant Advice Code maps to a recommended action.

CodeDescriptionRecommended action
01 New account information availableThe customer's account information has changed, for example a new expiration date for an expired card.Get the updated card information via Account Updater or reach out directly to the customer.
02 Cannot approve at this timeThe card has reached its credit limit, or there are insufficient funds.Retry the payment after 72 hours.
03 Do not try againThe account is closed, or the issuer suspects fraud.Do not retry this payment. Retries can be subject to penalty fees by Mastercard. Consider reaching out directly to the customer.
04 Token requirements not fulfilledThere is a technical issue with the payment token.Contact the Pay.com support team.
21 Payment cancellationThe customer canceled the recurring agreement with their issuer.Do not retry this payment. Retries can be subject to penalty fees by Mastercard.
24 Retry after 1 hourInsufficient funds.Retry the payment after 1 hour.
25 Retry after 24 hoursInsufficient funds.Retry the payment after 24 hours.
26 Retry after 2 daysInsufficient funds.Retry the payment after 2 days.
27 Retry after 4 daysInsufficient funds.Retry the payment after 4 days.
28 Retry after 6 daysInsufficient funds.Retry the payment after 6 days.
29 Retry after 8 daysInsufficient funds.Retry the payment after 8 days.
30 Retry after 10 daysInsufficient funds.Retry the payment after 10 days.
40 Consumer non-reloadable prepaid cardThe issuer identified a consumer non-reloadable prepaid card for this transaction.No action required. This is informational only.
41 Consumer single-use virtual card numberThe issuer identified a consumer single-use virtual card for this transaction.No action required. This is informational only.

Mastercard enforces penalty fees for merchants who repeatedly retry transactions flagged with codes 03 or 21. Always check the advice code before scheduling a retry.

Example response

When a charge is declined with a Mastercard advice code, the code is in the underlying_network_details object. The decline itself returns HTTP 400. Retrieving the charge afterward returns this object:

{
  "id": "chrg_685125114794084352",
  "resource": "charge",
  "amount": 8000,
  "currency": "usd",
  "status": "failed",
  "underlying_network_details": {
    "network": "mastercard",
    "mastercard": {
      "advice_code": "02"
    }
  },
  "payment_method_details": {
    "card": {
      "brand": "mastercard",
      "last4": "5678",
      "exp_month": "06",
      "exp_year": "2027",
      "funding": "credit",
      "network": "mastercard"
    },
    "type": "card"
  },
  "test_mode": true
}

In this example, advice code 02 indicates the card has insufficient funds or has reached its credit limit. The recommended action is to retry the payment after 72 hours.

Next steps

Use advice codes alongside the rest of your decline handling.

  • Errors: understand the full error response structure, error types, and error codes.
  • Create a charge: move funds from a customer to a merchant account with the API.
  • Webhook events: listen for charge.failed events to programmatically handle declined payments.
Was this page helpful?