Pricing previews
POST /api/v1/preview/plan-change
POST /api/v1/preview/plan-changeBody
Field
Type
Required
Response 200
200{
"data": {
"subscriptionId": "sub_01H...",
"currentProduct": { "id": "prod_a", "name": "Starter", "priceCents": 1900 },
"targetProduct": { "id": "prod_b", "name": "Pro", "priceCents": 4900 },
"direction": "upgrade",
"effectiveDate": "2026-05-02T14:01:23Z",
"planDependencyAdjustments": [
{
"linkId": "ln_01H...",
"sourceChargeId": "ch_a",
"targetChargeId": "ch_b",
"targetField": "quantity",
"explanation": "Will keep quantity in sync after plan change via \"Base ↔ add-on seats\""
}
],
"financialImpact": {
"currentPriceCents": 1900,
"newPriceCents": 4900,
"creditCents": 950,
"chargeCents": 2450,
"netCents": 1500,
"currency": "USD"
},
"businessRule": {
"ruleId": "br_01H...",
"ruleName": "Default upgrade",
"direction": "upgrade",
"changeTiming": "immediate",
"prorationType": "prorated"
},
"policyEvaluation": {
"allowed": true,
"evaluations": [
{ "policyId": "pol_01H...", "policyName": "...", "policyType": "plan_change", "result": "allow" }
]
},
"resolvedPrice": {
"basePriceCents": 4900,
"pricingTierCount": 3,
"tiers": [
{ "id": "pt_01H...", "name": "Default", "price": "4900", "currency": "USD", "chargeModel": "flat" }
]
}
}
}Errors
Status
When
cURL
POST /api/v1/preview/add-on
POST /api/v1/preview/add-onBody
Field
Type
Required
Response 200
200Errors
Status
When
cURL
POST /api/v1/preview/cancellation
POST /api/v1/preview/cancellationBody
Field
Type
Required
Response 200
200Errors
Status
When
cURL
GET /api/v1/pricing/resolve
GET /api/v1/pricing/resolveQuery
Param
Type
Required
Description
Response 200
200Errors
Status
When
cURL
Related
Last updated
Was this helpful?
