Update a subscription

View as Markdown

Updates a subscription. If plan_id is changed, this triggers a plan switch.

For non-plan changes (quantity, metadata), the subscription is updated in place.

Authentication

AuthorizationBearer

Use a secret key (sk_test_* or sk_live_*) for full read/write access, or a public key (pk_test_* or pk_live_*) for read-only access.

Path parameters

idstringRequiredformat: "uuid"
The unique identifier of the subscription.

Request

This endpoint expects an object.
plan_idstring or nullOptionalformat: "uuid"

New plan ID (triggers a plan switch).

billing_cyclestring or nullOptional

New billing cycle (used with plan switches).

quantityinteger or nullOptional>=1
metadataobject or nullOptional

Response

Subscription updated successfully
dataobject

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error