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
change_type
required

One of new, upgrade, downgrade, cancel_scheduled_change, none, blocked. See [change_type].

string
effective_at

When the change takes effect. Absent for changes applied immediately.

string | null format: date-time
amount_due_now_cents
required

What Stripe charges today. For an upgrade this is the prorated difference (Stripe’s own preview of the immediate invoice); for a downgrade it is always zero.

integer format: int64
next_invoice_total_cents
required

For an upgrade or a first purchase: the total of the invoice raised today. For a downgrade: what this product costs per billing period from effective_at (zero when moving to free, or when a complimentary plan covers it).

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
message

Why a blocked change cannot be made yet.

string | null
Example generated
{
"change_type": "example",
"effective_at": "2026-04-15T12:00:00Z",
"amount_due_now_cents": 1,
"next_invoice_total_cents": 1,
"currency": "example",
"lines": [
{
"description": "example",
"amount_cents": 1
}
],
"warnings": [
{
"kind": "example",
"message": "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