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

Create quote for a new subscription

Idempotency Supported

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.

Sample Request

URL Format

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

Input Parameters

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
optional, string, max chars=100

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 Enum Values
immediate

Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..

delayed

Subscription period will be aligned with the configured billing date at the next renewal.

coupon_ids
optional, string, max chars=100

Identifier of the coupon as a List. Coupon Codes can also be passed.

subscription[0..n]
Parameters for subscription
pass parameters as subscription[<param name>]
shipping_address[0..n]
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
contract_term[0..n]
Parameters for contract_term
pass parameters as contract_term[<param name>]
addons[0..n]
Parameters for addons. Multiple addons can be passed by specifying unique indices.
pass parameters as addons[<param name>][<idx:0..n>]
event_based_addons[0..n]
Parameters for event_based_addons. Multiple event_based_addons can be passed by specifying unique indices.
pass parameters as event_based_addons[<param name>][<idx:0..n>]

Returns

quoteQuote object
Resource object representing quote
quoted_subscriptionQuoted subscription object
Resource object representing quoted_subscription