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

Convert a quote

Idempotency Supported

This API is to convert a quote to an invoice.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/quotes/{quote-id}/convert

Input Parameters

invoice_date
optional, timestamp(UTC) in seconds

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_date must be in the past.
  • invoice_date is 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_date or quoted_subscription.changes_scheduled_at (whichever is applicable).
  • invoice_immediately must be true. .
invoice_immediately
optional, boolean

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.

.

subscription[0..n]
Parameters for subscription
pass parameters as subscription[<param name>]

Returns

quoteQuote object
Resource object representing quote
quoted_subscriptionQuoted subscription object
Resource object representing quoted_subscription
quoted_chargeQuoted charge object
Resource object representing quoted_charge
quoted_rampQuoted ramp object
Resource object representing quoted_ramp
customerCustomer object
Resource object representing customer
subscriptionSubscription object
Resource object representing subscription
invoiceInvoice object
Resource object representing invoice
credit_noteCredit note object
Resource object representing credit_note
Resource object representing unbilled_charge