Guide: Manage subscription updates
Overview
When existing subscribers want to upgrade, downgrade, or add extras to their subscription, you need a checkout flow that understands their current state. The Subscription Checkout API provides a stateful basket that:
Knows what the subscriber currently has (their active offer and add-ons)
Calculates what they can change to (upgrades, downgrades, cross-sells)
Handles the business logic automatically (removing old offers when adding new ones, checking compatibility)
This gives you several advantages:
No eligibility logic in the browser. The API determines valid upgrade/downgrade paths based on your Limio configuration.
Automatic state management. When a subscriber selects a new offer, the system auto-generates the remove action for their current offer.
Cleaner add-on handling. Incompatible add-ons are automatically flagged for removal when switching offers.
Prerequisites
Access to the Limio Commerce API with a valid Bearer token (for standard flow) or Partner token (for partner integrations)
An active subscription
(Optional) Upgrade/downgrade paths configured on your Offers in Limio
What you'll build
Initiate a subscription checkout session by providing the subscription ID. The API returns available upgrades, downgrades, and cross-sells.
Update the basket by adding offers or add-ons. The system calculates prices and generates any required remove actions.
Retrieve the basket state at any point (e.g., after page refresh) to continue the checkout.
Initiate the checkout session
Use POST api/checkout/subscription to create a basket for the subscriber. At minimum, provide:
order.forSubscription.id— the subscription ID to modifyorder.order_type— must be"update_subscription"
Example — initiate checkout (curl)
Notes:
forSubscriptionaccepts eitheridornameto identify the subscription
Response
The response tells you:
checkoutId— the basket ID (also set inlimio_statecookie)forSubscriptionOffer— what the subscriber currently hasnextActions.upgrades/downgrades— valid offer changes based on your Limio confignextActions.crossSells— available add-onsnextActions.subscriptionAddOns— add-ons they already own
Error responses
423
Subscription has a pending change scheduled
Wait until pendingChangeDate passes
404
Subscription not found or not owned by user
Verify subscription ID and auth token
400
Invalid request body
Check schema requirements
Update the basket with offers or add-ons
Use PUT api/checkout/subscription to add or remove items. The landing state lmo_ls cookie (set by POST) must be present.
Example — select an upgrade (curl)
What happens automatically
When you add a new subscription offer, the system:
Generates a remove action for the current offer (
forSubscriptionOffer) if relevantChecks add-on compatibility and generates remove actions for incompatible add-ons
Calculates prices and line items for all order items
Recalculates cross-sells based on the new offer selection
Response
Adding multiple add-ons
Each PUT replaces orderItems entirely (upgrades/downgrades persist from POST, crossSells are recalculated). To add multiple add-ons, include them all in one request:
Validation rules
One offer add per request — you can only add one subscription offer at a time (add-ons have no limit)
Basket ownership — the basket must belong to the authenticated user/partner
Retrieve the basket
Use GET api/checkout/subscription to fetch the current basket state. Useful after page refresh or to verify state before payment.
Response structure is identical to POST/PUT.
Authentication modes
Standard (MMA)
api/checkout/subscription
Authorization: Bearer <token>
Partner
api/partner/checkout/subscription
X-Partner-Token: <token>
End-to-end example (Node.js)
Below is a minimal service that initiates a subscription upgrade flow and returns a checkout URL.
Tips & troubleshooting
Why am I getting a 423 error? The subscription has a scheduled change (e.g., a pending upgrade that takes effect next billing cycle). You can't modify it until that date passes. Check subscription.data.pendingChangeDate.
Can I add multiple offers at once? No — only one subscription offer can be added per request. The system enforces a 1:1 swap (add new, remove current). Add-ons don't have this restriction.
Do I need to send remove actions manually? No — when you add a new subscription offer, the system auto-generates the remove action for the current offer and any incompatible add-ons.
How long do baskets last? Baskets expire after 14 days. The limio_state cookie tracks the active basket ID.
What's the difference between standard and partner auth? Standard auth (BEARER_MMA) validates the user owns the subscription. Partner auth should be used for admin/CRM integrations where you're acting on behalf of customers.
Last updated
Was this helpful?

