Pricing previews
Preview endpoints are read-only operations that return what would happen if you executed a plan change, add-on attach, or cancellation — including effective date, proration, applicable business rule, plan dependency adjustments, and policy evaluation.
The pricing-resolve endpoint returns the effective price for a product given a customer context.
POST /api/v1/preview/plan-change
Preview a plan change. No state changes.
Auth scope:
read
Body
subscriptionId
UUID
yes
targetProductId
UUID
yes
Response 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
404
Subscription or target product not found
cURL
POST /api/v1/preview/add-on
Preview attaching an add-on.
Auth scope:
read
Body
subscriptionId
UUID
yes
addOnProductId
UUID
yes
Response 200
Errors
404
Subscription or add-on product not found
cURL
POST /api/v1/preview/cancellation
Preview cancelling a subscription.
Auth scope:
read
Body
subscriptionId
UUID
yes
Response 200
Errors
404
Subscription not found
cURL
GET /api/v1/pricing/resolve
Resolve the effective price for a product given a customer context. Applies pricing tiers, quantity multipliers, and active offers.
Auth scope:
read
Query
productId
UUID
yes
Catalog product
segment
string (≤100)
no
Customer segment
locale
string (≤20)
no
e.g. en-US, de-DE
partner
string (≤255)
no
Partner ID
quantity
integer ≥ 1
no
Defaults to 1
Response 200
Errors
400
Validation failed
404
Product not found
cURL
Related
Subscriptions — execute a previewed change
Last updated
Was this helpful?
