SnozeDevelopers
API referenceBilling

Preview a subscription plan change

Quotes moving the existing subscription to the requested plan and billing interval without changing anything. A more expensive plan on the same interval applies now and returns the prorated charge (per-second, before tax and discounts); cheaper plans and interval switches are scheduled for the renewal. Requires a Clerk session with a synced profile and the `billing:manage` workspace permission; the caller's pricing-experiment variant is applied.

GET
/v1/workspaces/{workspaceId}/billing/change-plan/preview

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string

Query Parameters

plan*string
Value in"free""team""business""enterprise"
interval*string
Value in"month""year"

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X GET 'https://api.snoze.dev/v1/workspaces/string/billing/change-plan/preview?plan=free&interval=month'
Example Response
{  "data": {    "plan": "free",    "interval": "month",    "fromPlan": "free",    "fromInterval": "month",    "timing": "now",    "effectiveAt": "string",    "seats": 0,    "currency": "string",    "pricePerSeatCents": 0,    "recurringAmountCents": 0,    "renewsAt": "string",    "accountBalanceCents": 0,    "hasDiscount": true,    "replacesScheduledChange": true,    "proration": {      "from": "string",      "to": "string",      "newPlanCents": 0,      "unusedCreditCents": 0,      "balanceAppliedCents": 0,      "dueNowCents": 0    }  }}