Skip to main content
PATCH
/
v1
/
plans
/
{id}
Update a plan
curl --request PATCH \
  --url https://api.useplinth.com/v1/plans/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "amount_minor": 123,
  "billing_interval_count": 123,
  "trial_period_days": 123,
  "lookup_key": "<string>",
  "active": true
}
'
{
  "object": "plan",
  "id": "pln_01JABC...",
  "plan_group_id": "pg_01JABC...",
  "name": "Pro",
  "amount_minor": "500000",
  "interval": "month",
  "interval_count": 1,
  "trial_period_days": 14,
  "lookup_key": "pro_monthly",
  "active": true,
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Use sk_test_ keys for sandbox. Use sk_live_ keys for production. Obtain your key from the dashboard.

Path Parameters

id
string
required

Body

application/json
name
string
Maximum string length: 100
amount_minor
integer

Only allowed if the plan has no subscribers.

billing_interval
enum<string>
Available options:
day,
week,
month,
year
billing_interval_count
integer
trial_period_days
integer
lookup_key
string | null
Pattern: ^[a-z0-9_]+$
active
boolean

Set false to archive.

Response

Plan updated

object
enum<string>
Available options:
plan
id
string
Example:

"pln_01JABC..."

plan_group_id
string
Example:

"pg_01JABC..."

name
string
Example:

"Pro"

amount_minor
string

Amount in kobo as a string. ₦5,000 = "500000".

Example:

"500000"

interval
enum<string>
Available options:
day,
week,
month,
year
Example:

"month"

interval_count
integer
Example:

1

trial_period_days
integer
Example:

14

lookup_key
string | null

Stable, human-meaningful handle for the plan (e.g. "pro_monthly"). Unique per tenant. Reference this instead of the UUID so your app doesn't hardcode environment-specific ids.

Example:

"pro_monthly"

active
boolean

false when the plan is archived — hidden from the default plan list and closed to new subscriptions. Existing subscribers keep billing.

Example:

true

created_at
string<date-time>