Previews a potential subscription's quantity-based or on/off component allocation in the middle of the current billing period. This is useful if you want users to be able to see the effect of a component operation before actually doing it.
upgrade_charges or downgrade_creditsWhen the allocation uses multiple different types of upgrade_charges or downgrade_credits, the Allocation is viewed as an Allocation which uses "Fine-Grained Component Control". As a result, the response will not include direction and proration within the allocation_preview, but at the line_items and allocations level respectfully.
See example below for Fine-Grained Component Control response.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
The Chargify id of the subscription.
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/1/allocations/preview.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "allocations": [ { "quantity": 10, "component_id": 554108, "memo": "NOW", "proration_downgrade_scheme": "prorate", "proration_upgrade_scheme": "prorate-attempt-capture", "price_point_id": 325826 } ], "effective_proration_date": "2023-11-01"}'To calculate proration amounts for a future time. Only within a current subscription period. Only ISO8601 format is supported.
dateThe type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Value in
The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Value in