Creates a new subscription for a customer. Supports three creation patterns: raw pricing in the request body, from a plan, or from a plan with per-customer overrides. Subscriptions are created in draft status and must be activated unless auto_activate: true is set. See the Creating a Subscription examples for concrete request bodies and the bundle variants.
Documentation Index
Fetch the complete documentation index at: https://alguna.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
API key authentication. Pass your API key as a Bearer token.
2026-04-01 A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.
255"ik_a1b2c3d4e5f6"
Customer ID
"cust_abc123"
Auto-activate after creation
false
Billing configuration
Contract configuration
Currency code. Required when plan_id is not provided. When plan_id is set, defaults to the customer's currency.
"USD"
Items for the first subscription version. Without plan_id, this is the full set of items. With plan_id, items override matching plan items (by product_id or bundle_id) and non-matching items are appended.
Key-value metadata
Subscription name
"Acme Corp - Enterprise"
Plan ID to use as the base item set (optional)
"pln_abc123"
Renewal configuration
Success
Billing configuration
Contract configuration
When the subscription was created
"2025-12-15T10:30:00Z"
ISO 4217 currency code
"USD"
Customer ID
"cust_abc123"
Unique identifier
"sub_abc123"
Key-value metadata
Subscription name
"Acme Corp - Enterprise"
Pending version changes
Renewal configuration
Subscription status
"active"
When the subscription was last updated
"2026-04-04T10:00:05Z"
When the subscription was activated
"2026-01-01T00:00:00Z"
Current active version ID
"subv_abc123"
Subscription-level discount
Maximum spend threshold
Minimum spend threshold
Plan ID
"pln_abc123"
Price escalation configuration
Trial period in days
30