Subscriptions
Recurring revenue API.
Subscriptions are bound to a SubscriptionPlan (the template) and a Customer (the buyer). The customer's wallet authorises a multi-period allowance; Strimz's scheduler charges every period.
Plans
Only the return URLs can change after creation. null clears one; an omitted field stays the same. Any other field answers 400 invalid_request. See Plans: return URLs.
Subscriptions
Customers create subscriptions on-chain via your hosted checkout. There's no POST /v1/subscriptions endpoint. The indexer projects them when the chain emits SubscriptionCreated.
Read paths:
The list also takes customerId to show one customer's subscriptions, and from and to for subscriptions created in a range. See List filters.
Cancel marks the subscription cancelled in Strimz right away and queues the on-chain cancel.
Status enum
Only cancelled and lapsed are terminal; at_risk is recoverable if the customer tops up their wallet. The schema also lists paused, but there are no pause or resume routes and nothing sets it today.
Charges
The indexer records every charge attempt from on-chain events: successful, failed and skipped. List them for one subscription, newest first:
It needs the subscriptions_read scope and pages like every other list (limit up to 100, cursor). Each item has a status and an outcome. For example, insufficient_funds is a payment failure, and token_not_allowed means the subscriber's token was delisted. Neither is a fault in your integration.
Successful charges also fire subscription.charged, and payment failures fire subscription.charge_failed.
Webhook events
| Event | Fires when |
|---|---|
subscription.created | A new on-chain subscription is observed |
subscription.charged | A periodic charge succeeded |
subscription.charge_failed | A charge attempt failed |
subscription.cancelled | The merchant or customer cancelled |
subscription.lapsed | Grace period exceeded |

