Skip to main content
POST
Create Plan
Create a subscription plan — the price, how often it bills, and how long a late payer has to catch up.

Request authentication

This endpoint requires a Secret Key (sk_...) passed in either the x-api-key header or as a Bearer token in the Authorization header.

Request parameters

string
required
What customers see on the plan, for example Pro monthly.
number
required
The price per billing period, in currency.
string
required
How often the plan bills: day, week, month or year.
string
default:"USD"
The fiat currency the plan is priced in. Customers pay the stablecoin equivalent.
integer
default:"1"
Bill every N intervals. 3 with month is quarterly.
integer
default:"0"
A free trial before the first charge.
integer
default:"7"
Days after a period ends that a subscriber can still pay before the subscription expires. Between 0 and 30.
string
default:"invoice"
invoice sends a pay link each cycle — the only value accepted today. auto_debit (pull against an approved on-chain allowance) and both are coming soon and are rejected for now.
string
What subscribers get on this plan.
object
Any key-value data you want stored alongside the plan.

Authorizations

x-api-key
string
header
required

Body

application/json
name
string
required
Example:

"Pro monthly"

amount
number
required
Example:

49

interval
enum<string>
required
Available options:
day,
week,
month,
year
description
string
currency
string
default:USD
Example:

"USD"

interval_count
integer
default:1
Example:

1

trial_days
integer
default:0
Example:

14

grace_days
integer
default:7

Days after a period ends that a subscriber can still pay before the subscription expires.

Required range: 0 <= x <= 30
Example:

7

collection_mode
enum<string>
default:invoice

Only invoice is accepted today. auto_debit (pull against an approved on-chain allowance) is coming soon; sending it is rejected.

Available options:
invoice
metadata
object

Response

The plan.

A single plan.

message
string
data
object