Subscriptions
Subscriptions enable recurring crypto payments. Create a subscription tied to a product plan and price, then manage its lifecycle through pause, resume, and cancel actions.
Subscription lifecycle
Create a subscription
POST
/subscriptionsRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | Yes | Your app UUID |
customerAccountId | string | Yes | Customer UUID |
productPlanId | string | Yes | Product plan UUID |
productPlanPriceId | string | Yes | Specific price UUID |
allowedChains | "ALL" | number[] | No | Allowed blockchain chain IDs |
allowedTokens | "ALL" | string[] | No | Allowed token identifiers |
metadata | object | No | Arbitrary key-value metadata |
💡
Initial payment
After creating a subscription, use the Create checkout endpoint to generate a payment page for the first billing period.
Create subscription checkout
POST
/subscriptions/:id/checkoutCreates a checkout session for the subscription's initial payment. The customer pays through the hosted checkout, and the subscription moves to ACTIVE on success.
List subscriptions
GET
/subscriptionsQuery parameters
| Parameter | Type | Description |
|---|---|---|
appId | string | Filter by app UUID |
status | string | Filter by status |
page | number | Page number (default: 1) |
pageSize | number | Items per page (max 100) |
Retrieve a subscription
GET
/subscriptions/:idPause a subscription
POST
/subscriptions/:id/pausePauses an active subscription. No further invoices are generated until resumed.
Resume a subscription
POST
/subscriptions/:id/resumeCancel a subscription
POST
/subscriptions/:id/cancel| Parameter | Type | Required | Description |
|---|---|---|---|
cancelAtPeriodEnd | boolean | No | If true, cancel at end of current period (default: false = immediate) |
Response object
All responses are wrapped in { "success": true, "data": ... }. List endpoints add pagination.
Subscription fields
idstringUnique subscription UUIDappIdstringApp this subscription belongs tocustomerAccountIdstringCustomer UUIDproductPlanIdstringProduct plan UUIDproductPlanPriceIdstringSelected price UUIDstatusstringPENDING, ACTIVE, PAUSED, CANCELLED, or PAST_DUEcustomerWalletIdstring | nullWallet used for paymentsauthorizationMethodstring | nullDIRECT, PERMIT, or APPROVALauthorizationChainIdnumber | nullChain ID for recurring chargesauthorizationTokenKeystring | nullToken key for recurring chargespermitSignaturestring | nullEIP-2612 permit signaturepermitDeadlinestring | nullPermit expiration timestamppermitNoncestring | nullPermit nonceapprovedAllowancestring | nullERC-20 approved allowance amountcurrentPeriodStartstring | nullISO 8601 current billing period startcurrentPeriodEndstring | nullISO 8601 current billing period endbillingCycleAnchorstring | nullISO 8601 anchor date for billing cyclestrialStartstring | nullISO 8601 trial starttrialEndstring | nullISO 8601 trial endcancelAtstring | nullISO 8601 scheduled cancellation datecancelledAtstring | nullISO 8601 actual cancellation timestampcancelAtPeriodEndbooleanWhether to cancel at end of current periodpausedAtstring | nullISO 8601 pause timestamppastDueSincestring | nullISO 8601 timestamp when subscription became past duecaptureRetryCountnumberNumber of failed capture attempts this cyclemaxCaptureRetriesnumberMaximum capture retries before marking past duependingJobIdstring | nullInternal scheduler job IDallowedChains'ALL' | number[]Permitted blockchain chain IDsallowedTokens'ALL' | string[]Permitted token identifiersmetadataobjectArbitrary key-value pairscreatedAtstringISO 8601 creation timestampupdatedAtstringISO 8601 last-update timestamp💡
Endpoint variations
Create includes
productPlan and productPlanPrice. List adds customerAccount and productPlan.taxRate. Retrieve is the richest: includes app, customerAccount, customerWallet, productPlan.taxRate, and the last 10 invoices (with items, taxRate, and paymentIntent). Pause/resume/cancel return scalar fields only (no relations).