Cancel flow is enabled per account. Contact Revtain to turn it on and to configure your retention offers — which options appear, the discount percentage, and the pause length.
How It Works
Customer clicks cancel in your app
Intercept the cancellation in your own UI. Do not cancel the subscription yet.
Generate a cancel flow link
Call
POST /api/cancel-flow/generate from your backend with the customer’s details. You receive a unique, time-limited URL.Redirect the customer to the URL
The customer sees your branded retention page with the offers you have configured.
Generate a Cancel Flow Link
Call this from your backend — it requires your API key.customerId is required. amount — the recurring charge in the smallest currency unit — lets the page frame the offer accurately. returnUrl is where the customer lands after finishing.
The response:
The link is valid for 48 hours and can be used once. Generate a fresh link each time a customer starts a cancellation.
Handle the Outcome
When the customer completes the flow, Revtain sends achurn.flow.{outcome} webhook. The outcome is one of:
| Outcome | Meaning | What to do |
|---|---|---|
retained | The customer accepted a discount or chose to stay | Apply the discount if one was offered; keep the subscription active |
paused | The customer paused the subscription | Pause billing for the configured period |
downgraded | The customer moved to a cheaper plan | Switch the customer to the lower plan |
cancelled | The customer still chose to cancel | Cancel the subscription |
Verify the Webhook
Thechurn.flow webhook is signed like every other Revtain webhook. Verify the X-Revtain-Signature header before acting on it — see Webhooks for the verification steps.