PATCH
/
workspaces
/
{workspace_id}
/
billing-accounts
/
{billing_account_id}
/
subscriptions
/
{subscription_id}
Update Subscription
curl --request PATCH \
  --url https://api.altostrat.io/workspaces/{workspace_id}/billing-accounts/{billing_account_id}/subscriptions/{subscription_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "action": "pause",
  "product_quantities": {},
  "add_products": {},
  "remove_products": [
    "users"
  ],
  "metadata": {}
}'
{
  "id": "<string>",
  "billing_account_id": "<string>",
  "status": "active",
  "currency": "usd",
  "product_quantities": {},
  "plan_id": "<string>",
  "current_period_start": "2023-11-07T05:31:56Z",
  "current_period_end": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Auth0 JWT token for user authentication.

Path Parameters

workspace_id
string
required

The unique identifier for the workspace.

Example:

"ws_abc123"

billing_account_id
string
required

The unique identifier for the billing account (Stripe customer ID).

Example:

"cus_abc123"

subscription_id
string
required

The unique identifier for the subscription (Stripe subscription ID).

Example:

"sub_abc123"

Body

application/json

Only one operation type (action, product_quantities, etc.) is allowed per request.

Response

200 - application/json

Subscription updated successfully.

The response is of type object.