Generates an estimate for creating a subscription when the customer does not exist in Chargebee. This estimate API can be called when the customer has not yet signed up and you want to preview how a new subscription would look like for them.
Note:
Estimate operations do not make any changes in Chargebee; hence this API does not create an actual customer
or subscription
record.
The response contains one or more of the following objects:
subscription_estimate: The subscription details like the status of the subscription (such asin_trialoractive), next billing date, and so on.invoice_estimate:The details of the immediate invoice, if there is one. If the subscription is created intrial/futurestates,invoice_estimateis unavailable as no immediate invoice is generated.next_invoice_estimate:This is returned when an immediate invoice is not generated. It contains the details of the invoice that will be generated on the next billing date of the subscription.unbilled_charge_estimates: This contains the details of charges that have not been invoiced. This is returned only if theinvoice_immediatelyparameter is set tofalse.
Sample Request
URL Format
Input Parameters
The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan-item price is used.
Item ids of mandatorily attached addons that are to be removed from the subscription.
The number of subscription billing cycles (including the first one) to invoice in advance .
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.
Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..
Subscription period will be aligned with the configured billing date at the next renewal.
List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
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.
.
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.
Indicates the Client profile id for the customer. This is applicable only if you use Chargebee's AvaTax for Communications integration.
Returns
Resource object representing estimate