Preview Variant/Price Change
Changed onReturns a non-destructive preview of changing the variant and price of a subscription line item, including proration math, the next charge amount, and the effective date. Follows the same upgrade/downgrade rules as the in-app self-serve flow.
Source allowed products_price_id targets from GET /products/prices/{price_id}/change_options. After previewing, call POST /orders/line_items/{line_item_id}/changes/perform with the same body to commit. The response envelope is identical between preview and commit and only the preview flag flips.
On commit, the previous_line_item block reflects the line item's pre-change state for products_price, products_variant, original_product, and prorated. Other scalar attributes (created_at, updated_at, quantity) reflect the post-commit state on the underlying record.
See Step 2 - Preview the change in the Subscription Changes Skill, and Step 1 - Discover what's allowed for sourcing a legal target.
Request
- Base URLhttps://myworkspace.myclickfunnels.com/api/v2
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://accounts.myclickfunnels.com/oauth/authorizeToken URLhttps://accounts.myclickfunnels.com/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The id of the subscription line item. Accepts either the integer database id or the obfuscated public_id string returned by line-item endpoints.
Request body
Example request
{
"orders_line_items_change": {
"products_price_id": 24,
"prorate": true,
"effective_time": "now"
}
}Response
OK
Example response
{
"orders_line_items_change": {
"preview": true,
"upcoming_invoice": {
"total_amount": "35.83",
"subtotal_amount": "35.83",
"tax_amount": "0.00",
"shipping_amount": "0.00",
"discount_amount": "0.00",
"currency": "USD",
"next_invoice_date": "2026-05-14T03:49:45Z"
},
"previous_line_item": {
"id": 9,
"public_id": "yZaBcD",
"order_id": 7,
"quantity": 1,
"prorated": null,
"created_at": "2025-01-01T00:00:00.000Z",
"updated_at": "2025-01-01T00:00:00.000Z",
"original_product": {
"id": 15,
"public_id": "AbC123",
"name": "Sample Product"
},
"products_price": {
"id": 24,
"public_id": "aBcDeF",
"name": "Pro Monthly",
"key": "pro_monthly_2024",
"amount": "20.00",
"currency": "USD",
"duration": null,
"interval": "months",
"interval_count": 1
},
"products_variant": null
},
"new_line_item": {
"id": 9,
"public_id": "yZaBcD",
"order_id": 7,
"quantity": 1,
"prorated": null,
"created_at": "2025-01-01T00:00:00.000Z",
"updated_at": "2025-01-01T00:00:00.000Z",
"original_product": {
"id": 15,
"public_id": "AbC123",
"name": "Sample Product"
},
"products_price": {
"id": 24,
"public_id": "aBcDeF",
"name": "Pro Monthly",
"key": "pro_monthly_2024",
"amount": "20.00",
"currency": "USD",
"duration": null,
"interval": "months",
"interval_count": 1
},
"products_variant": null
}
}
}Changes
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info