Cancel flows

A cancel flow asks why a customer is leaving, makes a save offer, and only then cancels. You edit it in the dashboard and the React SDK renders it in your app, so changes need no deploy.

The dashboard manages one cancel flow per app, under Cancel flow in the app nav (/apps/[appId]/cancel-flow). That page shows how the flow is doing. The editor is at /apps/[appId]/cancel-flow/edit. Adding the cancel button to your app is covered in the SDK's Cancel flows page.

Cancel flows need the Offer API. The in-memory mock doesn't run them, so the Cancel flow nav item is hidden when the dashboard runs with OFFER_API_URL=mock.

Set up the flow

  1. Create it from the template

    On an app without a flow, click Create cancel flow. The template asks “Why are you cancelling?” with six answers, offers 30% off for 3 payments to “It's too expensive” and a pause to “I'm not using it enough” and “I only needed it for a short project”, then asks for confirmation. The editor opens.

  2. Edit and save

    Change the questions, offers and confirmation, check them in the preview, and click Save flow. If something is missing, a Before you can save list says what, and saving is disabled.

  3. Turn it on

    New flows start off. Click Turn on on the flow page. While a flow is off, the SDK's cancel button can't open it, but the editor preview still works. Turn off takes it down again.

Steps

A flow always runs in this order: your questions, then the save offer (if you have one), then the confirmation.

Question
A title, an optional description and between 2 and 12 answers. Per answer, tick Ask for details to show a text box, or Skip offer to go straight to the confirmation.
Free text
A title, an optional description and Placeholder, and a Required checkbox.
Save offer
Shown after the questions, before the customer can cancel. Turn it on with the switch on its section. It is skipped when no offer applies to the customer.
Confirmation
Title, Description and Button. Pressing the button cancels the PayPal subscription and moves the account to the free plan.

Add questions with Question or Free text, and reorder them with the arrows on each card. Answers decide which save offer shows, and they appear in the results and in webhooks.

Billing outside PayPal. For accounts that don't pay through PayPal, the confirmation only marks the account as cancelled. Listen for the cancel_flow.cancelled webhook and cancel them in your own billing. See Webhooks.

Save offers

There are four kinds of save offer:

KindWhat the customer getsSettings
DiscountA lower price for a few payments. The customer approves it on PayPal.Percent off (1 to 90) for a number of payments (1 to 24)
PauseNo billing for a few months, then billing resumes on the same plan.Months (1 to 12)
DowngradeA move to a cheaper plan. The customer approves it on PayPal.Which paid plan
IncentiveExtra features or limits for a while, at the same price.Which incentive, and for how many months (1 to 24)

Under Offer for each answer, pick an offer (or No offer) for every answer that doesn't skip the offer. Everyone else covers answers without their own offer. When a customer gave several answers, the first answer with an offer wins. The section also has an optional Eyebrow (the short line above the offer, “Before you go” in the template) and the Decline button text, which defaults to “No thanks, continue cancelling”.

An incentive offer applies the incentive right away and ends it after the chosen months. Discounts and downgrades change the PayPal subscription once the customer approves on PayPal.

Static and dynamic offers

By default the offer is static: the one you picked for the answer. Turn on Dynamic offers to let the agent choose instead. It reads why this customer is leaving, their plan, tenure and usage, picks the offer most likely to keep them, and writes its copy. It can only choose inside the guardrails you set:

Agent may offer
Which of the four kinds it can use.
Max % off
The largest discount, from 1 to 90.
Max payments
How many payments a discount can last, from 1 to 24.
Max pause (mo)
The longest pause, from 1 to 12 months.
Max bonus (mo)
The longest incentive, from 1 to 24 months.
Incentives it can give
Shown when Incentive is allowed. Tick the incentives it may apply.
Plans it can move them to
Shown when Downgrade is allowed. With none ticked, any cheaper plan.
Instructions
Optional. Your voice, and anything the agent should know about your customers.

The API enforces the guardrails itself. It re-checks the kind, the caps, the plan and the incentive the agent returns, and clamps or drops anything out of bounds. If the agent can't decide, the call fails or the API has no key, the customer gets the static offer for their answer.

Dynamic offers need ANTHROPIC_API_KEY on the API. The key goes on the API service, which makes the call. The dashboard's own key only powers the Agent. Without it, the editor shows a warning and the flow page lists dynamic offers as “On, but the API has no ANTHROPIC_API_KEY”. The API uses claude-opus-5-5 unless you set DECIDE_MODEL.

Pauses

A pause stops billing and resumes it on schedule. By default the API runs the resume itself. Set both RENDER_API_KEY and RENDER_WORKFLOW_SLUG on the API to run pauses as Render Workflow tasks instead. The flow page's Pauses run on field shows which one is active. See Render.

Preview

The right side of the editor renders the flow with the real SDK components, using your unsaved steps. Nothing is saved or charged. The controls above it:

Start at
From the start, Jump to offer or Jump to confirmation.
Assumed answer
The answer to use when you jump past the questions.
Price for account ID
Optional. Prices the offer for a real account. Without it, the API uses a sample customer.
Ask the agent
Shown when dynamic offers are on. Calls the agent for each preview, so leave it off while you edit text.

Under the preview, a line says whether a fixed offer or the agent's pick is showing, quotes the agent's reasoning, or explains why it was skipped. The offer comes from POST /apps/:appId/cancel-flows/:id/preview-offer, so prices and copy match what a customer would get.

Results

The flow page shows the last 30 days:

Totals
Cancel attempts (and how many closed the flow), Saved, Save rate (of those who decided) and Monthly revenue kept (and lost).
Why customers leave
Each answer with how often it was picked, how many of those were saved or cancelled, and the save rate.
Save offers
Each offer kind with times shown, accepted and the take rate. Offers the agent picked carry an Agent badge.
Recent attempts
The latest 25 sessions with account, reason, offer and outcome: In progress, Saved, Cancelled or Closed. Click a row to open the account.

The side panel shows the status, whether dynamic offers are on, where pauses run, an outline of the flow, and an Add it to your app snippet. The snippet mints an account token on your server with the secret key, then renders <CancelFlow.Trigger> and <CancelFlow.Dialog> inside a <CancelFlowProvider>. The full setup is in Cancel flows for the SDK, and how AI is used is in AI features.