Skip to main content

What are advised actions and advice codes?

When you create a payment via Primer, the request is sent to your chosen processor based on your payment workflows. If the payment is not successful, some processors surface the advice code from the underlying payment method or card networks (e.g. Mastercard’s Merchant Advice Code), enabling you to identify the best course of action for this transaction. Where possible, Primer exposes this underlying advice code, and maps it to a unified advice action so that you can reason about them in a single way across all your payments.

Why are advised actions important?

The advised actions and underlying advice codes can be used to determine:
  • Whether the payment can be safely retried
    Some card networks such as Visa/Mastercard charges additional fees whenever the retry limit is exceeded
  • The best course of action to maximize the chances of recovery
    e.g. Retry now, retry later, or use another payment method

Primer’s unified advised action

Whenever possible, Primer exposes the unified advised action through this field: Here are all the valid values for the unified advised action: These fields are returned in the output of the Payments App in Workflows, as well as the API response and the payment status webhook. For example:
JSON

Payment method advice code

Where possible, Primer also exposes the advice code and message from the payment method or card network. These are unified across all processors to facilitate analysis on all your payments. These fields are returned in the output of the Payments App in Workflows, as well as the API response and the payment status webhook. For example:
JSON

Supported card networks and processors

The unified advised action and raw advice code are available for the following card networks: And for the following processors:
  • Stripe
  • Braintree
  • Adyen
Please reach out to us directly via our Service Desk if you need support for additional card networks, payment methods, or processors.

Card network advice codes

Mastercard Merchant Advice Code (MAC)

Merchant Advice Codes (MACs) were introduced by Mastercard to recommend the best course of action to take for each declined payment. Here is the list of MACs, with how they map to Primer’s advised action:
Mastercard charges Transaction Processing Excellence (TPA) fees:
  • If the number of authorization attempts on a single card exceed 10 in 24 hours and 35 in 30 days
  • Whenever a merchant retries a payment declined with the MAC 03: Do not try again or 21: Stop recurring payment requests within a 30-day period

Visa decline category codes

Unlike Mastercard and their MAC, Visa does not expose a dedicated advice code. Instead, Visa categorizes their decline code into four categories, each with their overarching advice. Primer exposes the category code ("1" to "4") as the advice code.

Category 1 - Issuer will never approve

The issuer declined the payment and will never approve a retry. This happens, for instance, when the card number is invalid, or the account is closed.
You are not allowed to retry the payment:
  • Visa charges Excessive Retry Fees for each retry.
  • Visa charges an additional Stop Payment Service (SPS) fee of €1 per retry after receiving a revocation of authorization (R0, R1, or R3).

Category 2 - Issuer cannot approve at this time

The issuer declined the payment but may approve it at a later date. This happens, for instance, when the card has insufficient funds or is temporarily restricted.
You can retry the payment up to 15 times in a 30-day window:
  • Once the limit is exceeded, Visa charges Excessive Retry Fees for each subsequent attempt.

Category 3 - Issuer cannot approve with these details

The issuer declined the payment because the card details were missing or out-of-date. This happens, for instance, when the card’s CVV or expiry date is missing.
You can retry the payment up to 15 times in a 30-day window:
  • Once the limit is exceeded, Visa charges Excessive Retry Fees for each subsequent attempt.
  • Visa also charges Data Quality Fee if the number of attempts exceed 25,000 transactions.

Category 4 - Generic response codes

This issuer declined the payment, but the decline reason does not belong to any other category.
You can retry the payment up to 15 times in a 30-day window:
  • Once the limit is exceeded, Visa charges Excessive Retry Fees for each subsequent attempt.