API Version
Product Catalog
Library
Quotes is available on selected plans only.

A quote is an estimate of the invoice with the charges likely to occur when customers buy an item. A quote can be converted to a regular invoice once the customer accepts it.

The line items of a quote are grouped by charge events and are available as a separate resource. This resource can be retrieved using the List quote line groups endpoint. Note that the first quote line group is available within the quote resource itself and parsing the quote line groups object is not required.

Sample quote [ JSON ]

{ "amount_due": 500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__KyVnHhSBWTO25CR", "date": 1517501504, "id": "10", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 500, "customer_id": "__test__KyVnHhSBWTO25CR", "date_from": 1517501504, "date_to": 1517501504, "description": "Service Charge", "discount_amount": 0, "entity_type": "adhoc", "id": "__test__KyVnHhSBWTO5pCa", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 500 } ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517501504000, "status": "open", "sub_total": 500, "taxes": [], "total": 500, "total_payable": 500, "updated_at": 1517501504, "valid_till": 1517596199, "version": 1 }

API Index URL GET

https://{site}.chargebee.com/api/v2/quotes

Model Class

id
string, max chars=50
The quote number. Acts as a identifier for quote and typically generated sequentially.
name
optional, string, max chars=100
The quote name will be used as the pdf name of the quote.
po_number
optional, string, max chars=100
Purchase Order Number
customer_id
string, max chars=50
The identifier of the customer this quote belongs to.
subscription_id
optional, string, max chars=50
The identifier of the subscription this quote belongs to.
invoice_id
optional, string, max chars=50
The identifier of the invoice generated while converting this quote.
status
enumerated string
Current status of this quote.
Possible values are
openOpenacceptedAccepted.declinedDeclined.invoicedInvoicedclosedClosed
openOpenacceptedAccepted.declinedDeclined.invoicedInvoiced
closedClosed
Show all values[+]
operation_type
enumerated string
Operation Type
Possible values are
create_subscription_for_customercreate_subscription_for_customerchange_subscriptionchange_subscriptiononetime_invoiceonetime_invoice
create_subscription_for_customercreate_subscription_for_customerchange_subscriptionchange_subscriptiononetime_invoiceonetime_invoice
Show all values[+]
vat_number
optional, string, max chars=20
VAT/ Tax registration number of the customer. Learn more
price_type
enumerated string, default=tax_exclusive
The price type of the quote.
Possible values are
tax_exclusiveAll amounts in the document are exclusive of tax.tax_inclusiveAll amounts in the document are inclusive of tax.
tax_exclusiveAll amounts in the document are exclusive of tax.tax_inclusiveAll amounts in the document are inclusive of tax.
Show all values[+]
valid_till
timestamp(UTC) in seconds
Quote will be valid till this date. After this date quote will be marked as closed.
date
timestamp(UTC) in seconds
Creation date of the quote. Typically this is the date on which quote is generated.
total_payable
optional, in cents, min=0
Total contract value. Applicable when multi billing cycle quote is enabled.
charge_on_acceptance
optional, in cents, default=0, min=0
Charge on acceptance. Applicable when multi billing cycle quote is enabled.
sub_total
in cents, min=0
Subtotal (in cents) of the first quote line group.
total
optional, in cents, default=0, min=0
Total (in cents) of the first quote line group.
credits_applied
optional, in cents, default=0, min=0
Credits applied (in cents) for the first quote line group.
amount_paid
optional, in cents, default=0, min=0
Existing outstanding payments (in cents) if any, applied to the first quote line group.
amount_due
optional, in cents, default=0, min=0
Amount due (in cents) for the first quote line group.
version
optional, integer, default=1
Version of the quote.
resource_version
optional, long
Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
updated_at
optional, timestamp(UTC) in seconds
Timestamp indicating when this quote was last updated.
vat_number_prefix
optional, string, max chars=10
An overridden value for the first two characters of the full VAT number. Only applicable specifically for customers with billing_address country as XI (which is United Kingdom - Northern Ireland).

When you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, you have the option of setting billing_address country as XI. That’s the code for United Kingdom - Northern Ireland. The first two characters of the VAT number in such a case is XI by default. However, if the VAT number was registered in UK, the value should be GB. Set vat_number_prefix to GB for such cases.

tax_category
optional, string
Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.
currency_code
string, max chars=3
The currency code (ISO 4217 format) of the quote.
notes
optional, jsonarray
List of notes associated with this quotes.
contract_term_start
optional, timestamp(UTC) in seconds
Specifies the contract term’s start date.
contract_term_end
optional, timestamp(UTC) in seconds
Specifies the contract term’s end date. It indicates when the action set in action_at_term_end gets triggered.
contract_term_termination_fee
optional, in cents, min=0
Specifies the charge to be applied for terminating the contract term.
business_entity_id
optional, string, max chars=50
The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
Note

Multiple Business Entities is a feature available only on Product Catalog 2.0.

Multiple Business Entities is in early access. Submit a request to enable this feature.

deleted
boolean
Indicates that this resource has been deleted when the value is true.
optional, list of line_item
The list of line items for this quote.
optional, list of discount
The list of all deductions applied to the quote.
line_item_discounts
Show attributes [+]
optional, list of line_item_discount
The list of deductions applied for each line item of this quote.
optional, list of tax
The list of taxes applicable for this quote.
line_item_taxes
Show attributes [+]
optional, list of line_item_tax
The list of taxes applied on the line items of this quote.
line_item_tiers
Show attributes [+]
optional, list of line_item_tier
The list of tiers applicable for the various line items in this quote.
shipping_address
Show attributes [+]
optional, shipping_address
Shipping address for the quote.
billing_address
Show attributes [+]
optional, billing_address
Billing address for the quote.
id id
string, max chars=50
The quote number. Acts as a identifier for quote and typically generated sequentially.
name name
optional, string, max chars=100
The quote name will be used as the pdf name of the quote.
po_number po_number
optional, string, max chars=100
Purchase Order Number
customer_id customer_id
string, max chars=50
The identifier of the customer this quote belongs to.
subscription_id subscription_id
optional, string, max chars=50
The identifier of the subscription this quote belongs to.
invoice_id invoice_id
optional, string, max chars=50
The identifier of the invoice generated while converting this quote.
status status
enumerated string
Current status of this quote.
Possible values are
openOpenacceptedAccepted.declinedDeclined.invoicedInvoicedclosedClosed
openOpenacceptedAccepted.declinedDeclined.invoicedInvoiced
closedClosed
Show all values[+]
operation_type operation_type
enumerated string
Operation Type
Possible values are
create_subscription_for_customercreate_subscription_for_customerchange_subscriptionchange_subscriptiononetime_invoiceonetime_invoice
create_subscription_for_customercreate_subscription_for_customerchange_subscriptionchange_subscriptiononetime_invoiceonetime_invoice
Show all values[+]
vat_number vat_number
optional, string, max chars=20
VAT/ Tax registration number of the customer. Learn more
price_type price_type
enumerated string, default=tax_exclusive
The price type of the quote.
Possible values are
tax_exclusiveAll amounts in the document are exclusive of tax.tax_inclusiveAll amounts in the document are inclusive of tax.
tax_exclusiveAll amounts in the document are exclusive of tax.tax_inclusiveAll amounts in the document are inclusive of tax.
Show all values[+]
valid_till valid_till
timestamp(UTC) in seconds
Quote will be valid till this date. After this date quote will be marked as closed.
date date
timestamp(UTC) in seconds
Creation date of the quote. Typically this is the date on which quote is generated.
total_payable total_payable
optional, in cents, min=0
Total contract value. Applicable when multi billing cycle quote is enabled.
charge_on_acceptance charge_on_acceptance
optional, in cents, default=0, min=0
Charge on acceptance. Applicable when multi billing cycle quote is enabled.
sub_total sub_total
in cents, min=0
Subtotal (in cents) of the first quote line group.
total total
optional, in cents, default=0, min=0
Total (in cents) of the first quote line group.
credits_applied credits_applied
optional, in cents, default=0, min=0
Credits applied (in cents) for the first quote line group.
amount_paid amount_paid
optional, in cents, default=0, min=0
Existing outstanding payments (in cents) if any, applied to the first quote line group.
amount_due amount_due
optional, in cents, default=0, min=0
Amount due (in cents) for the first quote line group.
version version
optional, integer, default=1
Version of the quote.
resource_version resource_version
optional, long
Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
updated_at updated_at
optional, timestamp(UTC) in seconds
Timestamp indicating when this quote was last updated.
vat_number_prefix vat_number_prefix
optional, string, max chars=10
An overridden value for the first two characters of the full VAT number. Only applicable specifically for customers with billing_address country as XI (which is United Kingdom - Northern Ireland).

When you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, you have the option of setting billing_address country as XI. That’s the code for United Kingdom - Northern Ireland. The first two characters of the VAT number in such a case is XI by default. However, if the VAT number was registered in UK, the value should be GB. Set vat_number_prefix to GB for such cases.

tax_category tax_category
optional, string
Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.
currency_code currency_code
string, max chars=3
The currency code (ISO 4217 format) of the quote.
notes notes
optional, jsonarray
List of notes associated with this quotes.
contract_term_start contract_term_start
optional, timestamp(UTC) in seconds
Specifies the contract term’s start date.
contract_term_end contract_term_end
optional, timestamp(UTC) in seconds
Specifies the contract term’s end date. It indicates when the action set in action_at_term_end gets triggered.
contract_term_termination_fee contract_term_termination_fee
optional, in cents, min=0
Specifies the charge to be applied for terminating the contract term.
business_entity_id business_entity_id
optional, string, max chars=50
The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
Note

Multiple Business Entities is a feature available only on Product Catalog 2.0.

Multiple Business Entities is in early access. Submit a request to enable this feature.

deleted deleted
boolean
Indicates that this resource has been deleted when the value is true.
line_items
optional, list of line_item
The list of line items for this quote.
discounts
optional, list of discount
The list of all deductions applied to the quote.
line_item_discounts
optional, list of line_item_discount
The list of deductions applied for each line item of this quote.
taxes
optional, list of tax
The list of taxes applicable for this quote.
line_item_taxes
optional, list of line_item_tax
The list of taxes applied on the line items of this quote.
line_item_tiers
optional, list of line_item_tier
The list of tiers applicable for the various line items in this quote.
shipping_address
optional, shipping_address
Shipping address for the quote.
billing_address
optional, billing_address
Billing address for the quote.
Retrieves the quotes identified by the 'number' specified in the url.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/quotes/10 \
     -u {site_api_key}:
copy
Click to Copy
curl  https://{site}.chargebee.com/api/v2/quotes/10 \
     -u {site_api_key}:

Sample Response [ JSON ]

Show more...
{
    "quote": {
        "amount_due": 500,
        "amount_paid": 0,
        "billing_address": {
            "first_name": "John",
            "last_name": "Doe",
            "object": "billing_address",
            "validation_status": "not_validated"
        },
        "charge_on_acceptance": 500,
        "credits_applied": 0,
        "currency_code": "USD",
        "customer_id": "__test__KyVnHhSBWTO25CR",
        "date": 1517501504,
        "id": "10",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 500,
                "customer_id": "__test__KyVnHhSBWTO25CR",
                "date_from": 1517501504,
                "date_to": 1517501504,
                "description": "Service Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "__test__KyVnHhSBWTO5pCa",
                "is_taxed": false,
                "item_level_discount_amount": 0,
                "object": "line_item",
                "pricing_model": "flat_fee",
                "quantity": 1,
                "tax_amount": 0,
                "unit_amount": 500
            },
            {..}
        ],
        "object": "quote",
        "operation_type": "onetime_invoice",
        "price_type": "tax_exclusive",
        "resource_version": 1517501504000,
        "status": "open",
        "sub_total": 500,
        "taxes": [],
        "total": 500,
        "total_payable": 500,
        "updated_at": 1517501504,
        "valid_till": 1517596199,
        "version": 1
    }
}

