ChargebeeAPI
Join the Chargebee Developers Discord — Connect, ask questions, and build faster.Join

Add a charge-item to a pending invoice

Idempotency Supported
Try in API Explorer

This endpoint is used when metered billing is enabled and it adds a charge-item price to a pending invoice. To collect the accumulated charges by closing the invoice, call Close a pending invoice.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/invoices/{invoice-id}/add_charge_item

Input Parameters

comment
optional, string, max chars=300

An internal comment to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing Hosted Page or any document such as the Invoice PDF .

subscription_id
optional, string, max chars=50

Identifier of the subscription for which this addon needs to be created. Applicable for consolidated invoice.

item_price[0..n]
Parameters for item_price
pass parameters as item_price[<param name>]
item_tiers[0..n]
Parameters for item_tiers. Multiple item_tiers can be passed by specifying unique indices.
pass parameters as item_tiers[<param name>][<idx:0..n>]

Returns

invoiceInvoice object
Resource object representing invoice