Docs
Guides

Build a cancel flow

Before someone cancels, offer a pause instead, and ask why they leave. Your site gets the answer and does the cancelling.

When someone presses Cancel on your billing page, show one screen that offers a break instead, and, if they still go, ask why. Miniwall shows the screens and hands your site the choice and the answers. Your site pauses or cancels the plan in your own billing system: Miniwall does not touch the subscription or the payment.

Make the screens from templates. Pause Instead offers a break of one to three months. Its question has the field ID pause_length, and it has two buttons: Pause my plan (action pause_subscription) and Cancel anyway (action cancel_anyway). Why You Left asks for one reason (field reason) and an optional note (field details). Change the words to fit your product, then Publish both.

Add two placements: cancel_flow that shows Pause Instead, and why_you_left that shows Why You Left.

Show it from your Cancel button and act on what the visitor chose:

// Show a screen, or carry on without it if it cannot load.
const show = (placement) => UIKit.presentPaywall({ paywall: { placement } }).catch(() => ({ outcome: 'skipped' }));

document.querySelector('#cancel').addEventListener('click', async () => {
  const offer = await show('cancel_flow');
  if (offer.outcome === 'closed') return; // they closed the offer: the plan stays as it is
  if (offer.outcome === 'action' && offer.actionId === 'pause_subscription') {
    await pausePlan(offer.answers?.pause_length); // your billing system
    return;
  }

  // "Cancel anyway", or the offer was not shown (skipped by a frequency limit, holdout or audience, or it failed):
  // never stand between the person and cancelling.
  const survey = await show('why_you_left');
  const answers = 'answers' in survey ? survey.answers : undefined;
  await cancelPlan({ reason: answers?.reason, details: answers?.details });
});

pausePlan and cancelPlan are your code. An answer holds the option ID, such as too_expensive, not the words on screen. A screen that does not show must never block the cancel: the person can always leave.

Keep the reason with the account. Passed back later as an attribute, it lets a placement speak to people who left for a reason you have since fixed:

UIKit.setAttributes({ cancel_reason: 'too_expensive' });

A We Miss You screen for an audience Attribute from your site cancel_reason is too_expensive can then say that prices changed.

To compare two pause offers, run an A/B test on cancel_flow with the second offer as B: its results show how many visitors saw and closed each one. Analytics counts which button they pressed. Whether they stayed is in your billing system.