Creates an allocation, sets the current allocated quantity for the component, and records a memo. Allocations can only be updated for Quantity, On/Off, and Prepaid Components.
When creating an allocation via the API, you can pass the upgrade_charge, downgrade_credit, and accrue_charge to be applied.
Note: These proration and accrual fields are ignored for Prepaid Components since this component type always generates charges immediately without proration.
For information on prorated components and upgrade/downgrade schemes, see Setting Component Allocations.
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.
The Advanced Billing id of the component
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/components/1/allocations.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "allocation": { "quantity": 10, "decimal_quantity": "10.0", "previous_quantity": 5, "decimal_previous_quantity": "5.0", "memo": "Increase seats to 10", "proration_downgrade_scheme": "prorate", "proration_upgrade_scheme": "full-price-attempt-capture", "downgrade_credit": "prorated", "upgrade_charge": "full", "accrue_charge": false, "price_point_id": 789, "billing_schedule": { "initial_billing_at": "2025-02-28" }, "custom_price": { "tax_included": false, "pricing_scheme": "per_unit", "interval": 1, "interval_unit": "month", "list_price_point_id": 4321, "use_default_list_price": false, "prices": [ { "starting_quantity": 1, "ending_quantity": 25, "unit_price": "49.00" }, { "starting_quantity": 26, "unit_price": "39.00" } ], "renew_prepaid_allocation": false, "rollover_prepaid_remainder": false, "expiration_interval": null, "expiration_interval_unit": "never" } }}'