Skip to main content

Subscriptions

Settlx subscriptions let you charge customers on a recurring schedule — weekly, monthly, annually, or any custom interval — using crypto. You create a plan once, enroll your customers, and Settlx handles the billing cycle automatically.

How it works

  1. Create a plan in the dashboard. Plans define the price, interval, and grace period.
  2. Enroll a subscriber via API from your backend whenever a customer signs up.
  3. Settlx creates the first invoice immediately and fires a subscriber.enrolled webhook.
  4. When the customer pays, Settlx fires subscriber.activated and advances their subscription period.
  5. At the start of each new billing cycle, Settlx creates a new invoice automatically and fires subscriber.past_due.
  6. If payment is not received before the grace period ends, the subscriber is expired and subscriber.expired fires.

Subscriber statuses

Subscribers start as pending and only become active after their first payment is confirmed on-chain. Do not provision access until you receive the subscriber.activated webhook.

Plans

Plans are created and managed from the Subscriptions → Plans section of your dashboard. The following fields are set at creation and cannot be changed after subscribers have enrolled: These fields can be updated at any time:

Grace period

Every subscriber has a grace period — the window they have to pay each invoice before their subscription is expired. The grace period starts from the moment an invoice is created.
  • Minimum grace period is 1 day
  • If a subscriber does not pay within the grace period, their status transitions to expired and subscriber.expired fires
  • To reinstate an expired subscriber, you must re-enroll them

Trial periods

If a plan has trialPeriodDays > 0, enrolled subscribers start as trialing. No invoice is created during the trial. When the trial ends, the first invoice is generated automatically and billing begins.

Enrolling subscribers

Enroll subscribers from your backend server using your API key:
See Enroll Subscriber for the full API reference.
Never enroll subscribers from client-side code. Your API key must be kept server-side only.

Receiving subscription webhooks

Set your Webhook URL in Settings → Developer. Settlx will POST all subscription lifecycle events to that URL — signed with the same HMAC-SHA256 secret as invoice webhooks. Subscription events use a flat payload (no data wrapper):
The signature is in the X-Webhook-Signature header — same as invoice webhooks. Verify it the same way — see Webhook Integration.

Handling all event types together

Node.js

Subscription lifecycle reference


Manual actions

From the dashboard (Subscriptions → Subscribers → [subscriber]) you can:

Re-billing

If a subscriber is stuck in pending or past_due and you want to prompt them to pay again, use the Send Invoice button on the subscriber detail page (or POST .../rebill via the merchant API). This is fully idempotent — if a pending invoice already exists, no duplicate is created.