Recover failed Stripe payments with WhatsApp via Heyy

When a Stripe payment fails, add the customer to Heyy with the right recovery label so WhatsApp does the dunning, and ping revenue ops in Slack.

Agentic Task
StripeHeyySlackFinanceOperationsNotifications & AlertsData Sync
PromptCreate

Build an agent workflow that turns failed Stripe payments into a labeled WhatsApp recovery flow in Heyy and a structured alert in Slack #revenue-ops. The label-routing judgement is the reason this is an agent, not a code workflow.

Trigger: incoming webhook from Stripe on the invoice.payment_failed event. The agent should also handle charge.failed payloads sent to the same webhook if I forward them.

When the webhook fires, the agent should:

1. Use Stripe Retrieve Customer with the customer id from the event payload to get the customer's name, email, and phone.

2. Use Stripe Retrieve Invoice with the invoice id from the event payload to get the invoice amount due and the attempt count. Skip this step gracefully if the event is a charge.failed without an invoice attached.

3. Decide a recovery label using this judgement: if invoice amount_due is at or above a high-value threshold (default 50000 cents, i.e. $500, expose as a config knob), use payment-failed-high-value. Otherwise, if attempt_count is 1, use payment-failed-soft. If attempt_count is 2 or more, use payment-failed-urgent. The label names should be configurable so I can match the labels I've already set up in Heyy.

4. Use Heyy Create Contact with the customer's phone number (required) and email, attaching the chosen label so my existing Heyy WhatsApp automations pick them up. If the customer has no phone on file in Stripe, skip the Heyy step and note that in the Slack alert.

5. Use Slack Send a Message to post to #revenue-ops with a structured summary: customer name and email, invoice amount in dollars, attempt count, the Heyy label that was applied (or a note that no Heyy contact was created because phone was missing), and a link back to the customer in the Stripe dashboard. Format it as a single readable message so the team can scan and decide whether to escalate.

Configuration knobs to expose: the high-value threshold in cents, the three label names (soft, urgent, high-value), and the Slack channel name.

Error handling: if Stripe Retrieve Customer or Retrieve Invoice fails, still post a degraded Slack alert with whatever information is available from the raw webhook payload so revenue ops is never blind to a failure.

What does this prompt do?

  • Listens for failed payments in Stripe and reacts the moment a charge or invoice fails.
  • Pulls the customer's name, email, and phone from Stripe so the recovery message has the right contact details.
  • Picks a recovery label based on attempt count and invoice size, so first-time misses get a gentle nudge and repeat or high-value failures get the urgent treatment.
  • Adds the customer to Heyy with that label, which kicks off the matching WhatsApp recovery sequence you've already built.
  • Posts a clean summary to your revenue ops Slack channel with the amount, attempt count, customer email, and the label that was applied.

What do I need to use this?

  • A Stripe account with permission to receive failed payment events.
  • A Heyy workspace with WhatsApp set up and recovery labels configured (for example soft, urgent, and high-value).
  • A Slack workspace and the channel where revenue ops should be alerted.

How can I customize it?

  • Change the high-value threshold so larger invoices route to your urgent label instead of the soft one.
  • Rename the labels to match the ones you already use inside Heyy to drive automations.
  • Point the Slack alert at a different channel, or tag specific teammates when the failure is high-value.

FAQs

Why use WhatsApp instead of email for payment recovery?
WhatsApp open rates run around 95 percent, compared to 5 to 12 percent for email dunning. For failed payments, getting the customer to actually see the message is the whole game, and WhatsApp gets read.
Does this send the WhatsApp message itself?
No. This workflow adds the customer to Heyy with the right label. Your existing Heyy automation watches for that label and runs the recovery sequence, so you stay in control of the message content and timing.
What decides which label gets applied?
The agent looks at the attempt count and the invoice amount. First attempt gets a soft label, second or later attempts get an urgent label, and any invoice over your threshold gets a high-value label regardless of attempt count.
Can I send the Slack alert to a private channel?
Yes. You can point the alert at any channel the connected Slack user can post in, public or private.
What happens if the customer is already in Heyy?
The agent will still apply the recovery label so your automation can pick them up. You won't end up with duplicate WhatsApp blasts, because the label drives the sequence, not the contact creation.

Related templates

Call overdue Xero customers with an AI collections agent

Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.

LiveKit
Xero
Deepgram
+2
Agentic Task
Win back LiveChat visitors whose chats went unanswered

Every couple of hours we find the chats your team never answered, email those visitors a real reply, and hand the sensitive ones to a support lead.

LiveChat
Gmail
Slack
Agentic Task
Let support send one-off Loops emails without an engineer

Your team picks a template, finds the customer, checks they are safe to email, then sends it, with every send logged where the whole team can see it.

Loops.so
Stripe
Google Sheets
App
Customer lifecycle inspector for Loops, Stripe and PostHog

Open one screen each morning to see a paying customer's billing, product activity and email history, then send the right next email without leaving it.

Loops.so
Stripe
PostHog
App
Chat quality review board for LiveChat support leads

Score last week's finished live chats against one rubric, let an AI grader draft the notes with quotes, and send coaching straight to the agent.

LiveChat
Slack
General Input Database
App
Win back no-show and cancelled appointments every morning

Every weekday morning, every appointment that fell through yesterday gets a personal text or email inviting them to rebook, plus a task for the right rep.

LeadConnector
Google Sheets
Slack
Agentic Task

Stop losing revenue to silent failed payments.

Connect Stripe, Heyy, and Slack once, and every failed payment turns into a labeled WhatsApp recovery and a heads-up for revenue ops.