Skip to main content
PATCH
/
subscriptions
/
plans
/
{id}
Update or archive a subscription plan
curl --request PATCH \
  --url https://api.billing.io/v1/subscriptions/plans/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'
{
  "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"
}
Update a plan’s name, description, or archive it.
curl -X PATCH https://api.billing.io/v1/subscriptions/plans/plan_a1b2c3d4e5f6 \
  -H "Authorization: Bearer $BILLING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "archived" }'

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

The subscription plan identifier (prefixed plan_)

Body

application/json
name
string

Plan name

Maximum string length: 256
description
string | null

Plan description

Maximum string length: 1024
status
enum<string>
  • active — Plan is available for new subscriptions
  • archived — Plan is no longer available for new subscriptions
Available options:
active,
archived

Response

Subscription plan updated

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>