ChargebeeAPI

Create an invoice for unbilled charges

Idempotency Supported
Try in API Explorer

Use this API to bill the unbilled charges. Available Credits and Excess Payments will automatically be applied while creating the invoice.

If the Auto Collection is turned on for the particular customer, the invoice will be created in payment_due state and the payment collection will be scheduled immediately.

During invoice creation, the PO number for the line items will be filled from the subscription's current PO number, if available.

If no recurring item is present in the created invoice, the invoice will be marked as recurring=false.

If consolidated invoicing is enabled and the parameter 'customer_id' is passed, multiple invoices can be created based on the following factors.

  • Currency
  • PO number if 'Group by PO number' is enabled
  • Shipping address
  • Auto Collection
  • Payment method

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/unbilled_charges/invoice_unbilled_charges

Input Parameters

subscription_id
optional, string, max chars=50

Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified.

customer_id
optional, string, max chars=50

Identifier of the customer for whom this invoice needs to be created. Should be specified if 'subscription_id' is not specified. Applicable only if the consolidated invoicing is enabled. .

Returns

invoicesalways returned

Resource object representing invoice