Skip to main content
This guide shows you how to implement self-service upgrades and downgrades using product groups in your application.

Overview

The upgrade/downgrade flow consists of three main steps:
  1. Check eligibility - Get available change options for a subscription item
  2. Display options - Show the customer available upgrades/downgrades
  3. Apply change - Execute the selected package change

Prerequisites

Before implementing upgrades:
  1. Create a Product Group with a tier for each package level
  2. Assign the product group to the subscription item via PUT /subscription-items/{id}/product-group

Step 1: Get Change Options

Fetch available upgrade/downgrade options for a subscription item:

Response

Response Fields

If hasPendingChange is true, no further changes can be made until the pending change is applied.

Step 2: Display Options to Customer

Use the response to build a selection UI:

Step 3: Apply the Change

When the customer selects an option, apply the change:

Request Parameters

Response


Change Timing Behavior

Immediately

The change takes effect right away:
  1. Current subscription item is ended
  2. Credit note is created (based on creditType)
  3. New subscription item is created and starts immediately
  4. New invoice is generated

End of Period

The change is scheduled for the next billing cycle:
  1. Current subscription item continues until period end
  2. At period end, item switches to new product/plan
  3. No credit note is created
  4. Next invoice uses new pricing

Credit Types

When changeTiming is immediately, a credit is issued based on creditType:

Complete Example


Error Handling


Webhooks

Listen for these events to track changes:

Product Groups

Set up product groups

Subscription Transitions

Manual transitions

Webhooks

Listen for events