Altostrat Studio is here — the AI-native network operations IDE for engineers running production. Terminal, diagrams, runbooks, and Copilot in one workspace. Get started →
curl --request POST \
--url https://v1.api.altostrat.io/workspaces/{workspaceId}/billing-accounts/{billingAccountId}/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_quantities": {
"locations": 5,
"users": 25
},
"metadata": {
"project_id": "proj_abc123"
}
}
'{
"id": "sub_a1b2c3d4e5f6g7h8",
"billing_account_id": "cus_a1b2c3d4e5f6g7h8",
"status": "active",
"currency": "usd",
"product_quantities": {
"locations": {
"price_id": "price_123abc",
"quantity": 10,
"interval": "month"
},
"users": {
"price_id": "price_456def",
"quantity": 50,
"interval": "month"
}
},
"metadata": {
"order_id": "6735"
},
"current_period_start": "2025-10-15T00:00:00Z",
"current_period_end": "2025-11-15T00:00:00Z",
"created_at": "2025-10-15T12:30:00Z",
"updated_at": "2025-10-20T09:00:00Z"
}Creates a new Stripe subscription for a billing account. If the workspace is eligible for a trial, a 14-day trial subscription is created without requiring a payment method. Otherwise, a default payment method must be present on the billing account.
curl --request POST \
--url https://v1.api.altostrat.io/workspaces/{workspaceId}/billing-accounts/{billingAccountId}/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_quantities": {
"locations": 5,
"users": 25
},
"metadata": {
"project_id": "proj_abc123"
}
}
'{
"id": "sub_a1b2c3d4e5f6g7h8",
"billing_account_id": "cus_a1b2c3d4e5f6g7h8",
"status": "active",
"currency": "usd",
"product_quantities": {
"locations": {
"price_id": "price_123abc",
"quantity": 10,
"interval": "month"
},
"users": {
"price_id": "price_456def",
"quantity": 50,
"interval": "month"
}
},
"metadata": {
"order_id": "6735"
},
"current_period_start": "2025-10-15T00:00:00Z",
"current_period_end": "2025-11-15T00:00:00Z",
"created_at": "2025-10-15T12:30:00Z",
"updated_at": "2025-10-20T09:00:00Z"
}Documentation Index
Fetch the complete documentation index at: https://altostrat.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Enter your JWT in the format: Bearer {token}
The ID of the workspace.
"ws_a1b2c3d4e5f6g7h8"
The ID of the billing account, which corresponds to a Stripe Customer ID (cus_...).
"cus_a1b2c3d4e5f6g7h8"
A map of meterable product types (locations, users, sso) to the desired quantity. At least one product is required.
Show child attributes
{ "locations": 5, "users": 25 }A set of up to 10 key-value pairs to store with the subscription.
Show child attributes
{ "project_id": "proj_abc123" }The subscription was created successfully.
Unique identifier for the subscription (Stripe Subscription ID), prefixed with sub_.
"sub_a1b2c3d4e5f6g7h8"
The ID of the billing account this subscription belongs to.
"cus_a1b2c3d4e5f6g7h8"
The status of the subscription.
active, past_due, unpaid, canceled, incomplete, incomplete_expired, trialing, paused "active"
The three-letter ISO currency code for the subscription.
usd, zar, eur, gbp, aud "usd"
A map of meterable product types to their subscribed quantities and pricing details.
Show child attributes
{
"locations": {
"price_id": "price_123abc",
"quantity": 10,
"interval": "month"
},
"users": {
"price_id": "price_456def",
"quantity": 50,
"interval": "month"
}
}A set of key-value pairs that you can attach to an object.
Show child attributes
{ "order_id": "6735" }The start of the current billing period.
"2025-10-15T00:00:00Z"
The end of the current billing period.
"2025-11-15T00:00:00Z"
The timestamp when the subscription was created.
"2025-10-15T12:30:00Z"
The timestamp when the subscription was last updated in our system.
"2025-10-20T09:00:00Z"
Was this page helpful?