Hand failed Stripe payments to ActiveCampaign dunning and alert Slack

When a Stripe charge or invoice fails, tag the customer in ActiveCampaign so your dunning series fires the right email, and brief revenue ops in Slack.

Agentic Task
StripeActiveCampaignSlackFinanceOperationsNotifications & AlertsEmail Automation

Build me an agent workflow that recovers failed Stripe payments by handing them off to my existing ActiveCampaign dunning automation and alerting revenue ops in Slack.

Trigger: a Stripe webhook that fires on both charge.failed and invoice.payment_failed events. Skip any event where livemode is false (no test-mode noise).

From the Stripe event, extract: customer email (data.object.customer_email, falling back to the customer's billing email if needed), amount (data.object.amount or amount_due, which is in cents), failure reason (failure_message for charges, last_finalization_error or attempt_count context for invoices), and the retry attempt number from Stripe's metadata (data.object.attempt_count for invoices, or 1 for charges if not provided).

Then in ActiveCampaign: call List Contacts with an email filter to find the matching contact. If a contact exists, call Add Tag to Contact with a tag named payment-failed-attempt-1, payment-failed-attempt-2, or payment-failed-attempt-3 based on the attempt number from Stripe. (The POST /contactTags body shape is { contactTag: { contact, tag } }.) If no matching contact exists, create one via Create Contact in sync mode (the upsert endpoint) using the email, then add the same tag. The tag is what fires the customer's existing ActiveCampaign automation series, so the right dunning email goes out.

Then in Slack: use Send a Message to post to a finance or revenue ops channel I'll specify at setup. Include the customer name (or email if no name), the amount converted from cents to dollars (Stripe is in cents, ActiveCampaign monetary fields are also in cents, but the Slack message should be human dollars like $129.00), the failure reason translated to plain English (insufficient funds, card expired, card declined by issuer, etc.), the retry attempt number, and a clickable link to the Stripe customer (https://dashboard.stripe.com/customers/{customer_id}).

Integrations: Stripe (webhook trigger + minimal lookups if needed), ActiveCampaign (List Contacts, Create Contact sync, Add Tag to Contact), Slack (Send a Message). Use the user-OAuth Slack integration.

Additional information

What does this prompt do?
  • Listens for failed Stripe charges and invoice payments in real time, and skips test-mode events automatically.
  • Finds the customer in ActiveCampaign by email and adds a tag like payment-failed-attempt-1, attempt-2, or attempt-3 so your existing automation sends the matching dunning email.
  • Creates the ActiveCampaign contact on the fly if they don't exist yet, so first-time failures still trigger the right series.
  • Posts a clear Slack message to your finance or revenue channel with the customer, amount, plain-English reason, attempt number, and a one-click link to the Stripe customer.
What do I need to use this?
  • A Stripe account with admin access so failed payment events can be forwarded.
  • An ActiveCampaign account with a tag-driven dunning automation already set up (or willing to add one).
  • A Slack workspace and a channel where your revenue or finance team wants to be alerted.
How can I customize it?
  • Change the tag naming so it matches the tags your ActiveCampaign automation already listens for, like dunning-1, dunning-2, dunning-3.
  • Swap the Slack channel, or route different failure reasons (insufficient funds, expired card, fraud) to different channels.
  • Decide what to do when there's no matching ActiveCampaign contact. The default is to create one, but you can choose to only alert Slack instead.

Frequently asked questions

Will this trigger my existing ActiveCampaign dunning emails?
Yes. The workflow adds a tag to the customer in ActiveCampaign. Any automation you've already built that starts when that tag is added will fire as normal. You don't need to rewrite your emails.
What happens on the second or third failed attempt for the same customer?
Stripe tells us which retry attempt this is, and the workflow tags the contact with attempt-1, attempt-2, or attempt-3 accordingly. That way your automation can send a softer reminder first and a firmer one later.
What if the customer isn't in ActiveCampaign yet?
The workflow creates the contact for you using the email from Stripe, then applies the tag. So even first-time failures from new customers land in the right recovery series.
Does this fire on Stripe test events?
No. Test-mode events are skipped so your finance channel and ActiveCampaign automation only see real failed payments.
Can I change which Slack channel gets the alert?
Yes. After setup, just tell Geni which channel to post to. You can also split alerts by amount or by failure reason if you want bigger failures going to a separate channel.

Stop losing revenue to silent payment failures.

Connect Stripe, ActiveCampaign, and Slack once, and Geni hands every failed payment to your dunning automation and your revenue team.