What's new?
We added a new update_summary object to the response when working with the preview an update to a subscription and preview a one-time charge for a subscription operations.
Impact of this subscription change. Includes whether the change results in a charge or credit, and totals for prorated amounts.
Details of any credit adjustments created for this update. Paddle creates adjustments against existing transactions when prorating.
Amount in the lowest denomination for the currency, e.g. 10 USD = 1000 (cents). Although represented as a string, this value must be a valid integer.
Supported three-letter ISO 4217 currency code.
Details of the transaction to be created for this update. Paddle creates a transaction to bill for new charges.
Amount in the lowest denomination for the currency, e.g. 10 USD = 1000 (cents). Although represented as a string, this value must be a valid integer.
Supported three-letter ISO 4217 currency code.
Details of the result of credits and charges. Where the total of any credit adjustments is greater than the total charge, the result is a prorated credit; otherwise, the result is a prorated charge.
Whether the subscription change results in a prorated credit or a charge.
Amount representing the result of this update, either a charge or a credit.
Three-letter ISO 4217 currency code for the transaction or adjustment.
How it works
You can use the preview an update to a subscription and preview a one-time charge for a subscription operations to preview a change to a subscription before making it.
The response includes immediate_transaction, next_transaction, and recurring_transaction_details objects, which let you preview any transactions created as a result of your change, as well as the impact on the regular amount that a customer is charged.
Previously, to determine whether a change resulted in a prorated charge or credit, you'd need to add up the totals of any adjustments and deduct from the total for the immediate_transaction or next_transaction total. If the result is negative, the change results in a prorated credit; if positive, a prorated charge.
The new update_summary object returns totals for prorated credits and charges, along with a result object that tells you whether the change results in a credit or charge overall. You don't need to do any of your own calculations.
Next steps
This change is available in version 1 of the Paddle API.
It's a non-breaking change, meaning it doesn't impact existing integrations.
Use the preview an update to a subscription and preview a one-time charge for a subscription operations to see the new update_summary object.
Summary of changes
| Entity | Field | Change | Type |
|---|---|---|---|
| Subscription preview | update_summary | + Added | Field |
| Response object summarizing upcoming changes for preview operations. | |||