ChargebeeAPI

Create invoice for a non-recurring addon

Idempotency Supported

Generate invoices for a non-recurring addon using this API.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/invoices/charge_addon

Input Parameters

customer_id
optional, string, max chars=50

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

subscription_id
optional, string, max chars=50

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

addon_id
required, string, max chars=100

The ID of the non-recurring addon to be charged.

addon_quantity
optional, integer, min=1

The number of addon units to be charged. Mandatory for quantity based addons.

addon_unit_price
optional, in cents, min=0

Amount that will override the Addon's default price. The unit depends on the type of currency .

addon_quantity_in_decimal
optional, string, max chars=33

The number of addon units to be charged in decimal.

addon_unit_price_in_decimal
optional, string, max chars=39

Addon Amount in Decimal.

date_from
optional, timestamp(UTC) in seconds

The time when the service period for the addon starts.

date_to
optional, timestamp(UTC) in seconds

The time when the service period for the addon ends.

coupon_ids
optional, string, max chars=100

List of Coupons to be added.

po_number
optional, string, max chars=100

Purchase Order Number for this invoice.

invoice_date
optional, timestamp(UTC) in seconds

The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. taxes and line_item_taxes are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.

payment_source_id
optional, string, max chars=40

Payment source to be used for this payment.

payment_initiator
optional, enumerated string

The type of initiator to be used for the payment request triggered by this operation.

Possible Enum Values
customer

Pass this value to indicate that the request is initiated by the customer

merchant

Pass this value to indicate that the request is initiated by the merchant

Returns

invoiceInvoice object

Resource object representing invoice