POST /quotes/{quote-id}/convert

This API is to convert a quote to an invoice.

Servers

Path parameters

Name Type Required Description
quote-id String Yes

Request headers

Name Type Required Description
chargebee-request-origin-device String No

The device from which the customer has made the request

Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

chargebee-event-webhook String No

skip only webhooks

Possible values:

  • "all-disabled"
chargebee-business-entity-id String No

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

chargebee-event-actions String No

skip all actions to be done on the events

Possible values:

  • "all-disabled"
chargebee-request-origin-user String No

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-ip String No

The IP address of the customer where the request originated

chargebee-request-origin-user-encoded String No

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-event-email String No

skip only emails

Possible values:

  • "all-disabled"

Request body fields

Name Type Required Description
invoice_immediately Boolean No

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. .

create_pending_invoices Boolean No

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, pass first_invoice_pending as true. .
first_invoice_pending Boolean No

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. .

Default value: false

subscription Object No

Parameters for subscription

subscription.id String No

Applicable only for create subscription quote.

subscription.po_number String No

Purchase order number for this subscription.

subscription.auto_collection String No

Applicable only for create subscription quote. * off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. * on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.

Possible values:

  • "on"
  • "off"
subscription.auto_close_invoices Boolean No

When auto-closing of invoices is enabled for the site, you can pass this parameter as false to prevent the automatic closing of invoices for this subscription. The value passed here takes precedence over the value stored at the customer level.

invoice_date Integer No

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. .

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.