Skip to main content

What are decline 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, the processor will return decline fields outlining why the payment was unsuccessful. There are different reasons for payments being declined, such as:
  • Technical issues with the processor or payment method
  • Processor rejects the payment (typically due to fraud prevention rules)
  • Issuing bank declines the payment
Each processor has a very different way of responding and handling decline codes, which is where Primer comes in. We abstract this complexity and unify all the different decline code mappings into a single, standardized way of reasoning about declined payments.

Why are decline codes important?

Understanding why a payment is not authorized is crucial, serving as a key communication tool between payment systems, issuers, merchants and end customers. They offer clarity and guidance when your payments encounter issues, enabling you to devise a strategy to achieve:
  • Enhanced customer experience - understanding the specific reason can help cardholders take appropriate action
  • Improved fraud prevention - help protect cardholders from unauthorized charges and your business from chargeback fees
  • Boost payment success - optimize your authorization rates by analyzing decline reasons and identifying areas of improvement

Decline codes on Primer

Below are the fields you need to consider when evaluating why a payment wasn’t successful:
What is the difference between the payment and transaction fields?A Primer payment can have multiple processor transactions.
  • The payment fields represent the latest/final values
  • The transaction fields represent the values for that specific processor transaction
These fields are returned in the API response, as well as being included in the payment status webhook. For example:
JSON

Payment Status

There are three possible payment statuses for unsuccessful payments:

Decision Type

There are four possible decision types behind why a payment is unsuccessful:

Decline Reason

This should only populated when decision type is ISSUER_DECLINED. Below are the decline reasons for hard declines: Below are the decline reasons for soft declines:

Decline Types

There are two types of issuer declines:
This logic is now superseeded by Primer’s unified advised action, which gives you a finer understanding of how to handle each payment.

Error Message

This is the error message provided by the processor so this does not have a predefined set of possible values. This can give extra information that’s useful when determining what’s the best action to pursue.

Underlying decline codes

Primer exposes the underlying decline codes for selected payment methods, card networks, and processors to enable you to analyze them in a unified way. Head over to the Payment method decline codes guide to learn more.

Advised actions

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. Head over to the Advised actions guide to learn more.

How decline codes are used within Primer’s ecosystem

Decline codes can be used in different ways to drive your payments strategy:
  • Create automated flows in Workflows to handle these scenarios, such as sending an automated email to the customer for every decline due to insufficient funds - learn more here
  • View aggregated data insights on all your declines in Observability to help identify broader trends and areas of improvement/focus - learn more here
  • Our Fallbacks feature is only triggered for certain decline scenarios - learn more here
  • Our Adaptive 3DS feature is only triggered for certain decline scenarios - learn more here
  • Create Monitors on Primer to track decline reasons, so you’re always alerted to changes in processor responses - learn more here