Skip to content

Preview the cost and consequences of a plan change.

POST
/billing/change-plan/preview
curl --request POST \
--url https://api.siteqwality.com/billing/change-plan/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "product": "uptime", "pack_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "billing_interval": "example" }'
Media type application/json
object
product
required
string
Allowed values: uptime synthetic telemetry incidents sms status_pages rum_observe rum_analyze session_replay partner
pack_id
required
string format: uuid
billing_interval
required
string

Proration preview and downgrade warnings

Media type application/json
object
amount_due_now_cents
required

What Stripe will charge immediately. Zero under the current proration policy for an existing subscription: create_prorations puts the difference on the NEXT invoice rather than charging now.

integer format: int64
next_invoice_total_cents
required
integer format: int64
currency
required
string
lines
required
Array<object>
object
description
required
string
amount_cents
required
integer format: int64
warnings
required
Array<object>

Something the customer loses by making this change.

object
kind
required

Stable machine key, so the client can style or order without parsing the message.

string
message
required
string
Example generated
{
"amount_due_now_cents": 1,
"next_invoice_total_cents": 1,
"currency": "example",
"lines": [
{
"description": "example",
"amount_cents": 1
}
],
"warnings": [
{
"kind": "example",
"message": "example"
}
]
}

Unknown pack, inactive pack, or an add-on pack

Missing or invalid authentication

Caller is not a super admin

Internal server error