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

Create subscription for a customer estimate

Create a subscription for the existing estimate of a customer.

Sample Request

URL Format

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

Input Parameters

use_existing_balances
optional, boolean, default=true

The generated invoice_estimate/next_invoice_estimate will include all the balances - Promotional Credits, Refundable Credits, and Excess Payments - if any. If you don't want these balances to be included you can specify 'false' for the parameter use_existing_balances .

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.

.

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, array

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
delayed
invoice_date
optional, integer

The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. taxes and line_item_taxes are computed based on the tax configuration as of this date. The date should not be 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.

coupon_ids
optional, array

List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.

subscription
optional, object

Parameters for subscription

shipping_address
optional, object

Parameters for shipping_address

contract_term
optional, object

Parameters for contract_term

addons
optional, object

Parameters for addons

event_based_addons
optional, object

Parameters for event_based_addons

Returns

estimateEstimate object
Resource object representing estimate