> For the complete documentation index, see [llms.txt](https://help.flycode.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.flycode.com/decline-codes-explained/where-to-find-decline-codes-and-how-to-use-them.md).

# Where to Find Decline Codes (and How to Use Them)

Where decline codes appear in the Stripe Dashboard, API and webhooks and in FlyCode, whether codes are the same across processors, and which Stripe test cards trigger specific declines.

Decline codes are only useful if you can see them, trust them across processors, and test how your recovery flow reacts to each one. This page covers where the code lives in Stripe and FlyCode, how codes differ between processors, and how to simulate declines safely in test mode.

## Where can I see decline codes in Stripe and FlyCode?

In Stripe, every failed PaymentIntent, Charge and Invoice carries the code inside the last payment error: `last_payment_error.decline_code` on a PaymentIntent, `outcome.reason` and `failure_code` on a Charge, and the linked payment error on an Invoice. In the Stripe Dashboard, open the payment and look at the "Decline reason" in the timeline. The same code is delivered in real time through webhooks such as `invoice.payment_failed`, `payment_intent.payment_failed` and `charge.failed`, which is how tools like FlyCode act on it the moment it happens.

In FlyCode, each failed invoice in recovery shows the original decline code, the soft or hard classification, the retry schedule the model chose and the outcome of each attempt. Decline code distribution is also broken out in reporting, so you can see, for example, what share of your failures are `insufficient_funds` versus `do_not_honor` and how recovery differs between them.

## Are decline codes the same across all payment processors?

No. The underlying issuer response codes are standardized by the card networks (ISO 8583, for example `05` Do Not Honor and `51` Insufficient Funds), but each processor translates them into its own vocabulary and may add gateway-specific aliases. Stripe returns `insufficient_funds`; Adyen returns `Refused: 51 Insufficient Funds`; Braintree returns a numeric processor response such as `2001`. Some processors also collapse several issuer reasons into a single generic code.

Stripe maps aliases back to a canonical list, and FlyCode normalizes codes from every supported processor (Stripe, Braintree, PayPal, Shopify subscription apps and others) into one classification so the same retry logic applies regardless of where the charge was processed. The [flycode.com decline codes reference](https://www.flycode.com/stripe/decline-codes) lists Stripe codes alongside their network equivalents.

## Can I simulate decline codes in Stripe Test Mode?

Yes. Stripe provides test card numbers that trigger a specific decline every time, so you can verify how your billing flow, dunning emails and FlyCode configuration respond before going live.

| Test card number    | Decline code triggered | Type |
| ------------------- | ---------------------- | ---- |
| 4000 0000 0000 9995 | `insufficient_funds`   | Soft |
| 4000 0000 0000 0002 | `generic_decline`      | Soft |
| 4000 0000 0000 9987 | `lost_card`            | Hard |
| 4000 0000 0000 9979 | `stolen_card`          | Hard |
| 4000 0000 0000 0127 | `incorrect_cvc`        | Hard |
| 4000 0000 0000 0119 | `processing_error`     | Soft |

Use any future expiry date and any three-digit CVC. Stripe also offers cards that succeed on the first charge and fail on later renewals, which is the most realistic way to test subscription recovery end to end. The full list is in Stripe's testing documentation.

## Related

* [What Decline Codes Tell You](https://help.flycode.com/decline-codes-explained/what-decline-codes-tell-you)
* [How does FlyCode connect to my Stripe account?](https://help.flycode.com/flycode-and-stripe/connecting-flycode-to-stripe)
* [Stripe integration guide for FlyCode](https://docs.flycode.com/docs/integrations/stripe-integration-guide-for-flycode)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.flycode.com/decline-codes-explained/where-to-find-decline-codes-and-how-to-use-them.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
