Skip to main content
POST
/
v1
/
subscriptions
/
{id}
/
preview-change
Preview a plan change
curl --request POST \
  --url https://api.useplinth.com/v1/subscriptions/{id}/preview-change \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "plan_id": "pln_01JABC...",
  "quantity": 1
}
'
{
  "object": "preview",
  "direction": "upgrade",
  "dueNowMinor": "466667",
  "creditMinor": "0",
  "scheduledFor": null
}

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

Proration preview

object
enum<string>
Available options:
preview
direction
enum<string>
Available options:
upgrade,
downgrade,
lateral
Example:

"upgrade"

dueNowMinor
string

Kobo to charge immediately (upgrade). Zero if deferred.

Example:

"466667"

creditMinor
string

Kobo to credit to balance (downgrade). Zero if deferred.

Example:

"0"

scheduledFor
string<date-time> | null

Set when the change is deferred to period end. Null if immediate.