younifyd
Menu

Subscription Change Term End Estimate

Subscription change term end estimate

POST/subscriptions/{subscription-id}/change_term_end_estimate

Use it in a workflow

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

Request

Path parameters

subscription-idstringrequired

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-event-actionsstring

skip all actions to be done on the events

One ofall-disabled

chargebee-event-emailstring

skip only emails

One ofall-disabled

chargebee-event-webhookstring

skip only webhooks

One ofall-disabled

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.

Request body

Enter the body as JSON in the step's Body field.

term_ends_atinteger (unix-time)required

The time at which the current term should end for this subscription.

prorateboolean

Applicable for *active* / *non_renewing* subscriptions. If specified as *true* prorated charges / credits will be added during this operation.

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>

json
{
  "term_ends_at": null,
  "prorate": null,
  "invoice_immediately": null
}

Response

Returns 200 with an object. Read it in later steps with {{subscriptionChangeTermEndEstimate.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.