04 plans

Plans are reusable subscription templates. Create a plan once, share its payment link, and let anyone subscribe.

How Plans Work

1. Merchant creates Plan → Gets shareable payment URL
2. Anyone visits URL → Enters email → Selects chain/currency
3. Subscriber approves token spending → Subscription created
4. Billing runs automatically based on plan settings

Plan vs Subscription

Concept
Description

Plan

Template (product definition) — reusable

Subscription

Instance (customer relationship) — one per subscriber

Example: One "Pro Monthly $29" plan can have 1,000 subscriptions.


Create Plan

POST /plans

Request

{
  "name": "Pro Monthly",
  "description": "Full access to all features",
  "amount": 29.99,
  "interval": "monthly",
  "interval_count": 1,
  "chains": ["solana", "base"],
  "currencies": ["USDC", "USDT"],
  "buffer_hours": 24,
  "trial_days": 14,
  "splits": [
    {
      "address": "partner_wallet_address",
      "chain": "solana",
      "percentage": 1000,
      "label": "Partner"
    }
  ],
  "metadata": {
    "features": ["api_access", "priority_support"]
  }
}

Parameters

Field
Type
Required
Description

name

string

Plan name (max 100 chars)

description

string

Plan description (max 500 chars)

amount

number

Price per billing cycle

interval

string

weekly, monthly, yearly

interval_count

number

Every N intervals (default: 1)

chains

string[]

Accepted chains (default: all)

currencies

string[]

Accepted currencies (default: all)

buffer_hours

number

Escrow buffer 0-168 (default: 24)

trial_days

number

Free trial period 0-90 (default: 0)

splits

array

Revenue sharing (max 5, max 50% total)

metadata

object

Custom data

Response


Get Plan

Response


Get Plan (Public)

For embedding on your website. No authentication required.

Response


List Plans

Query Parameters

Parameter
Type
Description

is_active

boolean

Filter by active status

interval

string

Filter by interval

page

number

Page number

limit

number

Items per page (max 100)

Response


Update Plan

Only certain fields can be updated. Pricing changes require a new plan.

Request

Updatable Fields

Field
Description

name

Plan display name

description

Plan description

is_active

Enable/disable plan

metadata

Custom data

Note: Cannot update amount, interval, chains, currencies, or splits. Create a new plan instead.

Response


Archive Plan

Deactivate a plan. Existing subscriptions continue, but no new subscriptions can be created.

Response


Get Plan Stats

Response


Revenue Splits

Split revenue automatically with partners, affiliates, or team members.

Split Configuration

Rules

  • Maximum 5 splits per plan

  • Total percentage cannot exceed 50% (5000 basis points)

  • Percentage in basis points: 100 = 1%, 1000 = 10%

  • Split address must match the chain it's configured for

  • Splits are paid on each charge release

Split Execution

When a charge is released:


Embedding Plans

Share directly or embed in buttons:

Custom Button

Fetch Plan Details


Plan Webhooks

Event
Description

plan.created

New plan created

plan.updated

Plan details updated

plan.archived

Plan archived

Example Payload


Best Practices

  1. Create separate plans for pricing tiers — Don't update amounts, create new plans.

  2. Use descriptive names — "Pro Monthly $29" is clearer than "Plan A".

  3. Set appropriate trial periods — 7-14 days is typical for SaaS.

  4. Configure buffer hours based on delivery — Digital: 24h, Physical: 48-168h.

  5. Archive instead of delete — Keeps historical data for existing subscriptions.

  6. Use metadata for internal tracking — Store feature flags, internal IDs, etc.

Last updated