v12

latestOpenAPI 3.0.1AGPL-3.0raw.githubusercontent.com2026-07-0971442569.2 KB
Subscriptions

Preview subscription plan change

Use when showing a customer the cost of a plan change before they confirm (e.g. upgrade/downgrade preview with proration).

post/subscriptions/{id}/change/preview

Path parameters

idstring required

Subscription ID

Request body

billing_cadence'RECURRING' required
billing_cycle'anniversary' | 'calendar' required
billing_period'MONTHLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY' | 'QUARTERLY' | 'HALF_YEARLY' | 'ONETIME' required
billing_period_countinteger

billing_period_count is the billing period count for the new subscription

change_at'immediate' | 'end_of_period'
metadataobject

metadata contains additional key-value pairs for storing extra information

proration_behavior'create_prorations' | 'none' required
target_plan_idstring required

target_plan_id is the ID of the new plan to change to (required)

Response

OK

change_type'upgrade' | 'downgrade' | 'lateral'
effective_datestring date-time

effective_date is when the change would take effect

metadataobject

metadata from the request

subscription_idstring

subscription_id is the ID of the subscription being changed

warningsstring[]

warnings contains any warnings about the change