- Triggers start the workflow for the person the event is about. If they aren’t a subscriber yet, they’re added using the email on their Stripe customer.
- Exit conditions stop the workflow for that person. Their active runs are cancelled and steps that haven’t sent never will. Exit conditions are checked before triggers, so an event in both restarts the workflow.
- CLI
- TUI
- API
Add
triggers and exitConditions to the workflow’s JSON file, then run subscriber workflows update <workflowId> --file trial.json:Events
These are the moments in Stripe you can start or stop a workflow on.
You can also use a raw Stripe event type, such as
checkout.session.completed. Enable it on the webhook endpoint in Stripe too, since Stripe only sends the events enabled there. subscriber.dev keeps events you add when it updates the endpoint.
Connect Stripe
Connecting lets subscriber.dev look up who each Stripe event is about, and sets up a webhook so Stripe tells subscriber.dev when something happens.- In Stripe, create a restricted API key with Customers: Read and Webhook Endpoints: Write.
-
Connect it to subscriber.dev:
- CLI
- TUI
- API
"webhookStatus": "automatic". Saving again updates that endpoint rather than adding another, and disconnecting Stripe deletes it.
Adding the webhook yourself
If you’d rather not give the key Webhook Endpoints: Write, use a key with just Customers: Read. The response then has awebhookUrl, the eventsToEnable and a nextStep:
- In Stripe, add a webhook endpoint with that URL and those events.
- Give subscriber.dev the endpoint’s signing secret (
whsec_...) the same way you saved the key. Your API key is kept, so send only{"webhookSecret": "whsec_..."}.
subscriber integrations get stripe, or open Stripe under Integrations in the TUI.