Subscriptions
Subscriptions enable recurring crypto payments. Create a product plan with a price, then subscribe customers to it.
Full flow
Step 1: Create a product plan and price
A subscription requires a product plan with at least one price. Plans define what you're selling, and prices define how much and how often the customer is billed.
Product Plans
Step 2: Create a customer
Step 3: Create the subscription
Step 4: Create checkout for initial authorization
Pause a subscription
Temporarily pause billing. The customer keeps access until the current period ends.
Resume a subscription
Cancel a subscription
List subscriptions
Retrieve a subscription
When you retrieve a subscription, the response includes the last 10 invoices. Each paid invoice includes its full payment intent with on-chain transaction details.
Webhooks
| Event | Description |
|---|---|
subscription.created | Subscription was created |
subscription.activated | Subscription became active |
subscription.renewed | Recurring payment was collected |
subscription.cancelled | Subscription was cancelled |
subscription.paused | Subscription was paused |
subscription.resumed | Subscription was resumed |
Methods reference
| Method | Description |
|---|---|
create(params) | Create a new subscription |
retrieve(id) | Retrieve a subscription by ID |
list(params?) | List subscriptions with optional filters |
pause(id) | Pause billing |
resume(id) | Resume a paused subscription |
cancel(id, params?) | Cancel a subscription |
createCheckout(id) | Create a hosted checkout session for initial authorization |
TypeScript types
Response body reference
All responses are wrapped in { success: true, data: ... }. The fields below describe what's inside data.
create() response
Subscription (create)
idstringUnique subscription ID (UUID)appIdstringYour app IDcustomerAccountIdstringCustomer being subscribedproductPlanIdstringProduct plan IDproductPlanPriceIdstringPrice IDstatusstring"CREATED" or "TRIALING"customerWalletIdnullSet after customer authorizesauthorizationMethodnullNATIVE, PERMIT, or EIP7702authorizationChainIdnullChain selected for paymentsauthorizationTokenKeynullToken selected for paymentspermitSignaturenullPermit signature if applicablepermitDeadlinenullPermit deadline if applicablepermitNoncenullPermit nonce if applicableapprovedAllowancenullERC-20 allowance amountcurrentPeriodStartstringCurrent billing period startcurrentPeriodEndstringCurrent billing period endbillingCycleAnchorstringAnchor date for billingtrialStartstring | nullTrial start date if applicabletrialEndstring | nullTrial end date if applicablecancelAtnullScheduled cancellation datecancelledAtnullWhen the subscription was cancelledcancelAtPeriodEndbooleanWhether cancel is deferred to period endpausedAtnullWhen the subscription was pausedpastDueSincenullWhen subscription entered past-due statecaptureRetryCountnumberCurrent retry count for paymentsmaxCaptureRetriesnumberMax retries before cancellationallowedChainsstring | number[]"ALL" or array of chain IDsallowedTokensstring | string[]"ALL" or array of token keysmetadataobjectYour metadata key-value pairscreatedAtstringISO 8601 creation timestampupdatedAtstringISO 8601 last update timestampproductPlanProductPlanFull product plan objectproductPlanPriceProductPlanPriceFull price objectretrieve() response
Returns all fields from create() above, plus these additional nested objects. This is the most complete response:
Additional fields on retrieve
appAppFull app objectproductPlan.taxRateTaxRate | nullTax rate on the plancustomerAccountCustomerAccountFull customer objectcustomerWalletCustomerWallet | nullWallet used for payments (with chain info)invoicesInvoice[]Last 10 invoices (descending by date)Invoices are richly nested
invoices[] includes its own taxRate, items[] (with each item's taxRate), and paymentIntent (full payment intent object). This gives you complete billing history with on-chain tx details in a single call.list() response
Returns a lighter response than retrieve(). Each subscription includesproductPlan (with taxRate), productPlanPrice, and customerAccount. Does not include app, customerWallet, or invoices.
pause(), resume(), cancel() response
All three return the subscription with scalar fields only (no relations). Key fields that change:
State changes per action
pause → statusstring"PAUSED", pausedAt is setresume → statusstring"ACTIVE", pausedAt is cleared, new period dates setcancel → statusstring"CANCELLED" (immediate) or unchanged (if cancelAtPeriodEnd=true)cancel → cancelAtPeriodEndbooleantrue if deferred, cancelAt is set to period end