Add usage via API
What are the parameters required to create usage via API?
INVOICING METERED ITEM PRICES
The maximum number of usages that can be recorded for the entire lifetime of a subscription is 5000. Contact Support if you want this limit to be increased for your site
If there are no usages for an item price, the item price is not invoiced
usage[id]: This is an optional parameter. If not specified, Chargebee will automatically allocate an ID for the usage you create.
usage[item_price_id]: The id of the item price to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.
For example, if you are using the below addon's Price point as the product to charge usages, you need to pass the ID highlighted below to the usage[item_price_id] parameter, as the value:
usage[usage_date]: You can pass the date in the DD/MM/YYYY format or MM/DD/YYYY format. Once you upload the sheet to perform the bulk operation, you will be able to set the format for the date parameter.
usage[quantity]: Usage quantity cannot be zero. The minimum value has to be 1. This does not have anything to do with how invoices are closed. The site wide setting you have set up for metered billing (settings> configure Chargebee> Metered Billing), is what will determine how invoices get closed.
All details regarding the parameters to be filled in, are listed here.