Flag failed Stripe payments as HubSpot churn risks and rally CSMs
When Stripe reports a failed charge, mark the HubSpot contact and deal as a churn risk, open a task for the owner, and DM the CSM in Slack.
Build me an agent workflow that turns failed Stripe payments into a HubSpot churn risk signal and rallies the right CSM, instead of letting dunning silently kill the account.
Trigger: an incoming Stripe webhook on charge.failed events. The event payload gives me the customer ID, the amount, and the failure reason.
When the webhook fires, I want the agent to do the following:
1. Call Stripe Retrieve Customer with the customer ID from the event so we have the customer email, name, and any saved metadata. Also check Stripe List Charges for that customer and skip the rest of the workflow if there has been a successful charge in the last 24 hours, since those are usually short authorization retries and should not generate noise.
2. In HubSpot, run Search Contacts by that email to find the matching contact, and Search Companies by the email's domain to find the company. Grab the contact owner and any associated open deal.
3. Use HubSpot Update Contact to set a churn_risk property to true and a dunning_status property reflecting this failed charge (amount, decline reason, timestamp). If there is an associated open deal, use Update Deal to set the same churn_risk and dunning_status on the deal so it is visible in the pipeline view.
4. Use HubSpot Create Task associated with the contact (and the deal if present), assigned to the account owner, with a clear next step like "Verify card on file with [customer name] and send a retry link. Failed charge: $[amount], reason: [decline reason]." Set the due date for tomorrow and priority to high.
5. Send a Slack message as a DM to the account owner with the customer name, company, failed amount, decline reason, and a direct link to the HubSpot contact record. Keep it short and scannable so the CSM can act in one read.
If no HubSpot contact or company is found for the email, skip the HubSpot updates but still post a fallback Slack message to a default CS alerts channel with the raw Stripe details so the team can investigate manually.
Tone for the Slack DM and the task copy should be calm and operational, not alarmist. The goal is fast follow-up, not panic.
Additional information
What does this prompt do?
- Listens for Stripe charge.failed webhooks and pulls the customer email, amount, and decline reason.
- Finds the matching HubSpot contact and company by email and domain, then sets churn_risk and dunning status on the contact and any associated open deal.
- Creates a HubSpot task for the account owner with a clear next step like verifying card on file or sending a retry link.
- DMs the owner in Slack with the customer name, failed amount, decline reason, and a direct link to the HubSpot record.
- Skips the alert when the same customer has had a successful charge in the last 24 hours so brief authorization retries do not create noise.
What do I need to use this?
- A Stripe account with permission to configure a webhook endpoint for charge.failed events.
- A HubSpot account with access to contacts, companies, deals, and tasks, plus a churn_risk and dunning_status property on contacts and deals.
- A Slack workspace connected so the agent can DM the contact or deal owner.
- Owner email or Slack mapping in HubSpot so the right CSM gets pinged.
How can I customize it?
- Change the dedup window from 24 hours to whatever matches your retry cadence, or remove it entirely if every failure should fire.
- Swap the DM for a channel post in #cs-alerts or route by deal size so only deals above a threshold escalate.
- Tweak the task next step copy and due date, or add a second task for the AE when a renewal deal is involved.
Frequently asked questions
Which Stripe event triggers this workflow?
What if the failed customer is not in HubSpot?
How does it avoid noise from automatic card retries?
Will it update the deal as well as the contact?
Can I send the alert to a Slack channel instead of a DM?
Stop letting failed payments turn into silent churn.
Connect Stripe, HubSpot, and Slack once, and Geni flags every charge.failed as a churn risk and rallies the right CSM in seconds.