URL Format GET

https://{site}.chargebee.com/api/v2/quotes/{quote-id}

Method

quote quote
always returned
Resource object representing quote
quoted_subscription quoted_subscription
optional
Resource object representing quoted_subscription
quoted_charge quoted_charge
optional
Resource object representing quoted_charge

Sample admin console URL

https://{site}.chargebee.com/admin-console/quotes/123x

Creates a quote for a new subscription under the customer specified.

To send this quote, use “Send Email” quote action in the Chargebee application.

Based on the customer’s reply, you can use Update quote status and Convert a quote APIs for changing quote status and invoicing the customer, respectively.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/customers/__test__KyVnHhSBWTLzbAo/create_subscription_quote \
     -u {site_api_key}:\
     -d "subscription[plan_id]"="basic" 
copy
Click to Copy
curl  https://{site}.chargebee.com/api/v2/customers/__test__KyVnHhSBWTLzbAo/create_subscription_quote \
     -u {site_api_key}:\
     -d "subscription[plan_id]"="basic" 

Sample Response [ JSON ]

Show more...
{
    "quote": {
        "amount_due": 1000,
        "amount_paid": 0,
        "billing_address": {
            "first_name": "John",
            "last_name": "Doe",
            "object": "billing_address",
            "validation_status": "not_validated"
        },
        "charge_on_acceptance": 0,
        "credits_applied": 0,
        "currency_code": "USD",
        "customer_id": "__test__KyVnHhSBWTLzbAo",
        "date": 1517501496,
        "id": "2",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 1000,
                "customer_id": "__test__KyVnHhSBWTLzbAo",
                "date_from": 1517501496,
                "date_to": 1519920696,
                "description": "Basic",
                "discount_amount": 0,
                "entity_id": "basic",
                "entity_type": "plan",
                "id": "__test__KyVnHhSBWTM2nAy",
                "is_taxed": false,
                "item_level_discount_amount": 0,
                "object": "line_item",
                "pricing_model": "per_unit",
                "quantity": 1,
                "tax_amount": 0,
                "unit_amount": 1000
            },
            {..}
        ],
        "object": "quote",
        "operation_type": "create_subscription_for_customer",
        "price_type": "tax_exclusive",
        "resource_version": 1517501496000,
        "status": "open",
        "sub_total": 1000,
        "taxes": [],
        "total": 1000,
        "updated_at": 1517501496,
        "valid_till": 1517596199,
        "version": 1
    },
    "quoted_subscription": {
        "object": "quoted_subscription",
        "plan_id": "basic",
        "plan_quantity": 1
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/customers/{customer-id}/create_subscription_quote

Method

name[]
optional, string, max chars=100
The quote name will be used as the pdf name of the quote.
notes[]
optional, string, max chars=2000
Notes specific to this quote that you want customers to see on the quote PDF.
expires_at[]
optional, timestamp(UTC) in seconds
Quotes will be valid till this date. After this quote will be marked as closed.
billing_cycles[]
optional, integer, min=0
Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.
mandatory_addons_to_remove[[0..n]][0..n]
optional, list of string
List of addons IDs that are mandatory to the plan and has to be removed from the subscription.
terms_to_charge[]
optional, integer, min=1
The number of subscription billing cycles (including the first one) to invoice in advance.
billing_alignment_mode[]
optional, enumerated string
Override the billing alignment mode for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.
Possible values are
immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
Show all values[+]
coupon_ids[[0..n]][0..n]
optional, list of string
Identifier of the coupon as a List. Coupon Codes can also be passed.
subscription[id]
optional, string, max chars=50
A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
subscription[po_number]
optional, string, max chars=100
Purchase order number for this subscription.
subscription[plan_id]
required, string, max chars=100
Identifier of the plan for this subscription
subscription[plan_quantity]
optional, integer, default=1, min=1
Plan quantity for this subscription
subscription[plan_quantity_in_decimal]
optional, string, max chars=33
The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when multi-decimal pricing is enabled.
subscription[plan_unit_price]
optional, in cents, min=0
Amount that will override the Plan's default price. The unit depends on the type of currency.
subscription[plan_unit_price_in_decimal]
optional, string, max chars=39
When price overriding is enabled for the site, the price or per-unit price of the plan can be set here. The value set for the plan is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
subscription[setup_fee]
optional, in cents, min=0
Amount that will override the default setup fee. The unit depends on the type of currency.
subscription[trial_end]
optional, timestamp(UTC) in seconds
The time at which the trial ends for this subscription. Can be specified to override the default trial period.If '0' is passed, the subscription will be activated immediately.
subscription[start_date]
optional, timestamp(UTC) in seconds
The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately on quote conversion. The quote can be converted on a date/time after this date. This is called backdating the subscription creation and is done when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:
  • Backdating is enabled for subscription creation operations.
  • The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.
  • The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, subscription[start_date] cannot be earlier than 14th February.
subscription[offline_payment_method]
optional, enumerated string
The preferred offline payment method for the subscription.
Possible values are
no_preferenceNo PreferencecashCashcheckCheckbank_transferBank Transferach_creditACH Creditsepa_creditSEPA CreditboletoBoletous_automated_bank_transferUS Automated Bank Transfereu_automated_bank_transferEU Automated Bank Transferuk_automated_bank_transferUK Automated Bank Transferjp_automated_bank_transferJP Automated Bank Transfermx_automated_bank_transferMX Automated Bank TransfercustomCustom
no_preferenceNo PreferencecashCashcheckCheckbank_transferBank Transfer
ach_creditACH Creditsepa_creditSEPA CreditboletoBoletous_automated_bank_transferUS Automated Bank Transfereu_automated_bank_transferEU Automated Bank Transferuk_automated_bank_transferUK Automated Bank Transferjp_automated_bank_transferJP Automated Bank Transfermx_automated_bank_transferMX Automated Bank TransfercustomCustom
Show all values[+]
subscription[contract_term_billing_cycle_on_renewal]
optional, integer, min=1, max=100
Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
shipping_address[first_name]
optional, string, max chars=150
The first name of the contact.
shipping_address[last_name]
optional, string, max chars=150
The last name of the contact.
shipping_address[email]
optional, string, max chars=70
The email address.
shipping_address[company]
optional, string, max chars=250
The company name.
shipping_address[phone]
optional, string, max chars=50
The phone number.
shipping_address[line1]
optional, string, max chars=150
Address line 1
shipping_address[line2]
optional, string, max chars=150
Address line 2
shipping_address[line3]
optional, string, max chars=150
Address line 3
shipping_address[city]
optional, string, max chars=50
The name of the city.
shipping_address[state_code]
optional, string, max chars=50
The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
shipping_address[state]
optional, string, max chars=50
The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
shipping_address[zip]
optional, string, max chars=20
Zip or postal code. The number of characters is validated according to the rules specified here.
shipping_address[country]
optional, string, max chars=50
The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

Note: If you enter an invalid country code, the system will return an error.

Brexit

If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.

shipping_address[validation_status]
optional, enumerated string, default=not_validated
The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
Show all values[+]
contract_term[action_at_term_end]
optional, enumerated string
Action to be taken when the contract term completes.
Possible values are
renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.
    renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.
    Show all values[+]
    contract_term[cancellation_cutoff_period]
    optional, integer, default=0
    The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
    addons[id][0..n]
    optional, string, max chars=100
    Identifier of the addon. Multiple addons can be passed.
    addons[quantity][0..n]
    optional, integer, default=1, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when multi-decimal pricing is enabled.
    addons[unit_price][0..n]
    optional, in cents, min=0

    The price or per-unit-price of the addon. The value depends on the type of currency.

    Note:

    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:

    • The unit_price provided is $10
    • The addon billing period is 1 month.
    • The plan billing period is 3 months.
    • The addon is only billed for $10 on each subscription renewal.
    addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the addon can be set here. The value set for the addon is used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon period. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    addons[billing_cycles][0..n]
    optional, integer, min=0
    Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.
    addons[trial_end][0..n]
    optional, timestamp(UTC) in seconds
    The time at which the trial ends for the addon. This value can only be set for subscriptions that start with an active or non-renewing status. Once set, the value can't be changed. (Addon trial periods must be enabled by Chargebee Support)
    event_based_addons[id][0..n]
    optional, string, max chars=100
    A unique 'id' used to identify the addon.
    event_based_addons[quantity][0..n]
    optional, integer, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    event_based_addons[unit_price][0..n]
    optional, in cents, min=0
    Amount that will override the Addon's default price. The unit depends on the type of currency.
    event_based_addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when multi-decimal pricing is enabled.
    event_based_addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the addon can be set here. The value set for the addon is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    event_based_addons[service_period_in_days][0..n]
    optional, integer, min=1, max=730
    Defines service period of the addon in days from the day of charge.
    event_based_addons[on_event][0..n]
    optional, enumerated string
    Event on which this addon will be charged.
    Possible values are
    subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.contract_terminationAddon will be charged on contract termination.
    subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.
    contract_terminationAddon will be charged on contract termination.
    Show all values[+]
    event_based_addons[charge_once][0..n]
    optional, boolean, default=true
    If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.
    event_based_addons[charge_on][0..n]
    optional, enumerated string
    Indicates when the non-recurring addon will be charged.
    Possible values are
    immediatelyCharges for the addon will be applied immediately.on_eventCharge for the addon will be applied on the occurrence of a specified event.
    immediatelyCharges for the addon will be applied immediately.on_eventCharge for the addon will be applied on the occurrence of a specified event.
    Show all values[+]
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x

    Edits a quote. This endpoint is for quotes that are for new subscriptions. To edit a quote that is for updating a subscription, use Edit quote for updating a subscription.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/1/edit_create_subscription_quote \
         -u {site_api_key}:\
         -d "subscription[plan_id]"="basic" 
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/1/edit_create_subscription_quote \
         -u {site_api_key}:\
         -d "subscription[plan_id]"="basic" 

    Sample Response [ JSON ]

    Show more...
    {
        "quote": {
            "id": "5",
            "customer_id": "__dev__KyVlEuRpeT0m25",
            "status": "open",
            "operation_type": "create_subscription_for_customer",
            "price_type": "tax_exclusive",
            "valid_till": 1581791399,
            "date": 1580927607,
            "total_payable": 1395,
            "charge_on_acceptance": 1395,
            "sub_total": 1395,
            "total": 1395,
            "credits_applied": 0,
            "amount_paid": 0,
            "amount_due": 1395,
            "updated_at": 1580927607,
            "resource_version": 1580927607468,
            "object": "quote",
            "line_items": [
                {
                    "id": "__dev__KyVl9ORpeV7yI7",
                    "date_from": 1580927606,
                    "date_to": 1583433206,
                    "unit_amount": 900,
                    "quantity": 1,
                    "amount": 900,
                    "pricing_model": "per_unit",
                    "is_taxed": false,
                    "tax_amount": 0,
                    "object": "line_item",
                    "customer_id": "__dev__KyVlEuRpeT0m25",
                    "description": "No Trial",
                    "entity_type": "plan",
                    "entity_id": "no-trial",
                    "discount_amount": 0,
                    "item_level_discount_amount": 0
                },
                {..}
            ],
            "line_item_discounts": [],
            "taxes": [],
            "line_item_taxes": [],
            "currency_code": "USD"
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote-id}/edit_create_subscription_quote

    Method

    notes[]
    optional, string, max chars=2000
    Notes specific to this quote that you want customers to see on the quote PDF.
    expires_at[]
    optional, timestamp(UTC) in seconds
    Quotes will be valid till this date. After this quote will be marked as closed.
    billing_cycles[]
    optional, integer, min=0
    Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.
    mandatory_addons_to_remove[[0..n]][0..n]
    optional, list of string
    List of addons IDs that are mandatory to the plan and has to be removed from the subscription.
    terms_to_charge[]
    optional, integer, min=1
    The number of subscription billing cycles (including the first one) to invoice in advance.
    billing_alignment_mode[]
    optional, enumerated string
    Override the billing alignment mode for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.
    Possible values are
    immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
    immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
    Show all values[+]
    coupon_ids[[0..n]][0..n]
    optional, list of string
    Identifier of the coupon as a List. Coupon Codes can also be passed.
    subscription[id]
    optional, string, max chars=50
    A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
    subscription[po_number]
    optional, string, max chars=100
    Purchase order number for this subscription.
    subscription[plan_id]
    required, string, max chars=100
    Identifier of the plan for this subscription
    subscription[plan_quantity]
    optional, integer, default=1, min=1
    Plan quantity for this subscription
    subscription[plan_quantity_in_decimal]
    optional, string, max chars=33
    The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when multi-decimal pricing is enabled.
    subscription[plan_unit_price]
    optional, in cents, min=0
    Amount that will override the Plan's default price. The unit depends on the type of currency.
    subscription[plan_unit_price_in_decimal]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the plan can be set here. The value set for the plan is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    subscription[setup_fee]
    optional, in cents, min=0
    Amount that will override the default setup fee. The unit depends on the type of currency.
    subscription[trial_end]
    optional, timestamp(UTC) in seconds
    The time at which the trial ends for this subscription. Can be specified to override the default trial period.If '0' is passed, the subscription will be activated immediately.
    subscription[start_date]
    optional, timestamp(UTC) in seconds
    The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately on quote conversion. The quote can be converted on a date/time after this date. This is called backdating the subscription creation and is done when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:
    • Backdating is enabled for subscription creation operations.
    • The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.
    • The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, subscription[start_date] cannot be earlier than 14th February.
    subscription[offline_payment_method]
    optional, enumerated string
    The preferred offline payment method for the subscription.
    Possible values are
    no_preferenceNo PreferencecashCashcheckCheckbank_transferBank Transferach_creditACH Creditsepa_creditSEPA CreditboletoBoletous_automated_bank_transferUS Automated Bank Transfereu_automated_bank_transferEU Automated Bank Transferuk_automated_bank_transferUK Automated Bank Transferjp_automated_bank_transferJP Automated Bank Transfermx_automated_bank_transferMX Automated Bank TransfercustomCustom
    no_preferenceNo PreferencecashCashcheckCheckbank_transferBank Transfer
    ach_creditACH Creditsepa_creditSEPA CreditboletoBoletous_automated_bank_transferUS Automated Bank Transfereu_automated_bank_transferEU Automated Bank Transferuk_automated_bank_transferUK Automated Bank Transferjp_automated_bank_transferJP Automated Bank Transfermx_automated_bank_transferMX Automated Bank TransfercustomCustom
    Show all values[+]
    subscription[contract_term_billing_cycle_on_renewal]
    optional, integer, min=1, max=100
    Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
    shipping_address[first_name]
    optional, string, max chars=150
    The first name of the contact.
    shipping_address[last_name]
    optional, string, max chars=150
    The last name of the contact.
    shipping_address[email]
    optional, string, max chars=70
    The email address.
    shipping_address[company]
    optional, string, max chars=250
    The company name.
    shipping_address[phone]
    optional, string, max chars=50
    The phone number.
    shipping_address[line1]
    optional, string, max chars=150
    Address line 1
    shipping_address[line2]
    optional, string, max chars=150
    Address line 2
    shipping_address[line3]
    optional, string, max chars=150
    Address line 3
    shipping_address[city]
    optional, string, max chars=50
    The name of the city.
    shipping_address[state_code]
    optional, string, max chars=50
    The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
    shipping_address[state]
    optional, string, max chars=50
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    shipping_address[zip]
    optional, string, max chars=20
    Zip or postal code. The number of characters is validated according to the rules specified here.
    shipping_address[country]
    optional, string, max chars=50
    The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

    Note: If you enter an invalid country code, the system will return an error.

    Brexit

    If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.

    shipping_address[validation_status]
    optional, enumerated string, default=not_validated
    The address verification status.
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    Show all values[+]
    contract_term[action_at_term_end]
    optional, enumerated string
    Action to be taken when the contract term completes.
    Possible values are
    renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.
    renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.
    Show all values[+]
    contract_term[cancellation_cutoff_period]
    optional, integer, default=0
    The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
    addons[id][0..n]
    optional, string, max chars=100
    Identifier of the addon. Multiple addons can be passed.
    addons[quantity][0..n]
    optional, integer, default=1, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when multi-decimal pricing is enabled.
    addons[unit_price][0..n]
    optional, in cents, min=0

    The price or per-unit-price of the addon. The value depends on the type of currency.

    Note:

    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:

    • The unit_price provided is $10
    • The addon billing period is 1 month.
    • The plan billing period is 3 months.
    • The addon is only billed for $10 on each subscription renewal.
    addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the addon can be set here. The value set for the addon is used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon period. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    addons[billing_cycles][0..n]
    optional, integer, min=0
    Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.
    addons[trial_end][0..n]
    optional, timestamp(UTC) in seconds
    The time at which the trial ends for the addon. This value can only be set for subscriptions that start with an active or non-renewing status. Once set, the value can't be changed. (Addon trial periods must be enabled by Chargebee Support)
    event_based_addons[id][0..n]
    optional, string, max chars=100
    A unique 'id' used to identify the addon.
    event_based_addons[quantity][0..n]
    optional, integer, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    event_based_addons[unit_price][0..n]
    optional, in cents, min=0
    Amount that will override the Addon's default price. The unit depends on the type of currency.
    event_based_addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when multi-decimal pricing is enabled.
    event_based_addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the addon can be set here. The value set for the addon is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    event_based_addons[service_period_in_days][0..n]
    optional, integer, min=1, max=730
    Defines service period of the addon in days from the day of charge.
    event_based_addons[on_event][0..n]
    optional, enumerated string
    Event on which this addon will be charged.
    Possible values are
    subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.contract_terminationAddon will be charged on contract termination.
    subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.
    contract_terminationAddon will be charged on contract termination.
    Show all values[+]
    event_based_addons[charge_once][0..n]
    optional, boolean, default=true
    If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.
    event_based_addons[charge_on][0..n]
    optional, enumerated string
    Indicates when the non-recurring addon will be charged.
    Possible values are
    immediatelyCharges for the addon will be applied immediately.on_eventCharge for the addon will be applied on the occurrence of a specified event.
    immediatelyCharges for the addon will be applied immediately.on_eventCharge for the addon will be applied on the occurrence of a specified event.
    Show all values[+]
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x

    Creates a quote for updating a subscription under the customer specified.

    To send this quote, use “Send Email” quote action in the Chargebee application.

    Based on the customer’s reply, you can use Update quote status and Convert a quote APIs for changing quote status and invoicing the customer, respectively.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote \
         -u {site_api_key}:\
         -d "subscription[id]"="__test__KyVnHhSBWTMBNBB" \
         -d "subscription[plan_id]"="no_trial" \
         -d "billing_address[first_name]"="John" \
         -d "billing_address[last_name]"="Doe" \
         -d "billing_address[line1]"="PO Box 9999" \
         -d "billing_address[city]"="Walnut" \
         -d "billing_address[state]"="California" \
         -d "billing_address[zip]"="91789" \
         -d "billing_address[country]"="US" 
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote \
         -u {site_api_key}:\
         -d "subscription[id]"="__test__KyVnHhSBWTMBNBB" \
         -d "subscription[plan_id]"="no_trial" \
         -d "billing_address[first_name]"="John" \
         -d "billing_address[last_name]"="Doe" \
         -d "billing_address[line1]"="PO Box 9999" \
         -d "billing_address[city]"="Walnut" \
         -d "billing_address[state]"="California" \
         -d "billing_address[zip]"="91789" \
         -d "billing_address[country]"="US" 

    Sample Response [ JSON ]

    Show more...
    {
        "quote": {
            "amount_due": 895,
            "amount_paid": 0,
            "billing_address": {
                "city": "Walnut",
                "country": "US",
                "first_name": "John",
                "last_name": "Doe",
                "line1": "PO Box 9999",
                "object": "billing_address",
                "state": "California",
                "validation_status": "not_validated",
                "zip": "91789"
            },
            "charge_on_acceptance": 0,
            "credits_applied": 0,
            "currency_code": "USD",
            "customer_id": "__test__KyVnHhSBWTMBNBB",
            "date": 1517501497,
            "id": "4",
            "line_item_discounts": [],
            "line_item_taxes": [],
            "line_items": [
                {
                    "amount": 895,
                    "customer_id": "__test__KyVnHhSBWTMBNBB",
                    "date_from": 1517501497,
                    "date_to": 1519920697,
                    "description": "No Trial - Prorated Charges",
                    "discount_amount": 0,
                    "entity_id": "no_trial",
                    "entity_type": "plan",
                    "id": "__test__KyVnHhSBWTMHrBN",
                    "is_taxed": false,
                    "item_level_discount_amount": 0,
                    "object": "line_item",
                    "pricing_model": "per_unit",
                    "quantity": 1,
                    "tax_amount": 0,
                    "unit_amount": 895
                },
                {..}
            ],
            "object": "quote",
            "operation_type": "change_subscription",
            "price_type": "tax_exclusive",
            "resource_version": 1517501497000,
            "status": "open",
            "sub_total": 895,
            "subscription_id": "__test__KyVnHhSBWTMBNBB",
            "taxes": [],
            "total": 895,
            "updated_at": 1517501497,
            "valid_till": 1517596199,
            "version": 1
        },
        "quoted_subscription": {
            "id": "__test__KyVnHhSBWTMBNBB",
            "object": "quoted_subscription",
            "plan_id": "no_trial",
            "plan_quantity": 1
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote

    Method

    name[]
    optional, string, max chars=100
    The quote name will be used as the pdf name of the quote.
    notes[]
    optional, string, max chars=2000
    Notes specific to this quote that you want customers to see on the quote PDF.
    expires_at[]
    optional, timestamp(UTC) in seconds
    Quotes will be valid till this date. After this quote will be marked as closed.
    replace_addon_list[]
    optional, boolean, default=false
    Should be true if the existing addons should be replaced with the ones that are being passed.
    mandatory_addons_to_remove[[0..n]][0..n]
    optional, list of string
    List of addons IDs that are mandatory to the plan and has to be removed from the subscription.
    billing_cycles[]
    optional, integer, min=0
    The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan is used.
    terms_to_charge[]
    optional, integer, min=1
    The number of subscription billing cycles to invoice in advance. If a new term is started for the subscription due to this API call, then terms_to_charge is inclusive of this new term. See description for the force_term_reset parameter to learn more about when a subscription term is reset.
    reactivate_from[]
    optional, timestamp(UTC) in seconds
    If the subscription status is cancelled and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.
    Note: It is recommended not to pass this parameter along with changed_scheduled_at. reactivate_from can be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
    • Backdating must be enabled for subscription reactivation operations.
    • The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
    • The date is on or after the last date/time any of the product catalog items of the subscription were changed.
    • The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, changes_scheduled_at cannot be earlier than 14th February.
    .
    billing_alignment_mode[]
    optional, enumerated string
    Override the billing alignment mode chosen for the site for calendar billing. Only applicable when using calendar billing.
    Possible values are
    immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
    immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
    Show all values[+]
    coupon_ids[[0..n]][0..n]
    optional, list of string
    Identifier of the coupon as a List. Coupon Codes can also be passed.
    replace_coupon_list[]
    optional, boolean, default=false
    Should be true if the existing coupons should be replaced with the ones that are being passed.
    change_option[]
    optional, enumerated string
    When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.
    Possible values are
    immediatelyThe change is carried out immediately.specific_dateThe change is carried out as of the date specified under changes_scheduled_at.
    immediatelyThe change is carried out immediately.specific_dateThe change is carried out as of the date specified under changes_scheduled_at.
    Show all values[+]
    changes_scheduled_at[]
    optional, timestamp(UTC) in seconds
    When change_option is set to specific_date, then set the date/time at which the subscription change is to happen or has happened. changes_scheduled_at can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
    • Backdating must be enabled for subscription change operations.
    • Only the following changes can be backdated:
      • Changes in the recurring items or their prices.
      • Addition of non-recurring items.
    • Subscription status is active, cancelled, or non_renewing.
    • The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
    • The date is on or after current_term_start.
    • The date is on or after the last date/time any of the following changes were made:
      • Changes in the recurring items or their prices.
      • Addition of non-recurring items.
    • The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription’s plan is 2 months and today is 14th April, changes_scheduled_at cannot be earlier than 14th February.
    .
    Note: The changes_scheduled_at parameter does not apply to auto_collection, shipping_address, and po_number; these parameters take effect immediately when scheduling a subscription update.
    force_term_reset[]
    optional, boolean, default=false
    Applicable for 'Active' & 'Non Renewing' states alone. Generally, subscription's term will be reset (i.e current term is ended and a new term starts immediately) when a new plan having different billing frequency is specified in the input. For all the other cases, the subscription's term will remain intact. Now for this later scenario, if you want to force a term reset you can specify this param as 'true'.
    Note: Specifying this value as 'false' has no impact on the default behaviour.
    reactivate[]
    optional, boolean
    Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
    subscription[id]
    required, string, max chars=50
    A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
    subscription[plan_id]
    optional, string, max chars=100
    Identifier of the plan for this subscription
    subscription[plan_quantity]
    optional, integer, default=1, min=1
    Represents the plan quantity for this subscription.
    subscription[plan_unit_price]
    optional, in cents, min=0
    Amount that will override the Plan's default price. The unit depends on the type of currency.
    subscription[setup_fee]
    optional, in cents, min=0
    Amount that will override the default setup fee. The unit depends on the type of currency.
    subscription[plan_quantity_in_decimal]
    optional, string, max chars=33
    The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when multi-decimal pricing is enabled.
    subscription[plan_unit_price_in_decimal]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the plan can be set here. The value set for the plan is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    subscription[start_date]
    optional, timestamp(UTC) in seconds
    The new start date of a future subscription. Applicable only for future subscriptions.
    subscription[trial_end]
    optional, timestamp(UTC) in seconds
    The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription status is future, in_trial, or cancelled. Also, the value must not be earlier than changes_scheduled_at or start_date. Note: This parameter can be backdated (set to a value in the past) only when the subscription is in cancelled or in_trial status. Do this to keep a record of when the trial ended in case it ended at some point in the past. When trial_end is backdated, the subscription immediately goes into active or non_renewing status.
    subscription[auto_collection]
    optional, enumerated string
    Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.
    Possible values are
    onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
    onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
    Show all values[+]
    subscription[offline_payment_method]
    optional, enumerated string
    The preferred offline payment method for the subscription.
    Possible values are
    no_preferenceNo PreferencecashCashcheckCheckbank_transferBank Transferach_creditACH Creditsepa_creditSEPA CreditboletoBoletous_automated_bank_transferUS Automated Bank Transfereu_automated_bank_transferEU Automated Bank Transferuk_automated_bank_transferUK Automated Bank Transferjp_automated_bank_transferJP Automated Bank Transfermx_automated_bank_transferMX Automated Bank TransfercustomCustom
    no_preferenceNo PreferencecashCashcheckCheckbank_transferBank Transfer
    ach_creditACH Creditsepa_creditSEPA CreditboletoBoletous_automated_bank_transferUS Automated Bank Transfereu_automated_bank_transferEU Automated Bank Transferuk_automated_bank_transferUK Automated Bank Transferjp_automated_bank_transferJP Automated Bank Transfermx_automated_bank_transferMX Automated Bank TransfercustomCustom
    Show all values[+]
    subscription[contract_term_billing_cycle_on_renewal]
    optional, integer, min=1, max=100
    Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
    billing_address[first_name]
    optional, string, max chars=150
    The first name of the billing contact.
    billing_address[last_name]
    optional, string, max chars=150
    The last name of the billing contact.
    billing_address[email]
    optional, string, max chars=70
    The email address.
    billing_address[company]
    optional, string, max chars=250
    The company name.
    billing_address[phone]
    optional, string, max chars=50
    The phone number.
    billing_address[line1]
    optional, string, max chars=150
    Address line 1
    billing_address[line2]
    optional, string, max chars=150
    Address line 2
    billing_address[line3]
    optional, string, max chars=150
    Address line 3
    billing_address[city]
    optional, string, max chars=50
    The name of the city.
    billing_address[state_code]
    optional, string, max chars=50
    The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
    billing_address[state]
    optional, string, max chars=50
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    billing_address[zip]
    optional, string, max chars=20
    Zip or postal code. The number of characters is validated according to the rules specified here.
    billing_address[country]
    optional, string, max chars=50
    The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

    Note: If you enter an invalid country code, the system will return an error.

    Brexit

    If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.

    billing_address[validation_status]
    optional, enumerated string, default=not_validated
    The address verification status.
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    Show all values[+]
    shipping_address[first_name]
    optional, string, max chars=150
    The first name of the contact.
    shipping_address[last_name]
    optional, string, max chars=150
    The last name of the contact.
    shipping_address[email]
    optional, string, max chars=70
    The email address.
    shipping_address[company]
    optional, string, max chars=250
    The company name.
    shipping_address[phone]
    optional, string, max chars=50
    The phone number.
    shipping_address[line1]
    optional, string, max chars=150
    Address line 1
    shipping_address[line2]
    optional, string, max chars=150
    Address line 2
    shipping_address[line3]
    optional, string, max chars=150
    Address line 3
    shipping_address[city]
    optional, string, max chars=50
    The name of the city.
    shipping_address[state_code]
    optional, string, max chars=50
    The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
    shipping_address[state]
    optional, string, max chars=50
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    shipping_address[zip]
    optional, string, max chars=20
    Zip or postal code. The number of characters is validated according to the rules specified here.
    shipping_address[country]
    optional, string, max chars=50
    The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

    Note: If you enter an invalid country code, the system will return an error.

    Brexit

    If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.

    shipping_address[validation_status]
    optional, enumerated string, default=not_validated
    The address verification status.
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    Show all values[+]
    customer[vat_number]
    optional, string, max chars=20
    VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this.
    customer[vat_number_prefix]
    optional, string, max chars=10
    An overridden value for the first two characters of the full VAT number. Only applicable specifically for customers with billing_address country as XI (which is United Kingdom - Northern Ireland).

    When you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, you have the option of setting billing_address country as XI. That’s the code for United Kingdom - Northern Ireland. The first two characters of the VAT number in such a case is XI by default. However, if the VAT number was registered in UK, the value should be GB. Set vat_number_prefix to GB for such cases.
    customer[registered_for_gst]
    optional, boolean
    Confirms that a customer is registered under GST. If set to true then the Reverse Charge Mechanism is applicable. This field is applicable only when Australian GST is configured for your site.
    contract_term[action_at_term_end]
    optional, enumerated string, default=renew
    Action to be taken when the contract term completes.
    Possible values are
    renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.renew_onceUsed when you want to renew the contract term just once. Does the following:
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to cancel.
  • renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.renew_onceUsed when you want to renew the contract term just once. Does the following:
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to cancel.
  • Show all values[+]
    contract_term[cancellation_cutoff_period]
    optional, integer
    The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
    addons[id][0..n]
    optional, string, max chars=100
    Identifier of the addon. Multiple addons can be passed.
    addons[quantity][0..n]
    optional, integer, default=1, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    addons[unit_price][0..n]
    optional, in cents, min=0

    The price or per-unit-price of the addon. The value depends on the type of currency.

    Note:

    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:

    • The unit_price provided is $10
    • The addon billing period is 1 month.
    • The plan billing period is 3 months.
    • The addon is only billed for $10 on each subscription renewal.
    addons[billing_cycles][0..n]
    optional, integer, min=0
    Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.
    addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when multi-decimal pricing is enabled.
    addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the addon can be set here. The value set for the addon is used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon period. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    addons[trial_end][0..n]
    optional, timestamp(UTC) in seconds
    The time at which the trial ends for the addon. To update this value, redo the complete addon set using replace_addon_list. (Addon trial periods must be enabled by Chargebee Support.)
    event_based_addons[id][0..n]
    optional, string, max chars=100
    A unique 'id' used to identify the addon.
    event_based_addons[quantity][0..n]
    optional, integer, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    event_based_addons[unit_price][0..n]
    optional, in cents, min=0
    Amount that will override the Addon's default price. The unit depends on the type of currency.
    event_based_addons[service_period_in_days][0..n]
    optional, integer, min=1, max=730
    Defines service period of the addon in days from the day of charge.
    event_based_addons[charge_on][0..n]
    optional, enumerated string
    Indicates when the non-recurring addon will be charged.
    Possible values are
    immediatelyCharges for the addon will be applied immediately.on_eventCharge for the addon will be applied on the occurrence of a specified event.
    immediatelyCharges for the addon will be applied immediately.on_eventCharge for the addon will be applied on the occurrence of a specified event.
    Show all values[+]
    event_based_addons[on_event][0..n]
    optional, enumerated string
    Event on which this addon will be charged.
    Possible values are
    subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.contract_terminationAddon will be charged on contract termination.
    subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.
    contract_terminationAddon will be charged on contract termination.
    Show all values[+]
    event_based_addons[charge_once][0..n]
    optional, boolean, default=true
    If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.
    event_based_addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when multi-decimal pricing is enabled.
    event_based_addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the addon can be set here. The value set for the addonis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x

    Edits a quote. This endpoint is for editing quotes that are for updating a subscription. To edit a quote for a new subscription, use Edit quote for a new subscription.”

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/1/edit_update_subscription_quote \
         -u {site_api_key}:\
         -d "subscription[plan_id]"="no_trial" \
         -d "billing_address[first_name]"="John" \
         -d "billing_address[last_name]"="Doe" \
         -d "billing_address[line1]"="PO Box 9999" \
         -d "billing_address[city]"="Walnut" \
         -d "billing_address[state]"="California" \
         -d "billing_address[zip]"="91789" \
         -d "billing_address[country]"="US" 
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/1/edit_update_subscription_quote \
         -u {site_api_key}:\
         -d "subscription[plan_id]"="no_trial" \
         -d "billing_address[first_name]"="John" \
         -d "billing_address[last_name]"="Doe" \
         -d "billing_address[line1]"="PO Box 9999" \
         -d "billing_address[city]"="Walnut" \
         -d "billing_address[state]"="California" \
         -d "billing_address[zip]"="91789" \
         -d "billing_address[country]"="US" 

    Sample Response [ JSON ]

    Show more...
    {
        "quote": {
            "id": "5",
            "customer_id": "__dev__KyVlEuRpeT0m25",
            "status": "open",
            "operation_type": "change_subscription",
            "price_type": "tax_exclusive",
            "valid_till": 1581791399,
            "date": 1580927607,
            "total_payable": 1395,
            "charge_on_acceptance": 1395,
            "sub_total": 1395,
            "total": 1395,
            "credits_applied": 0,
            "amount_paid": 0,
            "amount_due": 1395,
            "updated_at": 1580927607,
            "resource_version": 1580927607468,
            "object": "quote",
            "line_items": [
                {
                    "id": "__dev__KyVl9ORpeV7yI7",
                    "date_from": 1580927606,
                    "date_to": 1583433206,
                    "unit_amount": 900,
                    "quantity": 1,
                    "amount": 900,
                    "pricing_model": "per_unit",
                    "is_taxed": false,
                    "tax_amount": 0,
                    "object": "line_item",
                    "customer_id": "__dev__KyVlEuRpeT0m25",
                    "description": "No Trial",
                    "entity_type": "plan",
                    "entity_id": "no-trial",
                    "discount_amount": 0,
                    "item_level_discount_amount": 0
                },
                {..}
            ],
            "line_item_discounts": [],
            "taxes": [],
            "line_item_taxes": [],
            "currency_code": "USD"
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote-id}/edit_update_subscription_quote

    Method

    notes[]
    optional, string, max chars=2000
    Notes specific to this quote that you want customers to see on the quote PDF.
    expires_at[]
    optional, timestamp(UTC) in seconds
    Quotes will be valid till this date. After this quote will be marked as closed.
    replace_addon_list[]
    optional, boolean, default=false
    Should be true if the existing addons should be replaced with the ones that are being passed.
    mandatory_addons_to_remove[[0..n]][0..n]
    optional, list of string
    List of addons IDs that are mandatory to the plan and has to be removed from the subscription.
    billing_cycles[]
    optional, integer, min=0
    The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan is used.
    terms_to_charge[]
    optional, integer, min=1
    The number of subscription billing cycles to invoice in advance. If a new term is started for the subscription due to this API call, then terms_to_charge is inclusive of this new term. See description for the force_term_reset parameter to learn more about when a subscription term is reset.
    reactivate_from[]
    optional, timestamp(UTC) in seconds
    If the subscription status is cancelled and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.
    Note: It is recommended not to pass this parameter along with changed_scheduled_at. reactivate_from can be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
    • Backdating must be enabled for subscription reactivation operations.
    • The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
    • The date is on or after the last date/time any of the product catalog items of the subscription were changed.
    • The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, changes_scheduled_at cannot be earlier than 14th February.
    .
    billing_alignment_mode[]
    optional, enumerated string
    Override the billing alignment mode chosen for the site for calendar billing. Only applicable when using calendar billing.
    Possible values are
    immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
    immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
    Show all values[+]
    coupon_ids[[0..n]][0..n]
    optional, list of string
    Identifier of the coupon as a List. Coupon Codes can also be passed.
    replace_coupon_list[]
    optional, boolean, default=false
    Should be true if the existing coupons should be replaced with the ones that are being passed.
    change_option[]
    optional, enumerated string
    When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.
    Possible values are
    immediatelyThe change is carried out immediately.specific_dateThe change is carried out as of the date specified under changes_scheduled_at.
    immediatelyThe change is carried out immediately.specific_dateThe change is carried out as of the date specified under changes_scheduled_at.
    Show all values[+]
    changes_scheduled_at[]
    optional, timestamp(UTC) in seconds
    When change_option is set to specific_date, then set the date/time at which the subscription change is to happen or has happened. changes_scheduled_at can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
    • Backdating must be enabled for subscription change operations.
    • Only the following changes can be backdated:
      • Changes in the recurring items or their prices.
      • Addition of non-recurring items.
    • Subscription status is active, cancelled, or non_renewing.
    • The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
    • The date is on or after current_term_start.
    • The date is on or after the last date/time any of the following changes were made:
      • Changes in the recurring items or their prices.
      • Addition of non-recurring items.
    • The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription’s plan is 2 months and today is 14th April, changes_scheduled_at cannot be earlier than 14th February.
    .
    force_term_reset[]
    optional, boolean, default=false
    Applicable for 'Active' & 'Non Renewing' states alone. Generally, subscription's term will be reset (i.e current term is ended and a new term starts immediately) when a new plan having different billing frequency is specified in the input. For all the other cases, the subscription's term will remain intact. Now for this later scenario, if you want to force a term reset you can specify this param as 'true'.
    Note: Specifying this value as 'false' has no impact on the default behaviour.
    reactivate[]
    optional, boolean
    Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
    subscription[plan_id]
    optional, string, max chars=100
    Identifier of the plan for this subscription
    subscription[plan_quantity]
    optional, integer, default=1, min=1
    Represents the plan quantity for this subscription.
    subscription[plan_unit_price]
    optional, in cents, min=0
    Amount that will override the Plan's default price. The unit depends on the type of currency.
    subscription[setup_fee]
    optional, in cents, min=0
    Amount that will override the default setup fee. The unit depends on the type of currency.
    subscription[plan_quantity_in_decimal]
    optional, string, max chars=33
    The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when multi-decimal pricing is enabled.
    subscription[plan_unit_price_in_decimal]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the plan can be set here. The value set for the plan is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    subscription[start_date]
    optional, timestamp(UTC) in seconds
    The new start date of a future subscription. Applicable only for future subscriptions.
    subscription[trial_end]
    optional, timestamp(UTC) in seconds
    The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription status is future, in_trial, or cancelled. Also, the value must not be earlier than changes_scheduled_at or start_date. Note: This parameter can be backdated (set to a value in the past) only when the subscription is in cancelled or in_trial status. Do this to keep a record of when the trial ended in case it ended at some point in the past. When trial_end is backdated, the subscription immediately goes into active or non_renewing status.
    subscription[auto_collection]
    optional, enumerated string
    Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.
    Possible values are
    onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
    onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
    Show all values[+]
    subscription[offline_payment_method]
    optional, enumerated string
    The preferred offline payment method for the subscription.
    Possible values are
    no_preferenceNo PreferencecashCashcheckCheckbank_transferBank Transferach_creditACH Creditsepa_creditSEPA CreditboletoBoletous_automated_bank_transferUS Automated Bank Transfereu_automated_bank_transferEU Automated Bank Transferuk_automated_bank_transferUK Automated Bank Transferjp_automated_bank_transferJP Automated Bank Transfermx_automated_bank_transferMX Automated Bank TransfercustomCustom
    no_preferenceNo PreferencecashCashcheckCheckbank_transferBank Transfer
    ach_creditACH Creditsepa_creditSEPA CreditboletoBoletous_automated_bank_transferUS Automated Bank Transfereu_automated_bank_transferEU Automated Bank Transferuk_automated_bank_transferUK Automated Bank Transferjp_automated_bank_transferJP Automated Bank Transfermx_automated_bank_transferMX Automated Bank TransfercustomCustom
    Show all values[+]
    subscription[contract_term_billing_cycle_on_renewal]
    optional, integer, min=1, max=100
    Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
    billing_address[first_name]
    optional, string, max chars=150
    The first name of the billing contact.
    billing_address[last_name]
    optional, string, max chars=150
    The last name of the billing contact.
    billing_address[email]
    optional, string, max chars=70
    The email address.
    billing_address[company]
    optional, string, max chars=250
    The company name.
    billing_address[phone]
    optional, string, max chars=50
    The phone number.
    billing_address[line1]
    optional, string, max chars=150
    Address line 1
    billing_address[line2]
    optional, string, max chars=150
    Address line 2
    billing_address[line3]
    optional, string, max chars=150
    Address line 3
    billing_address[city]
    optional, string, max chars=50
    The name of the city.
    billing_address[state_code]
    optional, string, max chars=50
    The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
    billing_address[state]
    optional, string, max chars=50
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    billing_address[zip]
    optional, string, max chars=20
    Zip or postal code. The number of characters is validated according to the rules specified here.
    billing_address[country]
    optional, string, max chars=50
    The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

    Note: If you enter an invalid country code, the system will return an error.

    Brexit

    If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.

    billing_address[validation_status]
    optional, enumerated string, default=not_validated
    The address verification status.
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    Show all values[+]
    shipping_address[first_name]
    optional, string, max chars=150
    The first name of the contact.
    shipping_address[last_name]
    optional, string, max chars=150
    The last name of the contact.
    shipping_address[email]
    optional, string, max chars=70
    The email address.
    shipping_address[company]
    optional, string, max chars=250
    The company name.
    shipping_address[phone]
    optional, string, max chars=50
    The phone number.
    shipping_address[line1]
    optional, string, max chars=150
    Address line 1
    shipping_address[line2]
    optional, string, max chars=150
    Address line 2
    shipping_address[line3]
    optional, string, max chars=150
    Address line 3
    shipping_address[city]
    optional, string, max chars=50
    The name of the city.
    shipping_address[state_code]
    optional, string, max chars=50
    The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
    shipping_address[state]
    optional, string, max chars=50
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    shipping_address[zip]
    optional, string, max chars=20
    Zip or postal code. The number of characters is validated according to the rules specified here.
    shipping_address[country]
    optional, string, max chars=50
    The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

    Note: If you enter an invalid country code, the system will return an error.

    Brexit

    If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.

    shipping_address[validation_status]
    optional, enumerated string, default=not_validated
    The address verification status.
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    Show all values[+]
    customer[vat_number]
    optional, string, max chars=20
    VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this.
    customer[vat_number_prefix]
    optional, string, max chars=10
    An overridden value for the first two characters of the full VAT number. Only applicable specifically for customers with billing_address country as XI (which is United Kingdom - Northern Ireland).

    When you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, you have the option of setting billing_address country as XI. That’s the code for United Kingdom - Northern Ireland. The first two characters of the VAT number in such a case is XI by default. However, if the VAT number was registered in UK, the value should be GB. Set vat_number_prefix to GB for such cases.
    customer[registered_for_gst]
    optional, boolean
    Confirms that a customer is registered under GST. If set to true then the Reverse Charge Mechanism is applicable. This field is applicable only when Australian GST is configured for your site.
    contract_term[action_at_term_end]
    optional, enumerated string, default=renew
    Action to be taken when the contract term completes.
    Possible values are
    renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.renew_onceUsed when you want to renew the contract term just once. Does the following:
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to cancel.
  • renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.renew_onceUsed when you want to renew the contract term just once. Does the following:
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to cancel.
  • Show all values[+]
    contract_term[cancellation_cutoff_period]
    optional, integer
    The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
    addons[id][0..n]
    optional, string, max chars=100
    Identifier of the addon. Multiple addons can be passed.
    addons[quantity][0..n]
    optional, integer, default=1, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    addons[unit_price][0..n]
    optional, in cents, min=0

    The price or per-unit-price of the addon. The value depends on the type of currency.

    Note:

    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:

    • The unit_price provided is $10
    • The addon billing period is 1 month.
    • The plan billing period is 3 months.
    • The addon is only billed for $10 on each subscription renewal.
    addons[billing_cycles][0..n]
    optional, integer, min=0
    Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.
    addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when multi-decimal pricing is enabled.
    addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the addon can be set here. The value set for the addon is used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon period. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    addons[trial_end][0..n]
    optional, timestamp(UTC) in seconds
    The time at which the trial ends for the addon. To update this value, redo the complete addon set using replace_addon_list. (Addon trial periods must be enabled by Chargebee Support.)
    event_based_addons[id][0..n]
    optional, string, max chars=100
    A unique 'id' used to identify the addon.
    event_based_addons[quantity][0..n]
    optional, integer, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    event_based_addons[unit_price][0..n]
    optional, in cents, min=0
    Amount that will override the Addon's default price. The unit depends on the type of currency.
    event_based_addons[service_period_in_days][0..n]
    optional, integer, min=1, max=730
    Defines service period of the addon in days from the day of charge.
    event_based_addons[charge_on][0..n]
    optional, enumerated string
    Indicates when the non-recurring addon will be charged.
    Possible values are
    immediatelyCharges for the addon will be applied immediately.on_eventCharge for the addon will be applied on the occurrence of a specified event.
    immediatelyCharges for the addon will be applied immediately.on_eventCharge for the addon will be applied on the occurrence of a specified event.
    Show all values[+]
    event_based_addons[on_event][0..n]
    optional, enumerated string
    Event on which this addon will be charged.
    Possible values are
    subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.contract_terminationAddon will be charged on contract termination.
    subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.
    contract_terminationAddon will be charged on contract termination.
    Show all values[+]
    event_based_addons[charge_once][0..n]
    optional, boolean, default=true
    If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.
    event_based_addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when multi-decimal pricing is enabled.
    event_based_addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39
    When price overriding is enabled for the site, the price or per-unit price of the addon can be set here. The value set for the addonis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x

    Creates a quote for one-time charges and non-recurring addons. This is applicable only for one-time payment. Recurring charges are not permitted in this quote; use Create quote for a new subscription or Create quote for updating a subscription instead.

    To send this quote, use “Send Email” quote action in the Chargebee application.

    Based on the customer’s reply, you can use Update quote status and Convert a quote APIs for changing quote status and invoicing the customer, respectively.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/create_for_onetime_charges \
         -u {site_api_key}:\
         -d customer_id="__test__KyVnHhSBWTM5WB0" \
         -d "charges[amount][0]"=1000 \
         -d "charges[description][0]"="Service Charge" 
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/create_for_onetime_charges \
         -u {site_api_key}:\
         -d customer_id="__test__KyVnHhSBWTM5WB0" \
         -d "charges[amount][0]"=1000 \
         -d "charges[description][0]"="Service Charge" 

    Sample Response [ JSON ]

    Show more...
    {
        "quote": {
            "amount_due": 1000,
            "amount_paid": 0,
            "billing_address": {
                "first_name": "John",
                "last_name": "Doe",
                "object": "billing_address",
                "validation_status": "not_validated"
            },
            "charge_on_acceptance": 1000,
            "credits_applied": 0,
            "currency_code": "USD",
            "customer_id": "__test__KyVnHhSBWTM5WB0",
            "date": 1517501496,
            "id": "3",
            "line_item_discounts": [],
            "line_item_taxes": [],
            "line_items": [
                {
                    "amount": 1000,
                    "customer_id": "__test__KyVnHhSBWTM5WB0",
                    "date_from": 1517501496,
                    "date_to": 1517501496,
                    "description": "Service Charge",
                    "discount_amount": 0,
                    "entity_type": "adhoc",
                    "id": "__test__KyVnHhSBWTM8HB9",
                    "is_taxed": false,
                    "item_level_discount_amount": 0,
                    "object": "line_item",
                    "pricing_model": "flat_fee",
                    "quantity": 1,
                    "tax_amount": 0,
                    "unit_amount": 1000
                },
                {..}
            ],
            "object": "quote",
            "operation_type": "onetime_invoice",
            "price_type": "tax_exclusive",
            "resource_version": 1517501496000,
            "status": "open",
            "sub_total": 1000,
            "taxes": [],
            "total": 1000,
            "total_payable": 1000,
            "updated_at": 1517501496,
            "valid_till": 1517596199,
            "version": 1
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/create_for_onetime_charges

    Method

    name[]
    optional, string, max chars=100
    The quote name will be used as the pdf name of the quote.
    customer_id[]
    required, string, max chars=50
    Identifier of the customer for which the quote needs to be created.
    po_number[]
    optional, string, max chars=100
    Purchase Order Number for this quote.
    notes[]
    optional, string, max chars=2000
    Notes specific to this quote that you want customers to see on the quote PDF.
    expires_at[]
    optional, timestamp(UTC) in seconds
    Quotes will be valid till this date. After this quote will be marked as closed.
    currency_code[]
    required if Multicurrency is enabled, string, max chars=3
    The currency code (ISO 4217 format) of the quote.
    coupon[]
    optional, string, max chars=100
    The 'One Time' coupon to be applied.
    coupon_ids[[0..n]][0..n]
    optional, list of string
    List of Coupons to be added.
    shipping_address[first_name]
    optional, string, max chars=150
    The first name of the contact.
    shipping_address[last_name]
    optional, string, max chars=150
    The last name of the contact.
    shipping_address[email]
    optional, string, max chars=70
    The email address.
    shipping_address[company]
    optional, string, max chars=250
    The company name.
    shipping_address[phone]
    optional, string, max chars=50
    The phone number.
    shipping_address[line1]
    optional, string, max chars=150
    Address line 1
    shipping_address[line2]
    optional, string, max chars=150
    Address line 2
    shipping_address[line3]
    optional, string, max chars=150
    Address line 3
    shipping_address[city]
    optional, string, max chars=50
    The name of the city.
    shipping_address[state_code]
    optional, string, max chars=50
    The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
    shipping_address[state]
    optional, string, max chars=50
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    shipping_address[zip]
    optional, string, max chars=20
    Zip or postal code. The number of characters is validated according to the rules specified here.
    shipping_address[country]
    optional, string, max chars=50
    The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

    Note: If you enter an invalid country code, the system will return an error.

    Brexit

    If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.

    shipping_address[validation_status]
    optional, enumerated string, default=not_validated
    The address verification status.
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    Show all values[+]
    addons[id][0..n]
    optional, string, max chars=100
    Identifier of the addon. Multiple addons can be passed.
    addons[quantity][0..n]
    optional, integer, default=1, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Returned for quantity-based plans when multi-decimal pricing is enabled.
    addons[unit_price][0..n]
    optional, in cents, min=0

    The price or per-unit-price of the addon. The value depends on the type of currency.

    Note:

    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:

    • The unit_price provided is $10
    • The addon billing period is 1 month.
    • The plan billing period is 3 months.
    • The addon is only billed for $10 on each subscription renewal.
    addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39

    The decimal representation of the price or per-unit price of the addon. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.

    Note:

    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:

    • The unit_price_in_decimal provided is $10.75
    • The addon billing period is 1 month.
    • The plan billing period is 3 months.
    • The addon is only billed for $10.75 on each subscription renewal.
    addons[service_period][0..n]
    optional, integer
    Specifies the service period of the addon in days. When the quote is converted, the invoice.line_item.date_from is set to current date/time and invoice.line_item.date_to is set to service_period days ahead of date_from.
    charges[amount][0..n]
    optional, in cents, min=1
    The amount to be charged. The unit depends on the type of currency.
    charges[amount_in_decimal][0..n]
    optional, string, max chars=39
    The decimal representation of the amount for the one-time charge. The value is in major units of the currency. Applicable only when multi-decimal pricing is enabled.
    charges[description][0..n]
    optional, string, max chars=250
    Description for this charge
    charges[avalara_sale_type][0..n]
    optional, enumerated string
    Indicates the type of sale carried out. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
    Possible values are
    wholesaleTransaction is a sale to another company that will resell your product or service to another consumerretailTransaction is a sale to an end userconsumedTransaction is for an item that is consumed directlyvendor_useTransaction is for an item that is subject to vendor use tax
    wholesaleTransaction is a sale to another company that will resell your product or service to another consumerretailTransaction is a sale to an end userconsumedTransaction is for an item that is consumed directlyvendor_useTransaction is for an item that is subject to vendor use tax
    Show all values[+]
    charges[avalara_transaction_type][0..n]
    optional, integer
    Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
    charges[avalara_service_type][0..n]
    optional, integer
    Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
    charges[service_period][0..n]
    optional, integer
    Service period for charge
    tax_providers_fields[provider_name][0..n]
    optional, string, max chars=50
    Name of the tax provider currently supported.
    tax_providers_fields[field_id][0..n]
    optional, string, max chars=50
    Field id of the attribute which tax vendor has provided while getting onboarded with us.
    tax_providers_fields[field_value][0..n]
    optional, string, max chars=50
    The value of the corresponding tax field.
    quote quote
    always returned
    Resource object representing quote
    quoted_charge quoted_charge
    optional
    Resource object representing quoted_charge

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x

    Edits a quote. The quote must be for one-time charges or non-recurring addons.

    To edit quotes created for subscriptions, use:

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/6/edit_one_time_quote \
         -X POST  \
         -u {site_api_key}:\
         -d "charges[amount][0]"=1000 \
         -d "charges[description][0]"="Service Charge" 
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/6/edit_one_time_quote \
         -X POST  \
         -u {site_api_key}:\
         -d "charges[amount][0]"=1000 \
         -d "charges[description][0]"="Service Charge" 

    Sample Response [ JSON ]

    Show more...
    {
        "quote": {
            "amount_due": 1000,
            "amount_paid": 0,
            "billing_address": {
                "first_name": "John",
                "last_name": "Doe",
                "object": "billing_address",
                "validation_status": "not_validated"
            },
            "charge_on_acceptance": 1000,
            "credits_applied": 0,
            "currency_code": "USD",
            "customer_id": "__test__KyVnHhSBWTMR3Bb",
            "date": 1517501498,
            "id": "6",
            "line_item_discounts": [],
            "line_item_taxes": [],
            "line_items": [
                {
                    "amount": 1000,
                    "customer_id": "__test__KyVnHhSBWTMR3Bb",
                    "date_from": 1517501498,
                    "date_to": 1517501498,
                    "description": "Service Charge",
                    "discount_amount": 0,
                    "entity_type": "adhoc",
                    "id": "__test__KyVnHhSBWTMVyBp",
                    "is_taxed": false,
                    "item_level_discount_amount": 0,
                    "object": "line_item",
                    "pricing_model": "flat_fee",
                    "quantity": 1,
                    "tax_amount": 0,
                    "unit_amount": 1000
                },
                {..}
            ],
            "object": "quote",
            "operation_type": "onetime_invoice",
            "price_type": "tax_exclusive",
            "resource_version": 1517501498000,
            "status": "open",
            "sub_total": 1000,
            "taxes": [],
            "total": 1000,
            "total_payable": 1000,
            "updated_at": 1517501498,
            "valid_till": 1517596199,
            "version": 2
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote-id}/edit_one_time_quote

    Method

    po_number[]
    optional, string, max chars=100
    Purchase Order Number for this quote.
    notes[]
    optional, string, max chars=2000
    Notes specific to this quote that you want customers to see on the quote PDF.
    expires_at[]
    optional, timestamp(UTC) in seconds
    Quotes will be valid till this date. After this quote will be marked as closed.
    currency_code[]
    required if Multicurrency is enabled, string, max chars=3
    The currency code (ISO 4217 format) of the quote.
    coupon[]
    optional, string, max chars=100
    The 'One Time' coupon to be applied.
    coupon_ids[[0..n]][0..n]
    optional, list of string
    List of Coupons to be added.
    shipping_address[first_name]
    optional, string, max chars=150
    The first name of the contact.
    shipping_address[last_name]
    optional, string, max chars=150
    The last name of the contact.
    shipping_address[email]
    optional, string, max chars=70
    The email address.
    shipping_address[company]
    optional, string, max chars=250
    The company name.
    shipping_address[phone]
    optional, string, max chars=50
    The phone number.
    shipping_address[line1]
    optional, string, max chars=150
    Address line 1
    shipping_address[line2]
    optional, string, max chars=150
    Address line 2
    shipping_address[line3]
    optional, string, max chars=150
    Address line 3
    shipping_address[city]
    optional, string, max chars=50
    The name of the city.
    shipping_address[state_code]
    optional, string, max chars=50
    The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
    shipping_address[state]
    optional, string, max chars=50
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    shipping_address[zip]
    optional, string, max chars=20
    Zip or postal code. The number of characters is validated according to the rules specified here.
    shipping_address[country]
    optional, string, max chars=50
    The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.

    Note: If you enter an invalid country code, the system will return an error.

    Brexit

    If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.

    shipping_address[validation_status]
    optional, enumerated string, default=not_validated
    The address verification status.
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
    Show all values[+]
    addons[id][0..n]
    optional, string, max chars=100
    Identifier of the addon. Multiple addons can be passed.
    addons[quantity][0..n]
    optional, integer, default=1, min=1
    Quantity of the addon. Applicable for addons with pricing_model other than flat_fee.
    addons[quantity_in_decimal][0..n]
    optional, string, max chars=33
    The decimal representation of the quantity of the addon. Returned for quantity-based plans when multi-decimal pricing is enabled.
    addons[unit_price][0..n]
    optional, in cents, min=0

    The price or per-unit-price of the addon. The value depends on the type of currency.

    Note:

    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:

    • The unit_price provided is $10
    • The addon billing period is 1 month.
    • The plan billing period is 3 months.
    • The addon is only billed for $10 on each subscription renewal.
    addons[unit_price_in_decimal][0..n]
    optional, string, max chars=39

    The decimal representation of the price or per-unit price of the addon. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.

    Note:

    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:

    • The unit_price_in_decimal provided is $10.75
    • The addon billing period is 1 month.
    • The plan billing period is 3 months.
    • The addon is only billed for $10.75 on each subscription renewal.
    addons[service_period][0..n]
    optional, integer
    Specifies the service period of the addon in days. When the quote is converted, the invoice.line_item.date_from is set to current date/time and invoice.line_item.date_to is set to service_period days ahead of date_from.
    charges[amount][0..n]
    optional, in cents, min=1
    The amount to be charged. The unit depends on the type of currency.
    charges[amount_in_decimal][0..n]
    optional, string, max chars=39
    The decimal representation of the amount for the one-time charge. The value is in major units of the currency. Applicable only when multi-decimal pricing is enabled.
    charges[description][0..n]
    optional, string, max chars=250
    Description for this charge
    charges[avalara_sale_type][0..n]
    optional, enumerated string
    Indicates the type of sale carried out. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
    Possible values are
    wholesaleTransaction is a sale to another company that will resell your product or service to another consumerretailTransaction is a sale to an end userconsumedTransaction is for an item that is consumed directlyvendor_useTransaction is for an item that is subject to vendor use tax
    wholesaleTransaction is a sale to another company that will resell your product or service to another consumerretailTransaction is a sale to an end userconsumedTransaction is for an item that is consumed directlyvendor_useTransaction is for an item that is subject to vendor use tax
    Show all values[+]
    charges[avalara_transaction_type][0..n]
    optional, integer
    Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
    charges[avalara_service_type][0..n]
    optional, integer
    Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
    charges[service_period][0..n]
    optional, integer
    Service period for charge
    tax_providers_fields[provider_name][0..n]
    optional, string, max chars=50
    Name of the tax provider currently supported.
    tax_providers_fields[field_id][0..n]
    optional, string, max chars=50
    Field id of the attribute which tax vendor has provided while getting onboarded with us.
    tax_providers_fields[field_value][0..n]
    optional, string, max chars=50
    The value of the corresponding tax field.
    quote quote
    always returned
    Resource object representing quote
    quoted_charge quoted_charge
    optional
    Resource object representing quoted_charge

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x
    List all quotes.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes \
         -G  \
         -u {site_api_key}:\
         --data-urlencode limit=3 \
         --data-urlencode "status[in]"=["accepted"] \
         --data-urlencode "sort_by[asc]"=date
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes \
         -G  \
         -u {site_api_key}:\
         --data-urlencode limit=3 \
         --data-urlencode "status[in]"=["accepted"] \
         --data-urlencode "sort_by[asc]"=date

    Sample Response [ JSON ]

    Show more...
    {
        "list": [
            {
                "quote": {
                    "amount_due": 500,
                    "amount_paid": 0,
                    "billing_address": {
                        "first_name": "John",
                        "last_name": "Doe",
                        "object": "billing_address",
                        "validation_status": "not_validated"
                    },
                    "charge_on_acceptance": 500,
                    "credits_applied": 0,
                    "currency_code": "USD",
                    "customer_id": "__test__KyVnHhSBWTMYaBr",
                    "date": 1517501498,
                    "id": "7",
                    "line_item_discounts": [],
                    "line_item_taxes": [],
                    "line_items": [
                        {
                            "amount": 500,
                            "customer_id": "__test__KyVnHhSBWTMYaBr",
                            "date_from": 1517501498,
                            "date_to": 1517501498,
                            "description": "Service Charge",
                            "discount_amount": 0,
                            "entity_type": "adhoc",
                            "id": "__test__KyVnHhSBWTMbVC0",
                            "is_taxed": false,
                            "item_level_discount_amount": 0,
                            "object": "line_item",
                            "pricing_model": "flat_fee",
                            "quantity": 1,
                            "tax_amount": 0,
                            "unit_amount": 500
                        },
                        {..}
                    ],
                    "object": "quote",
                    "operation_type": "onetime_invoice",
                    "price_type": "tax_exclusive",
                    "resource_version": 1517501498000,
                    "status": "accepted",
                    "sub_total": 500,
                    "taxes": [],
                    "total": 500,
                    "total_payable": 500,
                    "updated_at": 1517501498,
                    "valid_till": 1517596199,
                    "version": 1
                }
            },
            {..}
        ]
    }

    URL Format GET

    https://{site}.chargebee.com/api/v2/quotes

    Method

    limit[]
    optional, integer, default=10, min=1, max=100
    The number of resources to be returned.
    offset[]
    optional, string, max chars=1000
    Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.
    include_deleted[]
    optional, boolean, default=false
    If set to true, includes the deleted resources in the response. For the deleted resources in the response, the 'deleted' attribute will be 'true'.
    sort_by[<sort-order>]
    optional, string filter
    Sorts based on the specified attribute.
    Supported attributes : date
    Supported sort-orders : asc, desc

    Example sort_by[asc] = "date"
    This will sort the result based on the 'date' attribute in ascending(earliest first) order.
    Filter Params
    For operator usages, see the Pagination and Filtering section.
    id[<operator>]
    optional, string filter
    The quote number. Acts as a identifier for quote and typically generated sequentially. Possible values are :
    Supported operators : is, is_not, starts_with, in, not_in

    Example id[is] = "123"
    id[is][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    id[is_not][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    id[starts_with][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    id[in][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    id[not_in][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    customer_id[<operator>]
    optional, string filter
    The identifier of the customer this quote belongs to. Possible values are :
    Supported operators : is, is_not, starts_with, in, not_in

    Example customer_id[is] = "4gmiXbsjdm"
    customer_id[is][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    customer_id[is_not][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    customer_id[starts_with][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    customer_id[in][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    customer_id[not_in][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    subscription_id[<operator>]
    optional, string filter
    To filter based on subscription_id.
    NOTE: Not to be used if consolidated invoicing feature is enabled.
    Possible values are :
    Supported operators : is, is_not, starts_with, is_present, in, not_in

    Example subscription_id[is] = "4gmiXbsjdm"
    subscription_id[is][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    subscription_id[is_not][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    subscription_id[starts_with][operator]
    optional, string, min chars=1 filter
    Possible values are :
    Supported operators :

    Example
    subscription_id[is_present][operator]
    optional, enumerated string filter
    Possible values are : true, false
    Supported operators :

    Example
    subscription_id[in][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    subscription_id[not_in][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    status[<operator>]
    optional, enumerated string filter
    Current status of this quote. Possible values are : open, accepted, declined, invoiced, closed
    Supported operators : is, is_not, in, not_in

    Example status[is] = "open"
    status[is][operator]
    optional, enumerated string filter
    Possible values are : open, accepted, declined, invoiced, closed
    Supported operators :

    Example
    status[is_not][operator]
    optional, enumerated string filter
    Possible values are : open, accepted, declined, invoiced, closed
    Supported operators :

    Example
    status[in][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    status[not_in][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    date[<operator>]
    optional, timestamp(UTC) in seconds filter
    Creation date of the quote. Typically this is the date on which quote is generated. Possible values are :
    Supported operators : after, before, on, between

    Example date[after] = "1435054328"
    date[after][operator]
    optional, timestamp(UTC) in seconds filter
    Possible values are :
    Supported operators :

    Example
    date[before][operator]
    optional, timestamp(UTC) in seconds filter
    Possible values are :
    Supported operators :

    Example
    date[on][operator]
    optional, timestamp(UTC) in seconds filter
    Possible values are :
    Supported operators :

    Example
    date[between][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    updated_at[<operator>]
    optional, timestamp(UTC) in seconds filter
    To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28. Possible values are :
    Supported operators : after, before, on, between

    Example updated_at[after] = "1243545465"
    updated_at[after][operator]
    optional, timestamp(UTC) in seconds filter
    Possible values are :
    Supported operators :

    Example
    updated_at[before][operator]
    optional, timestamp(UTC) in seconds filter
    Possible values are :
    Supported operators :

    Example
    updated_at[on][operator]
    optional, timestamp(UTC) in seconds filter
    Possible values are :
    Supported operators :

    Example
    updated_at[between][operator]
    optional, string filter
    Possible values are :
    Supported operators :

    Example
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription
    next_offset next_offset
    optional, string, max chars=1000
    This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x
    This API retrieves all the quote line groups and lineitems for a quote.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/9/quote_line_groups \
         -G  \
         -u {site_api_key}:
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/9/quote_line_groups \
         -G  \
         -u {site_api_key}:

    Sample Response [ JSON ]

    Show more...
    {
        "list": [
            {
                "quote_line_group": {
                    "id": "qlg___dev__XpbSss5Rp3qHPdF",
                    "sub_total": 67,
                    "total": 67,
                    "credits_applied": 0,
                    "amount_paid": 0,
                    "amount_due": 67,
                    "charge_event": "subscription_change",
                    "object": "quote_line_group",
                    "line_items": [
                        {
                            "id": "__dev__XpbSss5Rp3qHPeG",
                            "date_from": 1580385923,
                            "date_to": 1582199436,
                            "unit_amount": 67,
                            "quantity": 1,
                            "amount": 67,
                            "pricing_model": "per_unit",
                            "is_taxed": false,
                            "tax_amount": 0,
                            "object": "line_item",
                            "customer_id": "active_direct",
                            "description": "SMS Credits - Prorated Charges",
                            "entity_type": "addon",
                            "entity_id": "sms-credits",
                            "discount_amount": 0,
                            "item_level_discount_amount": 0
                        },
                        {..}
                    ],
                    "line_item_discounts": [],
                    "taxes": [],
                    "line_item_taxes": []
                }
            },
            {..}
        ]
    }

    URL Format GET

    https://{site}.chargebee.com/api/v2/quotes/{quote-id}/quote_line_groups

    Method

    limit[]
    optional, integer, default=10, min=1, max=100
    The number of resources to be returned.
    offset[]
    optional, string, max chars=1000
    Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.
    quote_line_group quote_line_group
    always returned
    Resource object representing quote_line_group
    next_offset next_offset
    optional, string, max chars=1000
    This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x
    This API is to convert a quote to an invoice.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/1/convert \
         -X POST  \
         -u {site_api_key}:
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/1/convert \
         -X POST  \
         -u {site_api_key}:

    Sample Response [ JSON ]

    Show more...
    {
        "customer": {
            "allow_direct_debit": false,
            "auto_collection": "on",
            "card_status": "valid",
            "created_at": 1517501494,
            "deleted": false,
            "excess_payments": 0,
            "first_name": "John",
            "id": "__test__KyVnHhSBWTLXiAV",
            "last_name": "Doe",
            "net_term_days": 0,
            "object": "customer",
            "payment_method": {
                "gateway": "chargebee",
                "gateway_account_id": "gw___test__KyVnGlSBWTLQFYI",
                "object": "payment_method",
                "reference_id": "tok___test__KyVnHhSBWTLYlAW",
                "status": "valid",
                "type": "card"
            },
            "pii_cleared": "active",
            "preferred_currency_code": "USD",
            "primary_payment_source_id": "pm___test__KyVnHhSBWTLYpAX",
            "promotional_credits": 0,
            "refundable_credits": 0,
            "resource_version": 1517501494000,
            "taxability": "taxable",
            "unbilled_charges": 0,
            "updated_at": 1517501494
        },
        "invoice": {
            "adjustment_credit_notes": [],
            "amount_adjusted": 0,
            "amount_due": 0,
            "amount_paid": 500,
            "amount_to_collect": 0,
            "applied_credits": [],
            "base_currency_code": "USD",
            "billing_address": {
                "first_name": "John",
                "last_name": "Doe",
                "object": "billing_address",
                "validation_status": "not_validated"
            },
            "credits_applied": 0,
            "currency_code": "USD",
            "customer_id": "__test__KyVnHhSBWTLXiAV",
            "date": 1517501496,
            "deleted": false,
            "due_date": 1517501496,
            "dunning_attempts": [],
            "exchange_rate": 1,
            "first_invoice": true,
            "has_advance_charges": false,
            "id": "__demo_inv__1",
            "is_gifted": false,
            "issued_credit_notes": [],
            "line_items": [
                {
                    "amount": 500,
                    "customer_id": "__test__KyVnHhSBWTLXiAV",
                    "date_from": 1517501495,
                    "date_to": 1517501495,
                    "description": "Service Charge",
                    "discount_amount": 0,
                    "entity_type": "adhoc",
                    "id": "li___test__KyVnHhSBWTLvMAi",
                    "is_taxed": false,
                    "item_level_discount_amount": 0,
                    "object": "line_item",
                    "pricing_model": "flat_fee",
                    "quantity": 1,
                    "tax_amount": 0,
                    "tax_exempt_reason": "tax_not_configured",
                    "unit_amount": 500
                },
                {..}
            ],
            "linked_orders": [],
            "linked_payments": [
                {
                    "applied_amount": 500,
                    "applied_at": 1517501496,
                    "txn_amount": 500,
                    "txn_date": 1517501496,
                    "txn_id": "txn___test__KyVnHhSBWTLvqAj",
                    "txn_status": "success"
                },
                {..}
            ],
            "net_term_days": 0,
            "new_sales_amount": 500,
            "object": "invoice",
            "paid_at": 1517501496,
            "price_type": "tax_exclusive",
            "recurring": false,
            "resource_version": 1517501496000,
            "round_off_amount": 0,
            "status": "paid",
            "sub_total": 500,
            "tax": 0,
            "term_finalized": true,
            "total": 500,
            "updated_at": 1517501496,
            "write_off_amount": 0
        },
        "quote": {
            "amount_due": 500,
            "amount_paid": 0,
            "billing_address": {
                "first_name": "John",
                "last_name": "Doe",
                "object": "billing_address",
                "validation_status": "not_validated"
            },
            "charge_on_acceptance": 500,
            "credits_applied": 0,
            "currency_code": "USD",
            "customer_id": "__test__KyVnHhSBWTLXiAV",
            "date": 1517501495,
            "id": "1",
            "invoice_id": "__demo_inv__1",
            "line_item_discounts": [],
            "line_item_taxes": [],
            "line_items": [
                {
                    "amount": 500,
                    "customer_id": "__test__KyVnHhSBWTLXiAV",
                    "date_from": 1517501495,
                    "date_to": 1517501495,
                    "description": "Service Charge",
                    "discount_amount": 0,
                    "entity_type": "adhoc",
                    "id": "__test__KyVnHhSBWTLsvAe",
                    "is_taxed": false,
                    "item_level_discount_amount": 0,
                    "object": "line_item",
                    "pricing_model": "flat_fee",
                    "quantity": 1,
                    "tax_amount": 0,
                    "unit_amount": 500
                },
                {..}
            ],
            "object": "quote",
            "operation_type": "onetime_invoice",
            "price_type": "tax_exclusive",
            "resource_version": 1517501496000,
            "status": "invoiced",
            "sub_total": 500,
            "taxes": [],
            "total": 500,
            "total_payable": 500,
            "updated_at": 1517501496,
            "valid_till": 1517596199,
            "version": 1
        }
    }

    URL Format POST

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

    Method

    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[id]
    optional, string, max chars=50
    Applicable only for create subscription quote.
    subscription[auto_collection]
    optional, enumerated string
    Applicable only for create subscription quote.
    Possible values are
    onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
    onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
    Show all values[+]
    subscription[po_number]
    optional, string, max chars=100
    Purchase order number for this subscription.
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription
    quoted_charge quoted_charge
    optional
    Resource object representing quoted_charge
    customer customer
    always returned
    Resource object representing customer
    subscription subscription
    optional
    Resource object representing subscription
    invoice invoice
    optional
    Resource object representing invoice
    credit_note credit_note
    optional
    Resource object representing credit_note
    unbilled_charges unbilled_charges
    optional
    Resource object representing unbilled_charges

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x
    Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/11/update_status \
         -u {site_api_key}:\
         -d status="ACCEPTED"
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/11/update_status \
         -u {site_api_key}:\
         -d status="ACCEPTED"

    Sample Response [ JSON ]

    Show more...
    {
        "quote": {
            "amount_due": 500,
            "amount_paid": 0,
            "billing_address": {
                "first_name": "John",
                "last_name": "Doe",
                "object": "billing_address",
                "validation_status": "not_validated"
            },
            "charge_on_acceptance": 500,
            "credits_applied": 0,
            "currency_code": "USD",
            "customer_id": "__test__KyVnHhSBWTO9dCc",
            "date": 1517501504,
            "id": "11",
            "line_item_discounts": [],
            "line_item_taxes": [],
            "line_items": [
                {
                    "amount": 500,
                    "customer_id": "__test__KyVnHhSBWTO9dCc",
                    "date_from": 1517501504,
                    "date_to": 1517501504,
                    "description": "Service Charge",
                    "discount_amount": 0,
                    "entity_type": "adhoc",
                    "id": "__test__KyVnHhSBWTOCyCl",
                    "is_taxed": false,
                    "item_level_discount_amount": 0,
                    "object": "line_item",
                    "pricing_model": "flat_fee",
                    "quantity": 1,
                    "tax_amount": 0,
                    "unit_amount": 500
                },
                {..}
            ],
            "object": "quote",
            "operation_type": "onetime_invoice",
            "price_type": "tax_exclusive",
            "resource_version": 1517501504000,
            "status": "accepted",
            "sub_total": 500,
            "taxes": [],
            "total": 500,
            "total_payable": 500,
            "updated_at": 1517501504,
            "valid_till": 1517596199,
            "version": 1
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote-id}/update_status

    Method

    status[]
    required, enumerated string
    Status to update for the quote.
    Possible values are
    acceptedAccepted.declinedDeclined.closedClosed
    acceptedAccepted.declinedDeclined.closedClosed
    Show all values[+]
    comment[]
    optional, string, max chars=300
    An internal comment to be added for this operation, to the quote. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing Hosted Page or any document such as the Quote PDF.
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription
    quoted_charge quoted_charge
    optional
    Resource object representing quoted_charge

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x
    Can be used to extend the expiry date of a quote.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/10/extend_expiry_date \
         -u {site_api_key}:\
         -d valid_till=1581791399
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/10/extend_expiry_date \
         -u {site_api_key}:\
         -d valid_till=1581791399

    Sample Response [ JSON ]

    Show more...
    {
        "quote": {
            "id": "5",
            "customer_id": "__dev__KyVlEuRpeT0m25",
            "status": "open",
            "operation_type": "create_subscription_for_customer",
            "price_type": "tax_exclusive",
            "valid_till": 1581791399,
            "date": 1580927607,
            "total_payable": 1395,
            "charge_on_acceptance": 1395,
            "sub_total": 1395,
            "total": 1395,
            "credits_applied": 0,
            "amount_paid": 0,
            "amount_due": 1395,
            "updated_at": 1580927607,
            "resource_version": 1580927607468,
            "object": "quote",
            "line_items": [
                {
                    "id": "__dev__KyVl9ORpeV7yI7",
                    "date_from": 1580927606,
                    "date_to": 1583433206,
                    "unit_amount": 900,
                    "quantity": 1,
                    "amount": 900,
                    "pricing_model": "per_unit",
                    "is_taxed": false,
                    "tax_amount": 0,
                    "object": "line_item",
                    "customer_id": "__dev__KyVlEuRpeT0m25",
                    "description": "No Trial",
                    "entity_type": "plan",
                    "entity_id": "no-trial",
                    "discount_amount": 0,
                    "item_level_discount_amount": 0
                },
                {..}
            ],
            "line_item_discounts": [],
            "taxes": [],
            "line_item_taxes": [],
            "currency_code": "USD"
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote-id}/extend_expiry_date

    Method

    valid_till[]
    required, timestamp(UTC) in seconds
    Quote will be valid till this date. After this date quote will be marked as closed.
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription
    quoted_charge quoted_charge
    optional
    Resource object representing quoted_charge

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x
    Delete an existing quote using this API.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/5/delete \
         -X POST  \
         -u {site_api_key}:
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/5/delete \
         -X POST  \
         -u {site_api_key}:

    Sample Response [ JSON ]

    Show more...
    {
        "quote": {
            "amount_due": 500,
            "amount_paid": 0,
            "billing_address": {
                "first_name": "John",
                "last_name": "Doe",
                "object": "billing_address",
                "validation_status": "not_validated"
            },
            "charge_on_acceptance": 500,
            "credits_applied": 0,
            "currency_code": "USD",
            "customer_id": "__test__KyVnHhSBWTMKSBP",
            "date": 1517501497,
            "id": "5",
            "line_item_discounts": [],
            "line_item_taxes": [],
            "line_items": [
                {
                    "amount": 500,
                    "customer_id": "__test__KyVnHhSBWTMKSBP",
                    "date_from": 1517501497,
                    "date_to": 1517501497,
                    "description": "Service Charge",
                    "discount_amount": 0,
                    "entity_type": "adhoc",
                    "id": "__test__KyVnHhSBWTMNIBY",
                    "is_taxed": false,
                    "item_level_discount_amount": 0,
                    "object": "line_item",
                    "pricing_model": "flat_fee",
                    "quantity": 1,
                    "tax_amount": 0,
                    "unit_amount": 500
                },
                {..}
            ],
            "object": "quote",
            "operation_type": "onetime_invoice",
            "price_type": "tax_exclusive",
            "resource_version": 1517501497000,
            "status": "open",
            "sub_total": 500,
            "taxes": [],
            "total": 500,
            "total_payable": 500,
            "updated_at": 1517501497,
            "valid_till": 1517596199,
            "version": 1
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote-id}/delete

    Method

    comment[]
    optional, string, max chars=300
    Reason for deleting quote. This comment will be added to the subscription entity if the quote belongs to a subscription or added to the customer entity if the quote is associated only with a customer.
    quote quote
    always returned
    Resource object representing quote
    quoted_subscription quoted_subscription
    optional
    Resource object representing quoted_subscription
    quoted_charge quoted_charge
    optional
    Resource object representing quoted_charge

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x
    Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes.

    Notes

    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/9/pdf \
         -X POST  \
         -u {site_api_key}:
    copy
    Click to Copy
    curl  https://{site}.chargebee.com/api/v2/quotes/9/pdf \
         -X POST  \
         -u {site_api_key}:

    Sample Response [ JSON ]

    Show more...
    {
        "download": {
            "download_url": "https://cb-local-downloads.s3.amazonaws.com/yourapp/quote/__test__KyVnHhSBWTNJvCQ.pdf?response-content-disposition=attachment%3Bfilename%3Dyourapp%2Fquote%2F__test__KyVnHhSBWTNJvCQ.pdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20200924T161144Z&X-Amz-SignedHeaders=host&X-Amz-Expires=59&X-Amz-Credential=AKIAJI4SN7ONHAOGLOGA%2F20200924%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=1f84cec770673dee4fab2bdfa55168a3b4010b0e3ba628a0dd42245e4ef64b29",
            "object": "download",
            "valid_till": 1600963964
        }
    }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote-id}/pdf

    Method

    consolidated_view[]
    optional, boolean, default=false
    When true, the quote PDF has summary of all charges on the quote. When false, the quote PDF has a detailed view of charges grouped by charge event. This parameter does not affect one-time quotes.
    disposition_type[]
    optional, enumerated string, default=attachment
    Determines the pdf should be rendered as inline or attachment in the browser.
    Possible values are
    attachmentPDF is rendered as attachment in the browserinlinePDF is rendered as inline in the browser
    attachmentPDF is rendered as attachment in the browserinlinePDF is rendered as inline in the browser
    Show all values[+]
    download download
    always returned
    Resource object representing download

    Sample admin console URL

    https://{site}.chargebee.com/admin-console/quotes/123x