Menu
Estimate For Creating A Subscription
Estimate for creating a subscription
/customers/{customer-id}/create_subscription_for_items_estimateUse it in a workflow
- Add a step and choose the Chargebee connector.
- Pick the Estimate For Creating A Subscription action (under Chargebee API).
- Fill in the fields below, then reference the result from later steps as
{{estimateForCreatingASubscription.response.data}}.
Request
Path parameters
customer-idstringrequiredHeaders
chargebee-request-origin-devicestringThe device from which the customer has made the request
chargebee-request-origin-userstring (email)The email address of your customer/user. Use this when the email address has only ASCII characters.
chargebee-request-origin-user-encodedstring (email)The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
chargebee-request-origin-ipstringThe IP address of the customer where the request originated
chargebee-event-actionsstringskip all actions to be done on the events
One ofall-disabled
chargebee-event-emailstringskip only emails
One ofall-disabled
chargebee-event-webhookstringskip only webhooks
One ofall-disabled
chargebee-business-entity-idstringIf the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
Request body
Enter the body as JSON in the step's Body field.
use_existing_balancesbooleanThe 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* .
Default true
invoice_immediatelyboolean<p class="mb-2">If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to <a href="https://www.chargebee.com/docs/unbilled-charges.html" target="_blank">unbilled charges</a>. The default value is as per the <a href="https://www.chargebee.com/docs/unbilled-charges.html#configuration" target="_blank">site settings</a> .</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note:</strong> <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">invoice_immediately</code> 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.</p></div> <p class="mb-2">.</p>
billing_cyclesinteger (int32)The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](/docs/api/item_prices/item_price-object#billing_cycles) is used.
mandatory_items_to_removearray<string>Item ids of [mandatorily attached addons](/docs/api/attached_items) that are to be removed from the subscription.
terms_to_chargeinteger (int32)The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html) .
billing_alignment_modestringOverride the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* 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.
One ofimmediatedelayed
invoice_dateinteger (unix-time)<p class="mb-2">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. <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">taxes</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_item_taxes</code> 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.</p>
coupon_idsarray<string>List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
subscriptionobjectParameters for subscription
idstringA unique and immutable identifier for the subscription. If not provided, it is autogenerated.
trial_endinteger (unix-time)<p class="mb-2">End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">start_date</code>. Set it to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">0</code> to have no trial period.</p>
start_dateinteger (unix-time)<p class="mb-2">The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Backdating is enabled for subscription creation operations.</li> <li class="text-base leading-relaxed">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.</li> <li class="text-base leading-relaxed">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, <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">start_date</code> cannot be earlier than 14th February.</li> </ul>
offline_payment_methodstringThe preferred offline payment method for the subscription. \* uk_automated_bank_transfer - UK Automated Bank Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* bank_transfer - Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* boleto - Boleto \* no_preference - No Preference \* sepa_credit - SEPA Credit \* mx_automated_bank_transfer - MX Automated Bank Transfer \* ach_credit - ACH Credit \* custom - Custom \* eu_automated_bank_transfer - EU Automated Bank Transfer \* cash - Cash \* check - Check
One ofno_preferencecashcheckbank_transferach_creditsepa_creditboletous_automated_bank_transfereu_automated_bank_transferuk_automated_bank_transferjp_automated_bank_transfermx_automated_bank_transfercustom
free_periodinteger (int32)The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit.
free_period_unitstringThe unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/v2/pcv-1/plans/create-a-plan#period_unit) attribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id) chosen. \* year - Charge based on year(s) \* day - Charge based on day(s) \* month - Charge based on month(s) \* week - Charge based on week(s)
One ofdayweekmonthyear
contract_term_billing_cycle_on_renewalinteger (int32)<p class="mb-2">Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_cycles</code> or a custom value depending on the <a href="https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms" target="_blank" rel="noopener noreferrer">site configuration</a> .</p>
trial_end_actionstringApplicable only when [End-of-trial Action](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* cancel_subscription - The subscription cancels. \* plan_default - The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. \* site_default - This is the default value. The action [configured for the site](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect.
One ofsite_defaultplan_defaultactivate_subscriptioncancel_subscription
shipping_addressobjectParameters for shipping_address
line1stringAddress line 1
line2stringAddress line 2
line3stringAddress line 3
citystringThe name of the city.
state_codestring<p class="mb-2">The <a href="https://www.iso.org/obp/ui/#search/code" target="_blank">ISO 3166-2 state/province code</a> without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">state_code</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">AZ</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">US-AZ</code> ). For Tamil Nadu (India), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">TN</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">IN-TN</code> ). For British Columbia (Canada), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">BC</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">CA-BC</code> ).</p>
zipstringZip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address) .
countrystring<p class="mb-2">The billing address country of the customer. Must be one of <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank" rel="noopener noreferrer">ISO 3166 alpha-2 country code</a> .</p> <p class="mb-2"><strong class="font-semibold">Note</strong>: If you enter an invalid country code, the system will return an error.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Brexit</strong></p><p class="mb-2">If you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank" rel="noopener noreferrer">EU VAT</a> in 2021 or later, or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank" rel="noopener noreferrer">manually enable</a> the Brexit configuration, then <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> (the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong>) is available as an option.</p></div>
validation_statusstringThe address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully.
One ofnot_validatedvalidpartially_validinvalidDefault "not_validated"
billing_addressobjectParameters for billing_address
line1stringAddress line 1
line2stringAddress line 2
line3stringAddress line 3
citystringThe name of the city.
state_codestring<p class="mb-2">The <a href="https://www.iso.org/obp/ui/#search/code" target="_blank">ISO 3166-2 state/province code</a> without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">state_code</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">AZ</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">US-AZ</code> ). For Tamil Nadu (India), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">TN</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">IN-TN</code> ). For British Columbia (Canada), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">BC</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">CA-BC</code> ).</p>
zipstringZip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address) .
countrystring<p class="mb-2">The billing address country of the customer. Must be one of <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank" rel="noopener noreferrer">ISO 3166 alpha-2 country code</a> .</p> <p class="mb-2"><strong class="font-semibold">Note</strong>: If you enter an invalid country code, the system will return an error.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Brexit</strong></p><p class="mb-2">If you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank" rel="noopener noreferrer">EU VAT</a> in 2021 or later, or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank" rel="noopener noreferrer">manually enable</a> the Brexit configuration, then <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> (the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong>) is available as an option.</p></div>
validation_statusstringThe address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated.
One ofnot_validatedvalidpartially_validinvalidDefault "not_validated"
contract_termobjectParameters for contract_term
action_at_term_endstring<p class="mb-2">Action to be taken when the contract term completes.</p> * evergreen - <p class="mb-2">Contract term completes and the subscription renews.</p> * renew - <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Contract term completes and a new contract term is started for the number of billing cycles specified in <a href="/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">contract_billing_cycle_on_renewal</code></a>.</li> <li class="text-base leading-relaxed">The <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">action_at_term_end</code> for the new contract term is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">renew</code>.</li> </ul> * cancel - <p class="mb-2">Contract term completes and subscription is canceled.</p>
One ofrenewevergreencancel
cancellation_cutoff_periodinteger (int32)<p class="mb-2">The number of days before <a href="/docs/api/contract_terms/contract_term-object#contract_end"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">contract_end</code></a> , 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.</p>
Default 0
billing_overrideobjectParameters for billing_override
max_excess_payment_usageinteger (int64)<p class="mb-2">Maximum amount of <a href="/docs/api/customers/customer-object#excess_payments">excess payments</a> that can be applied to any single invoice associated with this subscription. Set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">-1</code> to auto-apply without limit, <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">0</code> to prevent auto-application, or any positive value to define the maximum amount that can be applied.</p>
max_refundable_credits_usageinteger (int64)<p class="mb-2">Maximum amount of <a href="/docs/api/customers/customer-object#refundable_credits">refundable credits</a> that can be applied to any single invoice associated with this subscription. Set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">-1</code> to auto-apply without limit, <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">0</code> to prevent auto-application, or any positive value to define the maximum amount that can be applied.</p>
subscription_itemsobjectParameters for subscription_items
item_price_idarray<string>requiredThe unique identifier of the item price.
quantityarray<integer (int32)>The quantity of the item purchased
quantity_in_decimalarray<string>The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](/docs/api/getting-started) is enabled.
unit_pricearray<integer (int64)><p class="mb-2">The price/per unit price of the item. When not provided, <a href="/docs/api/item_prices/item-price-object">the value set</a> for the item price is used. This is only applicable when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pricing_model</code> of the item price is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">flat_fee</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">per_unit</code>. Also, it is only allowed when <a href="https://www.chargebee.com/docs/price-override.html" target="_blank">price overriding</a> is enabled for the site. The value depends on the type of currency. If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">changes_scheduled_at</code> is in the past and a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">unit_price</code> is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.</p>
unit_price_in_decimalarray<string>When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](/docs/api/item_prices/item_price-object#price) 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](/docs/api/getting-started) is enabled.
billing_cyclesarray<integer (int32)>For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then [the value set](/docs/api/item_prices/item-price-object) for the plan-item price is used. For addon-item prices: If [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) are enabled then this is the number of subscription billing cycles for which the addon is included. If not provided, then [the value set under attached addons](/docs/api/attached_items/attached-item-object) is used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object) is used.
trial_endarray<integer (unix-time)>The date/time when the trial period of the item ends. Applies to plan-items and--when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html) --addon-items as well.
service_period_daysarray<integer (int32)>The service period of the item in days from the day of charge.
charge_on_eventarray<string>charge_oncearray<boolean><p class="mb-2">Indicates if the charge-item is to be charged only once or each time the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">charge_on_event</code> occurs. This parameter only applies to charge-items.</p>
charge_on_optionarray<string>discountsobjectParameters for discounts
apply_onarray<string>duration_typearray<string>requiredpercentagearray<number (double)>The percentage of the original amount that should be deducted from it.
amountarray<integer (int64)>The value of the discount. [The format of this value](/docs/api/currencies) depends on the kind of currency.
periodarray<integer (int32)><p class="mb-2">The duration of time for which the discount is attached to the subscription, in <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">period_units</code>. Applicable only when <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">duration_type</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">limited_period</code>.</p> <span featureId="cb-discounts" isMicro="true"></span>
period_unitarray<string>included_in_mrrarray<boolean><p class="mb-2">The discount is included in MRR calculations for your site. This attribute is only applicable when <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">duration_type</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">one_time</code> and when the <a href="https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation" target="_blank">feature is enabled</a> in Chargebee. Also, If the <a href="https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation" target="_blank">site-level setting</a> is to exclude one-time discounts from MRR calculations, this value is always returned <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">false</code>.</p> <span featureId="cb-discounts" isMicro="true"></span>
item_price_idarray<string><p class="mb-2">The <a href="/docs/api/subscriptions/subscription-object#subscription_items_item_price_id">id of the item price</a> in the subscription to which the discount is to be applied. Relevant only when <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">apply_on</code> = <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">specific_item_price</code>.</p> <span featureId="cb-discounts" isMicro="true"></span>
quantityarray<integer (int32)>Specifies the number of free units provided for the item, without affecting the total quantity sold
item_tiersobjectParameters for item_tiers
item_price_idarray<string>The id of the item price for which the tier price is being overridden.
starting_unitarray<integer (int32)>The lowest value in the quantity tier.
ending_unitarray<integer (int32)>The highest value in the quantity tier.
pricearray<integer (int64)>The overridden price of the tier. The value depends on the [type of currency](/docs/api/estimates) .
starting_unit_in_decimalarray<string><p class="mb-2">The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">ending_unit_in_decimal</code> of the next lower tier. Returned only when the pricing_model is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">tiered</code> , <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">volume</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">stairstep</code> and <a href="/docs/api/getting-started">multi-decimal pricing</a> is enabled.</p>
ending_unit_in_decimalarray<string><p class="mb-2">The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">starting_unit_in_decimal</code> of the next higher tier. Returned only when the pricing_model is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">tiered</code> , <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">volume</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">stairstep</code> and <a href="/docs/api/getting-started">multi-decimal pricing</a> is enabled.</p>
price_in_decimalarray<string><p class="mb-2">The decimal representation of the per-unit price for the tier when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pricing_model</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">tiered</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">volume</code>. When the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pricing_model</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">stairstep</code> , it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and <a href="/docs/api/getting-started">multi-decimal pricing</a> is enabled.</p>
pricing_typearray<string>package_sizearray<integer (int32)><p class="mb-2">Package size for the tier when pricing type is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">package</code>. Specify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.</p>
{
"use_existing_balances": null,
"invoice_immediately": null,
"billing_cycles": null,
"mandatory_items_to_remove": null,
"terms_to_charge": null,
"billing_alignment_mode": null,
"invoice_date": null,
"coupon_ids": null,
"subscription": null,
"shipping_address": null,
"billing_address": null,
"contract_term": null
}
Response
Returns 200 with an object. Read it in later steps with {{estimateForCreatingASubscription.response.data.<field>}}.
estimateobjectDuring the process of signing up customers to subscriptions, use the Estimates API to evaluate the details of the purchase before actually signing them up. The details returned by the API include the invoice amounts, next billing date and unbilled charges. For example, consider that you are creating a new subscription or update an existing one. Use the Estimates API before that to deduce the details such as the amount the customer would be charged, the state the subscription would be in after creation or updation, and so on. If you have configured the [Avalara integration](https://www.chargebee.com/docs/2.0/avalara.html), Chargebee retrieves the tax amount from Avalara for the invoice. This counts against your Avalara API limits.
created_atinteger (unix-time)requiredThe time at which this estimate got generated
subscription_estimateobject9 fieldsRepresents the subscription details when the 'estimate' operations are invoked.
subscription_estimatesarray<object>9 fieldsIs a list of estimated subscriptions i.e., an array of *subscription_estimate* objects. It is generated when 'Create an estimate for purchase' operation is invoked
invoice_estimateobject18 fieldsRepresents the preview of the invoice generated immediately when the 'estimate' operations are invoked.
invoice_estimatesarray<object>18 fieldsIs a list of estimated invoices i.e., an array of *invoice_estimate* objects. It is generated when 'Create an estimate for unbilled charges' operation is invoked
payment_schedule_estimatesarray<object>7 fields<p class="mb-2"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_schedule_estimate</code> is used to hold the details related to payment schedules for an invoice. It will contain a list of <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_schedules</code> resources.</p> <span featureId="cb-payment-schedules" isMicro="true"></span>
next_invoice_estimateobject18 fieldsRepresents the preview of the invoice generated at term end when the 'estimate' operations are invoked.
credit_note_estimatesarray<object>16 fieldsRepresents the preview of the credit-notes generated during 'estimate' operation. Currently applicable only for the 'Update Subscription Estimate' operation.
unbilled_charge_estimatesarray<object>25 fieldsRepresents the preview of the unbilled charges generated during 'estimate' operation. Currently not applicable for the 'Subscription renewal estimate' operation.
{
"estimate": null
}
Need more? See the Chargebee guide for connection setup and behaviour shared by every action.