Browse the docs

Agent setup guide

Failed Payment Recovery

On each failed Stripe invoice payment, emails a friendly reminder matched to the attempt and decline reason, with the payment link.

Available About 12 min to set up

What it does

On each failed Stripe invoice payment, emails a friendly reminder matched to the attempt and decline reason, with the payment link.

  • Starts the moment Stripe fails to collect an invoice (instant Stripe webhook, added to your account when you activate).
  • Reads the customer's latest payment attempts in Stripe to find the decline reason (insufficient funds, expired card, authentication needed…).
  • AI drafts an email matched to the attempt number and the reason — friendly at first, clear on the final attempt — with the invoice's payment page link and the next retry date, stating only consequences you've described.
  • Final-attempt emails always wait for approval in Reviews (earlier ones too, if you choose); the rest are emailed right away with replies going to your billing inbox.
  • Failures at or above your big-account amount are posted to your Slack channel.

What it needs

  • A paid plan (agents run live on paid plans).
  • An AI provider key (Settings → AI Providers).
  • Stripe (a key that can read events and payments and add webhook endpoints) and Slack, connected in Settings → Integrations.
  • Invoices with a customer email (Stripe Billing or Invoicing).

What it doesn't do

  • It never retries charges, pauses service, cancels or changes subscriptions — Stripe's own retry schedule and your team handle that.
  • It doesn't send Stripe's own reminder emails or change your Stripe settings.
  • It handles failed invoice payments only (not one-off checkout or payment-link failures).

Availability and plans

Available

Its workflow is built and tested, and every app it needs is live. You can get it and set it up now.

Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.

Before you start

  • A paid plan: agents run live, and the Free plan only runs Dry Runs.
  • An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
  • These apps, connected in Settings → Integrations: Stripe and Slack.
  • The app it watches, connected in Settings → Integrations (the agent starts from an app event).
  • About 12 minutes.

Set it up step by step

Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.

1. Connect your AI provider

The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.

2. Connect Stripe

Connect Stripe (Settings → Integrations → Stripe) with a restricted key that can read events and payments and write webhook endpoints.

3. Connect Slack

Connect the Slack workspace your team uses (Settings → Integrations → Slack).

4. Describe your billing

Open “Draft the dunning email” and replace the placeholder with your signer, consequences, big-account amount and approval choice.

SettingWhat to enterIn step
Your billing details and approvalsReplace the placeholder in “Draft the dunning email” with your company name and signer, what happens if payment isn't made (only what's true), the amount that counts as a big account, and whether earlier emails need approval. It starts as “[DESCRIBE YOUR BILLING: COMPANY NAME, SIGNER, WHAT HAPPENS IF PAYMENT ISN'T MADE, THE BIG-ACCOUNT AMOUNT AND WHETHER EARLIER EMAILS NEED APPROVAL HERE]” until you replace it.“Draft the dunning email”

5. Pick your Stripe account

Pick your Stripe account on the trigger and on “Read the latest payment attempts”.

SettingWhat to enterIn step
Stripe account (failed payments)The Stripe account whose failed invoice payments start this agent. The key needs Events: Read and Webhook Endpoints: Write. Pick your connected Stripe account.“Invoice payment failed (Stripe)”
Stripe account (payment attempts)The Stripe account payment attempts are read from (the same account). Pick your connected Stripe account.“Read the latest payment attempts”

6. Add your billing email address

Open “Email the customer” and enter the address customers should reply to.

SettingWhat to enterIn step
Your billing email addressCustomers' replies come back to this address (Reply-to).“Email the customer”

7. Pick the Slack account and channel

Open “Alert the team in Slack” and pick your account and channel. Invite the app to private channels first (/invite @Fluxo Flow).

SettingWhat to enterIn step
Slack accountThe Slack workspace big-account alerts are posted to. Pick your connected Slack account.“Alert the team in Slack”
Channel for big-account alertsPick the channel your billing or account team watches, e.g. #billing.“Alert the team in Slack”

8. Test it with Dry Run

Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.

9. Switch the trigger on

Open the trigger and activate it: Fluxo Flow adds a webhook endpoint to your Stripe account for failed invoice payments.

How it works

The agent is a normal workflow with 9 steps (1 AI step, with a person approving in Reviews). You can open, edit and monitor it like any other workflow.

  • Invoice payment failed (Stripe) — Starts on “Invoice payment failed (instant)” in Stripe (an app event). Starts the moment Stripe fails to collect an invoice (a declined card, a failed automatic retry or no saved payment method). Fluxo Flow adds the webhook to your Stripe account.
  • Read the latest payment attempts — Stripe: List payments. Lists the customer's most recent payments in Stripe to find the decline reason of the failed attempt.
  • Draft the dunning email — AI step (runs on your AI provider key). AI writes a friendly email matched to the attempt number and the decline reason, with the invoice's payment page, and decides whether it needs approval and whether the account is big enough to alert the team.
  • Needs approval? — Decision: picks the branch to follow. Final-attempt emails (and earlier ones, if your billing settings say so) wait for approval; the rest are sent right away.
  • Approve the final reminder — A person approves or rejects it in Reviews (the run waits). Branch: Needs approval. A teammate checks the email in Reviews, edits it if needed and approves it.
  • Email the customer — Sends an email from your workspace's sender. Branch: Approved / Send now. Sends the email with the payment page link, with replies going to your billing inbox.
  • Big account? — Decision: picks the branch to follow. Failures on accounts at or above your big-account amount are posted to Slack.
  • Alert the team in Slack — Slack: Post a message. Branch: Big account. Posts the customer, amount, attempt, reason and payment link to your billing channel.
  • No alert needed — Kept in the run history. Branch: Smaller account. Below your big-account amount; the run history keeps it.

Test it with Dry Run

Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live. The sample has the same shape as a real event from the app.

Sample data fields

event_id, livemode, invoice, number, status, amount_due, amount_remaining, currency, attempt_count, next_payment_attempt, billing_reason, customer, customer_email, customer_name, subscription, hosted_invoice_url, invoice_pdf, raw.

  • Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
  • Approval steps use the Dry Run decision you pick in the step's settings (approved, rejected or timeout), so you can try each branch.

Go live

  • Open the trigger and activate it: Fluxo Flow adds a webhook endpoint to your Stripe account for failed invoice payments.
  • Activating the app trigger needs the trigger's connected account. The first check only remembers what's already there, so older items don't start runs; the same item never starts two runs.
  • The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
  • When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.

Questions

Does it retry the charge or pause the subscription?

No. Stripe's own retry schedule keeps running; the agent only emails the customer the payment page and alerts your team. Pausing service or changing a subscription stays with you.

Can I approve every email, not just the final one?

Yes. Say so in your billing settings (e.g. “Earlier emails need approval: yes”) and every email waits in Reviews.

Troubleshooting

  • “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
  • A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
  • An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
  • Slack says the app isn't in the channel: in Slack, type /invite @Fluxo Flow in that channel (always needed for private channels).
  • No runs start: activate the app trigger with a connected account. Only items created after activation start runs.
  • A run shows as paused: it's waiting for someone in Reviews to approve or reject it.
  • A step failed: open the run in History and check that step in the Trace tab for the error and what it received.

Generated from the agent's own workflow, so it always matches what the agent does. Last updated .