post https://api.fastspring.com/subscriptions/estimate
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 |
|
2. Choose a request example |
|
3. Edit parameters |
|
4. Send the request |
|
📘 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:
|
🛑 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 subscription ID is changeable, or try again with a different subscription. |