iMessage recovery for failed Stripe payments with LoopMessage
When a Stripe payment fails, text the customer a polite recovery iMessage with a payment link, and brief revenue ops in Slack so a CSM can follow up.
Build me an agent workflow that recovers failed Stripe payments by texting the customer through LoopMessage and pinging our revenue-ops Slack channel in parallel.
Trigger: a Stripe webhook for charge.failed or invoice.payment_failed. The workflow should run once per failure event.
Step 1. From the Stripe event, pull the customer id and call Stripe Retrieve Customer to grab the full customer record, including name, email, phone, and the amount due. Also capture the retry attempt count from the event payload.
Step 2. Enrich the customer with HubSpot Search Contacts using the email from Stripe. From the matching contact, pull plan tier and CSM owner. If there is no HubSpot match, continue and flag this in the Slack alert later.
Step 3. Draft a short, polite recovery iMessage. The text should reference the product or plan they pay for (use the HubSpot plan tier when available, otherwise a generic phrase based on the Stripe product), say their card just failed, and include a payment-update link. Keep it under three sentences, no marketing copy, no emojis.
Step 4. Call LoopMessage Check Contact Status on the customer's phone number to confirm they are subscribed to our audience. If the status is subscribed, call LoopMessage Send Message to deliver the iMessage from our approved sender. If the status is unsubscribed or unknown, skip the text entirely and note the reason for the Slack alert.
Step 5. In parallel with the customer text, post a structured Slack alert to our revenue-ops channel via Send a Message. The Slack message should include the customer's name and email, the amount due, the retry attempt count, the plan tier and CSM owner from HubSpot, a link to the HubSpot contact record, and a one-line status: either 'iMessage sent' or 'iMessage skipped: unsubscribed' or 'iMessage skipped: not in LoopMessage audience' or 'no HubSpot match found'.
Skip rules: never send an iMessage to a contact who is unsubscribed or unknown in LoopMessage. In those cases, still post the Slack alert so the CSM can follow up another way. If HubSpot has no contact, still text the customer (assuming opted in) using Stripe data only, and flag the missing CRM match in Slack.
Make the Slack channel, the LoopMessage sender id, the payment-update link template, and the recovery text wording easy to edit later.
Additional information
What does this prompt do?
- Listens for Stripe failed charge and failed invoice events, then pulls the customer's name, amount due, and phone from Stripe.
- Enriches the customer with plan tier and CSM owner from your HubSpot contact so the text and the Slack alert both reference the right account.
- Drafts a short, friendly iMessage with a payment-update link and sends it through LoopMessage, but only if the customer is opted in for messages.
- Posts a structured Slack alert to your revenue-ops channel with customer name, amount, retry attempt count, plan tier, and a HubSpot link so a CSM can step in.
What do I need to use this?
- A Stripe account where you can add a webhook for failed charges and failed invoices.
- A LoopMessage account with at least one approved sender and customers opted into your audience.
- A HubSpot login where your contacts include plan tier and CSM owner.
- A Slack workspace and the channel where revenue ops should see alerts.
How can I customize it?
- Change the tone or wording of the recovery iMessage to match your brand voice.
- Pick which Slack channel gets the alert and which fields show up in the message.
- Decide whether to text on every retry or only the first failure, and tune how the workflow handles unsubscribed or unknown contacts.
Frequently asked questions
What if my customer has not opted in to iMessage from us?
Will this work for subscription invoice failures, not just one-off charges?
Do I need to write the recovery text myself?
Will Slack get pinged even when we successfully text the customer?
What if the customer is not in HubSpot yet?
Stop letting failed payments quietly churn.
Connect Stripe, LoopMessage, HubSpot, and Slack once, and Geni texts the customer and briefs your revenue team the moment a charge fails.