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
Step Description
1. Provide basic auth credentials
  • Locate the CREDENTIALS section to the right.
  • Enter your username and password for basic authentication.
  • Ensure the credentials are correctly input to authenticate your requests.
2. Choose a request example
  • If multiple request examples exist, select one from the EXAMPLES drop-down menu.
  • The request body updates automatically based on your selection.
3. Edit parameters
  • Edit the JSON fields listed under the BODY PARAMS section. When you add a new value, the example value will be overridden. Your changes update the request preview instantly

4. Send the request
  • Click Try It! to submit the request and view the response body below.
📘 Request body examples and use cases

Select a request body example

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



Request Body Example Use Case
Estimate Subscription Estimate the total cost of a subscription, including the base product, add-ons, pricing in multiple currencies, proration, and applied coupons.
Upgrade Plan Upgrade a subscription from a lower-tier plan (e.g., "basic") to a higher-tier premium plan.
Downgrade Plan Downgrade a subscription from a higher-tier plan (e.g., "premium") to a lower-tier basic plan.
Add-On Quantity Change Increase the quantity of an existing add-on in a subscription.
Complex Subscription Change Modify 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 run into when working with this endpoint and solutions to help you troubleshoot.

Status Code Error Message Solution
400 Request must contain a single root object. Ensure the request payload contains a single root object.
400 Request must contain a subscription ID. Ensure the subscription ID is included in your request payload.
400 Proration is not allowed for this subscription. Check the subscription's eligibility for proration.
400 Refund exceeds the last charge amount. Ensure the refund amount does not exceed the last charge amount.
404 Subscription ID does not exist: [subscriptionId] Verify the subscription ID is correct and exists.
500 Subscription is not changeable Verify that the subscriptionID is changeable, or try again with a different subscription.
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!