Creates an event-based component definition under the specified product family. An event-based component can then be added and “allocated” for a subscription.
Event-based components are similar to other component types, in that you define the component parameters (such as name and taxability) and the pricing. A key difference for the event-based component is that it must be attached to a metric. This is because the metric provides the component with the actual quantity used in computing what and how much will be billed each period for each subscription.
So, instead of reporting usage directly for each component (as you would with metered components), the usage is derived from analysis of your events.
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/event_based_components.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "event_based_component": { "name": "Component Name", "unit_name": "string", "description": "string", "handle": "some_handle", "taxable": true, "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 1, "unit_price": "0.49" } ], "event_based_billing_metric_id": 123 }}'