younifyd
Menu

Upcoming Invoices Estimate

Upcoming invoices estimate

GET/customers/{customer-id}/upcoming_invoices_estimate

Use it in a workflow

  1. Add a step and choose the Chargebee connector.
  2. Pick the Upcoming Invoices Estimate action (under Chargebee API).
  3. Fill in the fields below, then reference the result from later steps as {{upcomingInvoicesEstimate.response.data}}.

Request

Path parameters

customer-idstringrequired

Query parameters

include_usage_chargesboolean

<p class="mb-2">When 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">true</code>, 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">invoice_estimates[]</code> returned in the response includes usage-based line items, if any. These are <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_estimates[].line_items[]</code> where <a href="/docs/api/estimates/estimate-object#invoice_estimate_line_items_metered" class="text-blue-600 hover:text-blue-800 underline"><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_items[].metered</code></a> 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">true</code>.</p> <div class="alert alert-info"><p class="mb-2"><p><strong class="font-semibold">See also:</strong></p> <a href="https://www.chargebee.com/docs/billing/2.0/usage-based-billing/link-pricing" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Pricing for usage-based line items</a>.</p></div>

Default false

Headers

chargebee-request-origin-devicestring

The 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-ipstring

The IP address of the customer where the request originated

chargebee-business-entity-idstring

If 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.

Response

Returns 200 with an object. Read it in later steps with {{upcomingInvoicesEstimate.response.data.<field>}}.

estimateobject

During 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)required

The time at which this estimate got generated

subscription_estimateobject9 fields

Represents the subscription details when the 'estimate' operations are invoked.

subscription_estimatesarray<object>9 fields

Is 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 fields

Represents the preview of the invoice generated immediately when the 'estimate' operations are invoked.

invoice_estimatesarray<object>18 fields

Is 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 fields

Represents the preview of the invoice generated at term end when the 'estimate' operations are invoked.

credit_note_estimatesarray<object>16 fields

Represents the preview of the credit-notes generated during 'estimate' operation. Currently applicable only for the 'Update Subscription Estimate' operation.

unbilled_charge_estimatesarray<object>25 fields

Represents the preview of the unbilled charges generated during 'estimate' operation. Currently not applicable for the 'Subscription renewal estimate' operation.

json
{
  "estimate": null
}

Need more? See the Chargebee guide for connection setup and behaviour shared by every action.