Finance
Follow up on every failed payment
When a customer's payment fails, Merlin drafts a friendly follow-up in Gmail and posts the account and the draft in #billing. A person reviews it and sends it.
@Merlin whenever Stripe reports a failed payment, read the invoice and the customer's plan and payment history in Stripe. Draft a short, friendly email in Gmail to the customer's billing email asking them to update their payment method, and don't send it. Post the account, the amount, any earlier failures and the draft here. Don't change anything in Stripe.
- Starts whenStripe sends
invoice.payment_failedto Merlin's webhook when a customer's payment fails Merlin worksClaude Code or Codex reads the invoice and the customer's payment history in Stripe and drafts the email in Gmail
- You getA post in
#billingwith the account, the amount, earlier failures and the draft. A person reviews it and sends it from Gmail.
Tools
- Stripe
- Gmail
- Slack
Capabilities
- Automations
- Integrations
- Your agent's MCP
How it works
From a failed payment to a drafted follow-up in #billing.
When a customer's payment fails, Stripe sends
invoice.payment_failedto Merlin's webhook and the automation starts a run.Claude Code or Codex reads the invoice, the plan and the payment history in Stripe, then drafts a short, friendly email in Gmail. It doesn't send it or change anything in Stripe.
A new post in
#billinghas the account, the amount, earlier failures and the draft. A person reviews it and sends it from Gmail.
When a customer's payment fails, Stripe sends invoice.payment_failed to Merlin's webhook and the automation starts a run.
Claude Code or Codex reads the invoice, the plan and the payment history in Stripe, then drafts a short, friendly email in Gmail. It doesn't send it or change anything in Stripe.
A new post in #billing has the account, the amount, earlier failures and the draft. A person reviews it and sends it from Gmail.
Overview
Agents
Skills
Memory
Automations
Integrations
Settings
Follow up on every failed payment
PauseDetailsRun history
Trigger
Where events come from, the event that starts a run, and the filters it must match.
Run
What Merlin does each time, where it runs, and where the result goes.
whenever Stripe reports a failed payment, read the invoice and the customer's plan and payment history in Stripe. Draft a short, friendly email in Gmail to the customer's billing email asking them to update their payment method, and don't send it. Post the account, the amount, any earlier failures and the draft here. Don't change anything in Stripe.
Before and after
Every failed payment gets a follow-up the same day.
Without Merlin
Someone notices the failed payment email, looks up the account and writes a reminder from scratch.
- 01Notice the failed payment email
- 02Open the invoice
- 03Check the plan and amount
- 04Look for earlier failures
- 05Find the billing email
- 06Write a friendly reminder
- 07Post it in #billing for a look
- 08Send it from Gmail
- 09Check back after the retry
With Merlin
The failure starts the work, and a person only reviews and sends.
- Stripe sends
invoice.payment_failedTo Merlin's Stripe webhook Reads the account and drafts the emailClaude Code with Stripe and Gmail
- The account and the draft in
#billingA person sends it from Gmail
Setup
Send Stripe's failed payment events to Merlin and keep sending in your hands.
Set these up once and every failed payment lands in #billing with a draft waiting. A person still reviews and sends each email.
- 01Connect a machineRuntimeInstall the Merlin desktop app or CLI on a computer running Claude Code or Codex. You can also use a machine a teammate shares with your workspace.
- 02Send Stripe events to MerlinWebhooksAdd Merlin's webhook in Stripe with its setup steps. Nothing starts until its first event arrives.
- 03Add Stripe to your agentYour agent's MCPConnect the Stripe MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
- 04Add Gmail to your agentYour agent's MCPConnect the Gmail MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
- 05Add Merlin to SlackIntegrationsInstall the Slack app and add Merlin to the channel you work in. A private channel needs
/invite @Merlin. - 06Draft from your billing inboxYour agent's MCP
Drafts land in the Gmail account the agent signs in to. Sign the Gmail MCP in to the inbox you send billing email from, on the machine the automation prefers, so the drafts wait where they'll be sent from.
- 07Paste the setup promptAutomationsSend the prompt below to @Merlin in Slack, in the channel it should post to. Merlin creates the automation and tells you what it set up.
Prompt
Have Merlin draft a follow-up for every failed payment with one prompt.
@Merlin whenever Stripe reports a failed payment, read the invoice and the customer's plan and payment history in Stripe. Draft a short, friendly email in Gmail to the customer's billing email asking them to update their payment method, and don't send it. Post the account, the amount, any earlier failures and the draft here. Don't change anything in Stripe.
Once, when you send it
- PromptYou send the prompt to @Merlin
- WebhookYou add Merlin's webhook in Stripe
- AutomationMerlin creates the automation
Every time the event arrives
- EventStripe sends the event
- RuntimeMerlin picks the creator's machine first
- ContextThe run gathers context
- WorkClaude Code or Codex reads Stripe and drafts the email
- ResultMerlin posts the account and the draft in #billing
- SteeringReplies in its thread follow up
Related use cases
More finance tasks you can hand to Merlin.
- AutomationsIntegrationsYour agent's MCP
Finance
Chase overdue invoices every week
Every Tuesday, Merlin sends you the invoices that are past due, with amounts and days late. You get a reminder drafted in Gmail for each, ready for you to review and send.
Every Tuesday at09:00Overdue invoices and drafts in your DM - AutomationsIntegrationsSkillsYour agent's MCP
Finance
Prepare dispute evidence
When a customer disputes a charge, Merlin posts draft evidence, the deadline and a fight-or-accept call in #finance. A person reviews it and submits in Stripe.
Stripe reports a new disputeDraft evidence and a call in#finance - IntegrationsMemoryYour agent's MCP
Finance
Explain how billing works in the product
Ask Merlin how trials, proration or a plan change work today. It reads the billing code and the Stripe prices, then answers with file references and a worked example.
@Merlinin#financeAn explanation with file references
Bring your coding agents into the tools your team already uses.
Let your whole team hand work to Claude Code and Codex today. Connect one machine and add Merlin to Slack, Linear or GitHub. 14-day free trial, no API keys, no card.