Preview a prorated plan change

Generates a preview of the estimated charges, credits, or refunds for a subscription before making any changes.

This endpoint returns a prorated estimate for only one subscription per request.

How to use the Try It feature

Use the built-in API explorer to test this endpoint directly in your browser.

TaskInstructions
AuthenticateLocate the CREDENTIALS section on the right. Enter your username and password to ensure the request is authorized.
Select ExampleUse the EXAMPLES drop-down menu to load a pre-configured request body. The JSON payload will update automatically.
Customize DataModify the JSON fields in the BODY PARAMS section. Your changes update the request preview instantly.
ExecuteClick the Try It! button to send the API request and view the real-time response below.
Request body examples and use cases

Select a request body example

All of the request examples listed below can be selected from the EXAMPLES drop-down menu in the top-right corner of the Try It! feature.

Request ExampleUse Case
Estimate SubscriptionEstimate the total cost of a subscription, including the base product, add-ons, pricing in multiple currencies, proration, and applied coupons.
Upgrade PlanUpgrade a subscription from a lower-tier plan (e.g., "basic") to a higher-tier premium plan.
Downgrade PlanDowngrade a subscription from a higher-tier plan (e.g., "premium") to a lower-tier basic plan.
Add-On Quantity ChangeIncrease the quantity of an existing add-on in a subscription.
Complex Subscription ChangeModify multiple aspects of a subscription at the same time, including:
  • Updating the plan’s quantity and price
  • Adjusting add-on quantities and prices
  • Applying discounts to new or existing add-ons
  • Getting an updated cost estimate
Error handling

This table lists errors you may encounter when working with this endpoint and provides solutions to help you troubleshoot.

StatusError MessageSolution
400Request must contain a single root object.Ensure the request payload contains a single root object.
400Request must contain a subscription ID.Ensure the subscription ID is included in your request payload.
400Proration is not allowed for this subscription.Check the subscription's eligibility for proration.
400Refund exceeds the last charge amount.Ensure the refund amount does not exceed the last charge amount.
404Subscription ID does not exist: Verify the subscription ID is correct and exists.
500Subscription is not changeableVerify that the subscriptionID is changeable, or try again with a different subscription.
Body Params
string
required

Unique identifier for the subscription.

string

Product identifier for the subscription change.

int32

Quantity of the product.

pricing
object
required

Pricing details for the subscription.

addons
array of objects

List of add-ons included in the subscription.

addons
boolean

Indicates whether the subscription change should be prorated.

coupons
array of strings

Array of coupon codes to be applied to the subscription.

coupons
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json