Creates a Quantity Based component definition under the specified product family. A Quantity Based component can then be added and “allocated” for a subscription.
When defining a Quantity Based component, you can choose one of 2 types:
Recurring quantity-based components are used to bill for the number of some unit (think monthly software user licenses or the number of pairs of socks in a box-a-month club). This is most commonly associated with billing for user licenses, number of users, number of employees, etc.
One-time quantity-based components are used to create ad hoc usage charges that do not recur. For example, at the time of signup, you might want to charge your customer a one-time fee for onboarding or other services.
The allocated quantity for one-time quantity-based components immediately gets reset back to zero after the allocation is made.
For more information on components, see our documentation here.
If you have the new Catalog experience enabled, taxable components must include a non-blank tax_code. Sending "tax_code": "" returns 422.
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
Either the product family's id or its handle prefixed with handle:
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST \ --url 'https://subdomain.chargify.com/product_families/PRODUCT_FAMILY_ID/quantity_based_components.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "quantity_based_component": { "name": "Quantity Based Component", "unit_name": "Component", "description": "Example of JSON per-unit component example", "taxable": true, "pricing_scheme": "per_unit", "unit_price": "10", "display_on_hosted_page": true, "allow_fractional_quantities": true, "public_signup_page_ids": [ 323397 ] }}'