Try in API Explorer
This is similar to the "Create an invoice for unbilled charges" API but no invoice will be created, only an estimate for this operation is created.
In the estimate response,
- estimate.invoice_estimates is an array of estimate.invoice_estimate. This has the details of the invoices that will be generated now.
Note:
- This API when invoked does not perform the actual operation. It just generates an estimate.
- Both subscription_id and customer_id parameters should not be given at the same time.
Sample Request
URL Format
POST https://[site].chargebee.com/api/v2/unbilled_charges/invoice_now_estimate
Input Parameters
optional, string, max chars=50
Identifier of the subscription for which this estimate needs to be created. Should be given if 'customer_id' is not specified.
optional, string, max chars=50
Identifier of the customer for whom this estimate is created. Is given if 'subscription_id' is not specified. Applicable only if the 'Consolidated Invoicing' is enabled. If 'Consolidated Invoicing' is not enabled, an invoice will be generated for every subscription.
Returns
estimateEstimate object
Resource object representing estimate