Shift: plan changes with proration
Northwind Analytics changes plans, seats and add-ons, previewing every proration first, and keeps customers with coupons and scheduled cancellations.
The story
Northwind Analytics is a fictional B2B SaaS with Starter, Growth, Scale and Enterprise plans, each with monthly and annual price points, plus a per-seat component and an on/off add-on. Shift is the workbench its customer success team uses to change an account's plan, seats and add-ons. Maxio calculates every proration, and Shift shows it before anything is applied.
| At a glance | |
|---|---|
| Use case | Upgrades and downgrades, proration, seat changes, coupons, retention |
| SDK operations | 15 |
| Live app | mxo-shift.pages.dev |
Screens
| Screen | What you see and do | SDK calls |
|---|---|---|
| Accounts | 15 accounts with plan, seats, MRR, renewal date and status, and MRR by plan | subscriptions.listSubscriptions, subscriptionComponents.listSubscriptionComponentsForSite |
| Plan change studio | Pick a plan and a monthly or annual price point. A timeline of the current period shows the credit for the unused old plan and the charge for the new one. Apply now, or schedule the change for renewal | products.listProducts, productPricePoints.listProductPricePoints, subscriptionProducts.previewSubscriptionProductMigration, subscriptionProducts.migrateSubscriptionProduct, subscriptions.updateSubscription |
| Seats & add-ons | A seat slider with a live prorated preview, and an add-on switch | subscriptionComponents.previewAllocations, subscriptionComponents.allocateComponents |
| Retention | A save-offer flow with its price impact, scheduled cancellations, reactivation and the coupon library | coupons.listCoupons, subscriptions.applyCouponsToSubscription, subscriptions.removeCouponFromSubscription, subscriptionStatus.initiateDelayedCancellation, subscriptionStatus.cancelDelayedCancellation, subscriptionStatus.reactivateSubscription |
SDK operations
| Operation | SDK method | Used for |
|---|---|---|
| List subscriptions | subscriptions.listSubscriptions | The account list |
| List subscription components for a site | subscriptionComponents.listSubscriptionComponentsForSite | Seats and add-ons for every account |
| List products | products.listProducts | The plan catalog |
| List product price points | productPricePoints.listProductPricePoints | Monthly and annual prices |
| Preview subscription product migration | subscriptionProducts.previewSubscriptionProductMigration | The prorated charge, before the change |
| Migrate subscription product | subscriptionProducts.migrateSubscriptionProduct | Change the plan now |
| Update subscription | subscriptions.updateSubscription | Schedule a plan change for renewal |
| Preview allocations | subscriptionComponents.previewAllocations | Price a seat change |
| Allocate components | subscriptionComponents.allocateComponents | Apply seats and add-ons |
| List coupons | coupons.listCoupons | The coupon library |
| Apply coupons | subscriptions.applyCouponsToSubscription | Save offers |
| Remove coupon | subscriptions.removeCouponFromSubscription | Take an offer back |
| Initiate delayed cancellation | subscriptionStatus.initiateDelayedCancellation | Cancel at period end |
| Cancel delayed cancellation | subscriptionStatus.cancelDelayedCancellation | Keep the customer |
| Reactivate subscription | subscriptionStatus.reactivateSubscription | Win a customer back |
Code: preview, then change the plan
const migration = { productId: scale.id, productPricePointId: scaleMonthly.id, preservePeriod: true, includeCoupons: true };
// What the customer pays today, before anything changes
const preview = await client.subscriptionProducts.previewSubscriptionProductMigration({
subscriptionId,
body: { migration },
});
// Apply it once the customer confirms
const { subscription } = await client.subscriptionProducts.migrateSubscriptionProduct({
subscriptionId,
body: { migration },
});Errors shown on purpose
- Maxio 422s: seats below a plan's minimum, too many seats for Starter, keeping the billing date while switching between monthly and annual, coupons that can't be combined, an archived coupon code, scheduling a cancellation twice, and reactivating a live account. The app narrows each operation's own typed error to show Maxio's message.
- App rules: seats can't go below the seats in use, and plan changes are blocked while a cancellation is scheduled.
Meterline: usage billing and prepaid credits
Lumen AI, an inference API company, bills tokens in price tiers, GPU-seconds through event-based billing, and prepaid credit packs on Maxio Advanced Billing.
Recover: failed-payment recovery
Brightdesk finds past-due accounts, sees why each payment failed, and recovers the revenue with retries, card-update requests and offline payments.
