Skip to main content
POST
/
subscriptions
/
plans
Create a subscription plan
curl --request POST \
  --url https://api.billing.io/v1/subscriptions/plans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Pro Monthly",
  "amount_usd": 19.99,
  "description": "<string>",
  "trial_days": 0
}
'
{
  "id": "plan_1a2b3c4d5e",
  "org_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "amount": 123,
  "currency": "<string>",
  "interval_count": 123,
  "trial_days": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
Create a new subscription plan with a billing interval, amount, and token.
curl -X POST https://api.billing.io/v1/subscriptions/plans \
  -H "Authorization: Bearer $BILLING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro Monthly",
    "amount_usd": 29.99,
    "interval": "monthly",
    "token": "USDT",
    "chain": "tron",
    "trial_days": 14
  }'
Response
{
  "id": "plan_a1b2c3d4e5f6a7b8c9d0e1f2",
  "name": "Pro Monthly",
  "amount": 29.99,
  "currency": "USD",
  "interval": "monthly",
  "token": "USDT",
  "trial_days": 14,
  "status": "active",
  "created_at": "2025-01-15T12:00:00Z"
}

Authorizations

Authorization
string
header
required

Use your secret API key as a Bearer token. Keys are prefixed: sk_live_ (production) or sk_test_ (sandbox).

Body

application/json
name
string
required

Plan name

Maximum string length: 256
Example:

"Pro Monthly"

amount_usd
number<double>
required

Billing amount in USD

Required range: x >= 0.01
Example:

19.99

interval
enum<string>
required

Billing interval for subscription plans

Available options:
daily,
weekly,
monthly,
yearly
token
enum<string>
required

Stablecoin token

Available options:
USDT,
USDC
chain
enum<string>
required

Blockchain network

Available options:
tron,
arbitrum,
base
description
string | null

Plan description

Maximum string length: 1024
trial_days
integer
default:0

Number of free trial days

Required range: x >= 0

Response

Subscription plan created

id
string

Unique identifier (prefixed plan_)

Example:

"plan_1a2b3c4d5e"

org_id
string

Organization identifier

name
string

Plan name

description
string | null

Plan description

amount
number<double>

Billing amount

currency
string

Currency code

token
enum<string>

Stablecoin token

Available options:
USDT,
USDC
interval
enum<string>

Billing interval for subscription plans

Available options:
daily,
weekly,
monthly,
yearly
interval_count
integer

Number of intervals between billings

trial_days
integer

Number of free trial days

status
enum<string>
  • active — Plan is available for new subscriptions
  • archived — Plan is no longer available for new subscriptions
Available options:
active,
archived
environment
enum<string>
Available options:
live,
sandbox
created_at
string<date-time>
updated_at
string<date-time>