> 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/ai-payment-recovery.md).

# AI Payment Recovery

How FlyCode's AI payment recovery works: which decline codes are treated as hard declines, what happens to them, backup payment methods, credential updates, and how recovery emails are timed and deliv

FlyCode's recovery engine treats every failed payment differently depending on why it failed. Soft declines get machine-learning retry timing; hard declines skip retries and go to a backup payment method or fast, specific outreach; emails are sent only when they will help and from infrastructure built for deliverability. None of it requires changes to your billing stack. This collection covers the hard-decline and backup logic and the email behaviour.

{% hint style="info" %}
**Quick answer:** FlyCode never retries a card the issuer has permanently declined. It charges another card on file instead, refreshes replaced cards through Card Account Updater and Network Tokens, and only emails customers when a retry cannot fix the problem, at their local time, from your domain, with a 95-plus sender score.
{% endhint %}

## In this section

* [Hard Declines & Backup Logic](https://help.flycode.com/ai-payment-recovery/hard-declines-and-backup-logic): which codes are hard declines, what FlyCode does with them, automatic updates for replaced cards, and backup payment methods.
* [Email Behavior & Deliverability](https://help.flycode.com/ai-payment-recovery/email-behavior-and-deliverability): when emails are sent and how deliverability stays high.

## Related

* [When and How Payments Are Retried](https://help.flycode.com/handling-failed-payments/when-and-how-payments-are-retried)
* [Decline Codes Explained](https://help.flycode.com/decline-codes-explained)
* [Stripe integration guide for FlyCode](https://docs.flycode.com/docs/integrations/stripe-integration-guide-for-flycode)
* [Card network retry rules for failed payments](https://docs.flycode.com/docs/read-more/card-network-retry-rules-for-failed-payments-visa-and-mastercard)
* [Stripe decline codes reference](https://www.flycode.com/stripe/decline-codes)


---

# 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/ai-payment-recovery.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.
