Generates an estimate for the 'create subscription' operation. This is similar to the Create Subscription API but no subscription will be created, only an estimate for this operation is created.
In the response,
-
estimate.subscription_estimate has the subscription details like the status of the subscription (in_trial, active, etc.), next billing date, and so on.
-
estimate.invoice_estimate has details of the invoice that will be generated immediately. This will not be present if no immediate invoice is generated for this operation.
estimate.next_invoice_estimate has details of the invoice that will be generated on the next billing date of this subscription. This will be present only if no immediate invoice is generated during this operation and this subscription has next billing.
If the subscription is created in trial/future states, estimate.invoice_estimate will not be present as no immediate invoice would be generated. However, estimate.next_invoice_estimate will be returned which is a preview of the invoice that would be generated at a later date when the subscription becomes 'active'.
- estimate.unbilled_charge_estimates has details of the unbilled charges. This is returned only if invoice_immediately is set as false. But this is not applicable for the 'Subscription renewal estimate' operation.
Tip
Set the customer[taxability]
attribute as true
and provide any other necessary parameters to compute taxes. Otherwise tax is exempted for the estimate.
Related Tutorial
Sample Request
URL Format
Input Parameters
Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.
List of addons IDs that are mandatory to the plan and has 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.
shipping_address[<param name>]customer[<param name>][<idx:0..n>]addons[<param name>][<idx:0..n>]event_based_addons[<param name>][<idx:0..n>]