Skip to main content
POST
/
v1
/
subscriptions
/
{id}
/
change
Change plan
curl --request POST \
  --url https://api.useplinth.com/v1/subscriptions/{id}/change \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "plan_id": "pln_01JABC...",
  "quantity": 1
}
'
{
  "object": "subscription",
  "invoice_id": "<string>",
  "amount_charged_minor": "<string>",
  "credit_applied_minor": "<string>",
  "scheduled_for": "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
plan_id
string
required
Example:

"pln_01JABC..."

quantity
integer
Example:

1

Response

200 - application/json

Plan changed or change scheduled

object
enum<string>
Available options:
subscription
strategy
enum<string>
Available options:
immediate_prorated,
at_period_end,
at_trial_end
direction
enum<string>
Available options:
upgrade,
downgrade,
lateral
invoice_id
string | null
amount_charged_minor
string | null
credit_applied_minor
string | null
scheduled_for
string<date-time> | null