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.

Open Shift →

Shift's plan change studio: the current billing period with the credit for the old plan and the charge for the new one

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 caseUpgrades and downgrades, proration, seat changes, coupons, retention
SDK operations15
Live appmxo-shift.pages.dev

Screens

ScreenWhat you see and doSDK calls
Accounts15 accounts with plan, seats, MRR, renewal date and status, and MRR by plansubscriptions.listSubscriptions, subscriptionComponents.listSubscriptionComponentsForSite
Plan change studioPick 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 renewalproducts.listProducts, productPricePoints.listProductPricePoints, subscriptionProducts.previewSubscriptionProductMigration, subscriptionProducts.migrateSubscriptionProduct, subscriptions.updateSubscription
Seats & add-onsA seat slider with a live prorated preview, and an add-on switchsubscriptionComponents.previewAllocations, subscriptionComponents.allocateComponents
RetentionA save-offer flow with its price impact, scheduled cancellations, reactivation and the coupon librarycoupons.listCoupons, subscriptions.applyCouponsToSubscription, subscriptions.removeCouponFromSubscription, subscriptionStatus.initiateDelayedCancellation, subscriptionStatus.cancelDelayedCancellation, subscriptionStatus.reactivateSubscription

SDK operations

OperationSDK methodUsed for
List subscriptionssubscriptions.listSubscriptionsThe account list
List subscription components for a sitesubscriptionComponents.listSubscriptionComponentsForSiteSeats and add-ons for every account
List productsproducts.listProductsThe plan catalog
List product price pointsproductPricePoints.listProductPricePointsMonthly and annual prices
Preview subscription product migrationsubscriptionProducts.previewSubscriptionProductMigrationThe prorated charge, before the change
Migrate subscription productsubscriptionProducts.migrateSubscriptionProductChange the plan now
Update subscriptionsubscriptions.updateSubscriptionSchedule a plan change for renewal
Preview allocationssubscriptionComponents.previewAllocationsPrice a seat change
Allocate componentssubscriptionComponents.allocateComponentsApply seats and add-ons
List couponscoupons.listCouponsThe coupon library
Apply couponssubscriptions.applyCouponsToSubscriptionSave offers
Remove couponsubscriptions.removeCouponFromSubscriptionTake an offer back
Initiate delayed cancellationsubscriptionStatus.initiateDelayedCancellationCancel at period end
Cancel delayed cancellationsubscriptionStatus.cancelDelayedCancellationKeep the customer
Reactivate subscriptionsubscriptionStatus.reactivateSubscriptionWin 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.

On this page