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
1
Customer clicks cancel in your app
Intercept the cancellation in your own UI. Do not cancel the subscription yet.
2
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.3
Redirect the customer to the URL
The customer sees your branded retention page with the offers you have configured.
4
Receive the outcome
When the customer makes a choice, Revtain sends a
churn.flow.{outcome} webhook. Apply the decision in your billing system.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:
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.