Checkouts
Save offers
A save offer is the deal you show a subscriber who's about to cancel: a cheaper plan, a discount, or a switch to yearly. In Plandalf you build it as a checkout and open it from the cancel button in your own app.
Plan changes and discounts
| A different plan | A checkout opened on the subscriber's subscription changes their current plan instead of starting a second one. The Switch to Annual template is built for this: it shows the yearly saving, then changes the subscription in place. |
| A discount | Make a coupon with Frequency set to Recurring for a few cycles, and show the code on the offer. |
Open the offer from your app
Your app needs to tell Plandalf who the subscriber is and which subscription to change:
Sign the customer in
Identify them with a signed token from your server. See Identify buyers.
Open the checkout on their subscription
When they click cancel, open your save-offer checkout with the subscription's ID:
await plandalf.present("switch-to-annual", { subscription: "sub_123" });See Open a checkout from code for the other options.
Let them cancel if they say no
If they close the offer, carry on with your normal cancellation. Closing a checkout doesn't cancel anything. To cancel from your server, use the Subscriptions API.
In the checkout's Products panel, set the new plan's Subscription behavior to Main item so it replaces the plan they have. The checkout shows what changes and what they'll pay today before they confirm.
The template picker also lists a Subscription Cancellation flow. Its discount, pause and cancel buttons aren't connected to your subscribers' billing yet, so don't use it for real cancellations. Build your save offer as described above.