Integrations
Docs chevron_right Integrations chevron_right Stripe events

Stripe events

Turn your billing activity into email automations. Connect Stripe once and every payment failure, new subscription, or new customer becomes a named trigger event you can build on — dunning sequences, win-back flows, and payment receipts that fire themselves, with the invoice data available as merge tags inside every email.

Connecting Stripe

Open Integrations in the sidebar and click Connect on the Stripe card. Setup is two short steps:

  1. Paste a restricted API key. In your Stripe dashboard, create a restricted key (Developers → API keys → Create restricted key) with at least Customers: Read — we use it to look up a customer's email address when a subscription event arrives, and for nothing else. The key is validated against Stripe before anything is saved, and stored encrypted at rest.
  2. Create the webhook endpoint. Your connection page shows a webhook URL that is unique to your account. In Stripe, add it under Developers → Webhooks → Add endpoint, select the events from the catalog below, then paste the endpoint's signing secret (whsec_…) into the connection's settings. Every delivery is verified against that secret — unsigned or mis-signed calls are rejected.
emailflow.ai/rui/integrations/stripe
The Stripe connection page: a connected status card, the webhook wiring section with the per-account endpoint URL, last-event heartbeat, and dropped-event counter, and the event settings form with the signing-secret field
The connection page — your webhook URL, delivery heartbeat, and signing-secret settings.

The event catalog

Connecting provisions these events into your account automatically. Each one appears in the automation trigger picker (grouped under Stripe) and in the events directory, where every fire is logged with its payload.

EventFires when
stripe.customer.createdA new customer is created in your Stripe account.
stripe.invoice.paidAn invoice is paid successfully.
stripe.invoice.payment_failedAn invoice payment attempt fails — the dunning entry point.
stripe.customer.subscription.createdA customer starts a new subscription.
stripe.customer.subscription.updatedA subscription changes — plan, quantity, status, or cancel-at-period-end.
stripe.customer.subscription.deletedA subscription is canceled or expires.

Anything else your webhook endpoint sends is acknowledged and dropped — the connection page counts dropped deliveries so you can trim the endpoint's event list in Stripe if it grows noisy.

Building on the events

In the automation editor, choose the Custom event trigger and pick a Stripe event from the picker. The event's payload rides along into the flow, so emails can render it with {{ event.* }} merge tags:

Merge tagRenders
{{ event.amount_due }}The invoice amount in major units — 49.00, ready for an email body.
{{ event.currency }}The invoice currency — usd.
{{ event.hosted_invoice_url }}Stripe's hosted payment page for the invoice — the one-click "pay now" link a dunning email needs.
{{ event.attempt_count }}How many payment attempts the invoice has had.
{{ event.status }}Subscription status on customer.subscription.* events — active, canceled, …

Payload filters work here too — for example, enroll only when cancel_at_period_end equals true to catch pending cancellations without reacting to every subscription update.

emailflow.ai/automations
The automation trigger settings panel with the Custom event trigger bound to the Stripe invoice payment failed event, picked from a dropdown that groups events by source
Stripe events sit in the same trigger picker as your own API events, grouped by source.
person_add
Contacts are matched by email address. On the connection's settings you pick which list events resolve against — and optionally let events auto-create a contact there when the email is new, so a fresh Stripe customer can enter a welcome flow without an import step.

Troubleshooting

  • No events arriving. The connection page shows Last event received — if it stays empty, check the endpoint URL and selected events in your Stripe dashboard. Stripe's own webhook log shows each delivery attempt and our response.
  • Stripe reports 400s. The signing secret in your connection settings does not match the endpoint — re-paste it from the Stripe endpoint's details page. Rotating the secret in Stripe means updating it here too.
  • Subscription events enroll nobody. Stripe's subscription payloads carry no email; we look it up with your restricted key. Make sure the key keeps Customers: Read access. Fires without a resolvable contact are still logged in the events directory.

Disconnecting from the Manage page clears the stored key and secret immediately. The provisioned events and their fire history stay, so reconnecting later picks up exactly where you left off.