Skip to main content
PATCH
Update a subscription

Authorizations

Authorization
string
header
required

Enter your JWT in the format: Bearer {token}

Path Parameters

workspaceId
string
required

The ID of the workspace.

Example:

"ws_a1b2c3d4e5f6g7h8"

billingAccountId
string
required

The ID of the billing account, which corresponds to a Stripe Customer ID (cus_...).

Example:

"cus_a1b2c3d4e5f6g7h8"

subscriptionId
string
required

The ID of the Stripe subscription (sub_...).

Example:

"sub_a1b2c3d4e5f6g7h8"

Body

application/json

Specify one of the following operations: action, product_quantities, add_products, or remove_products. metadata can be combined with product_quantities.

action
enum<string>

Perform a state change action on the subscription.

Available options:
pause,
resume,
sync
product_quantities
object

Replace all current product quantities with this new set. To remove a product, omit it from this object. A quantity of 0 is not allowed; omit the key to remove.

Example:
add_products
object

Add new products to the subscription or increase the quantity of existing ones.

Example:
remove_products
enum<string>[]

A list of product types to remove from the subscription.

Available options:
locations,
users,
sso
Example:
metadata
object

A set of key-value pairs to store with the subscription. Will be merged with existing metadata.

Example:

Response

The subscription was updated successfully.

id
string

Unique identifier for the subscription (Stripe Subscription ID), prefixed with sub_.

Example:

"sub_a1b2c3d4e5f6g7h8"

billing_account_id
string

The ID of the billing account this subscription belongs to.

Example:

"cus_a1b2c3d4e5f6g7h8"

status
enum<string>

The status of the subscription.

Available options:
active,
past_due,
unpaid,
canceled,
incomplete,
incomplete_expired,
trialing,
paused
Example:

"active"

currency
enum<string>

The three-letter ISO currency code for the subscription.

Available options:
usd,
zar,
eur,
gbp,
aud
Example:

"usd"

product_quantities
object

A map of meterable product types to their subscribed quantities and pricing details.

Example:
metadata
object

A set of key-value pairs that you can attach to an object.

Example:
current_period_start
string<date-time> | null

The start of the current billing period.

Example:

"2025-10-15T00:00:00Z"

current_period_end
string<date-time> | null

The end of the current billing period.

Example:

"2025-11-15T00:00:00Z"

created_at
string<date-time> | null

The timestamp when the subscription was created.

Example:

"2025-10-15T12:30:00Z"

updated_at
string<date-time> | null

The timestamp when the subscription was last updated in our system.

Example:

"2025-10-20T09:00:00Z"