This API is to convert a quote to an invoice.
Sample Request
URL Format
Input Parameters
The document date displayed on the invoice PDF. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. When not provided, the value is the same as current date. Moreover, if the invoice is created as pending
, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes
and line_item_taxes
are computed based on the tax configuration as of invoice_date.
When passing this parameter, the following prerequisites must be met:
invoice_datemust be in the past.invoice_dateis not 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.- The date is not earlier than
quoted_subscription.start_dateorquoted_subscription.changes_scheduled_at(whichever is applicable). invoice_immediatelymust betrue. .
If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to unbilled charges. The default value is as per the site settings .
Note:
invoice_immediately
only affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.
.
This attribute is set to true
automatically for the subscription when it has one or more metered
items. However, when there are no metered
items, you can pass this parameter as true
to force all invoices (except the first) to be created as pending.
This is useful in the following scenarios:
- When you manage metered billing at your end by calculating usage-based charges yourself and add them to the subscription as one-time charges.
- When your workflow involves inspecting all charges before you close invoices.
Note:
- You must enable Metered Billing for this parameter to be acceptable.
- To create the first invoice also as
pending, passfirst_invoice_pendingastrue.
.
Non-metered items are billed at the beginning of a billing cycle while metered items are billed at the end. Consequently, the first invoice of the subscription contains only the non-metered items.
By passing this parameter as true, you create the first invoice as pending allowing you to add the previous term's metered charges to it before closing. This is useful when the subscription is moved to Chargebee from a different billing system. As applicable to all pending invoices, this invoice is also closed automatically or via an API call.
Note:
This parameter is passed only when there are metered items in the subscription or when create_pending_invoices is true.
.