v2

latestOpenAPI 3.0.0raw.githubusercontent.com2026-02-16143114179.4 KB
Subscriptions

Change subscription plan

Switch a subscription to a different plan. The new plan must have a price for the subscription's currency. A new billing period starts immediately with the new plan.

post/api/subscriptions/{id}/change-plan

Path parameters

idstring required

Subscription ID

Request body

newPlanIdstring required

New plan ID

prorateboolean

Whether to prorate charges

Response

Plan changed and billing period reset

idstring required
externalIdstring
customerIdstring required
planIdstring required
previousPlanIdstring
status'ACTIVE' | 'PAST_DUE' | 'CANCELED' | 'TRIALING' | 'PAUSED' required
currencystring required
billingTiming'IN_ADVANCE' | 'IN_ARREARS' required
currentPeriodStartstring required
currentPeriodEndstring required
cancelAtstring
canceledAtstring
trialStartstring
trialEndstring
startedAtstring required
metadataobject
createdAtstring required
updatedAtstring required

Example response

{
  "id": "clx1234567890",
  "externalId": "ext_sub_123",
  "customerId": "clxcust123",
  "planId": "clxplan123",
  "status": "ACTIVE",
  "currency": "USD",
  "billingTiming": "IN_ARREARS",
  "customer": {
    "id": "clx1234567890",
    "name": "Jane Doe",
    "email": "jane@example.com"
  },
  "plan": {
    "id": "clxplan123",
    "name": "Premium Monthly",
    "billingInterval": "MONTHLY"
  }
}