The subscribe endpoint at
POST /store/carts/:id/subscribe is idempotent — if the completed order is already linked to a subscription, the existing subscription is returned.GET /store/products/:id/subscription-offer
Returns the effective subscription offer for a product, optionally scoped to a specific variant. Variant-level offers take precedence over product-level offers. Returnsis_subscription_available: false when no active offer exists.
Path parameters
Product ID.
Query parameters
Optional variant ID. When provided, the response reflects the variant-level offer if one exists.
Response
Response example — offer available
Response example — no offer
POST /store/carts/:id/subscribe
Converts a cart to a subscription order at checkout. The cart must contain exactly one subscription line item with quantity1. Line item metadata is the authoritative source for subscription configuration.
Mixed carts (subscription and one-time items together) are not supported in the current version. Standard one-time checkout is not affected by this route.
Path parameters
Cart ID.
Line item metadata contract
The following metadata fields must be set on the subscription line item before calling this endpoint.Must be
true to mark the line item as a subscription.Billing interval. One of
week, month, or year.Billing cadence as a positive integer.
Optional cart metadata
When present, must be
"subscription". Mixed purchase mode is not supported.Line item metadata example
Response
Returns the created subscription on success. If the order is already linked to a subscription (idempotent re-call), returns the existing subscription.Errors
| Code | Error | Meaning |
|---|---|---|
400 | invalid_data | Mixed cart, missing subscription line item, invalid metadata, or unsupported purchase_mode value |