Products::Prices::ChangeOption
List Upgrade/Downgrade Options
Returns the allowed upgrade and downgrade target variants for a price, grouped by target variant. Each group lists the prices on the target variant that a subscription using this source price may switch to. Use this to render dynamic upgrade pricing pages, or to source target products_price_id values for the line item change endpoints: POST /orders/line_items/{line_item_id}/changes (preview) and POST /orders/line_items/{line_item_id}/changes/perform (commit).
get/products/prices/{price_id}/change_options
Path parameters
The source price for which to look up allowed upgrade/downgrade targets. Accepts either the integer database id or the obfuscated public_id string.
Response
OK
Example response
{
"products_prices_change_options": {
"upgrade": [
{
"products_variant": {
"id": 124,
"public_id": "k7xQzR",
"name": "Pro",
"product_id": 88,
"prices": [
{
"id": 456,
"public_id": "aBcDeF",
"name": "Pro Monthly",
"key": "pro_monthly_2024",
"amount": "20.00",
"currency": "USD",
"duration": null,
"interval": "months",
"interval_count": 1
},
{
"id": 457,
"public_id": "gHiJkL",
"name": "Pro Annual",
"key": "pro_annual_2024",
"amount": "200.00",
"currency": "USD",
"duration": null,
"interval": "years",
"interval_count": 1
}
]
}
}
],
"downgrade": [
{
"products_variant": {
"id": 125,
"public_id": "m2qYpA",
"name": "Basic",
"product_id": 88,
"prices": [
{
"id": 789,
"public_id": "sTuVwX",
"name": "Basic Monthly",
"key": "basic_monthly_2024",
"amount": "5.00",
"currency": "USD",
"duration": null,
"interval": "months",
"interval_count": 1
}
]
}
}
]
}
}