Skip to main content

Subscriptions

The Subscriptions API lets you read and manage recurring purchases in your store — cancel them, resume a pending cancellation, or switch a customer to a different variant of the same product.

Overview

The Subscriptions API provides endpoints to:

A subscription represents a recurring purchase made by a customer. Each record carries the customer, the current variant (price), the originating order, and the cycle and cancellation dates.

Status

Every subscription carries a status:

StatusMeaning
trialingInside the trial period
activeTrial ended, billing succeeds
past_dueLatest renewal payment failed; retries are in progress
canceledThe subscription has ended
incompleteFirst payment is still pending or requires customer authentication
incomplete_expiredThe first payment was abandoned
unpaidRetries have stopped after past_due; access typically revoked

The list endpoint's status filter accepts these values.

Cancellation

Cancelling a subscription stops billing. By default it takes effect at the end of the current billing period — the customer keeps access until current_period_end. Pass immediately: true to cut access right away. There is no pause action.

A subscription in past_due is always cancelled immediately because there is no period-end grace for an unpaid subscription.

The read response carries an is_cancelable boolean that reflects whether a cancel request would succeed for the subscription in its current state.

Change plan

POST /subscriptions/{id}/change-plan switches a subscription to a different variant of the same product. The change is prorated and invoiced immediately; if that payment is declined, the plan change does not take effect.