Creates multiple allocations, sets the current allocated quantity for each of the components, and records a memo. A component_id is required for each allocation.
The charges and/or credits that are created will be rolled up into a single total which is used to determine whether this is an upgrade or a downgrade.
allocations array)allocations array)allocations array)Note: Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong.
For more information, see the Component Allocations product documentation.
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.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "proration_upgrade_scheme": "prorate-attempt-capture", "proration_downgrade_scheme": "no-prorate", "allocations": [ { "quantity": 10, "component_id": 123, "memo": "foo" }, { "quantity": 5, "component_id": 456, "memo": "bar" } ]}'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
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
(Optional) If not passed, the allocation(s) will use the payment collection method on the subscription.
Value in
If true, if the immediate component payment fails, initiate dunning for the subscription. Otherwise, leave the charges on the subscription to pay for at renewal.