POST /subscriptions/{subscription-id}/import_unbilled_charges

Imports unbilled charges into Chargebee.

Servers

Path parameters

Name Type Required Description
subscription-id String Yes

Request headers

Name Type Required Description
chargebee-request-origin-device String No

The device from which the customer has made the request

Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

chargebee-event-webhook String No

skip only webhooks

Possible values:

  • "all-disabled"
chargebee-business-entity-id String No

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.

chargebee-event-actions String No

skip all actions to be done on the events

Possible values:

  • "all-disabled"
chargebee-request-origin-user String No

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-ip String No

The IP address of the customer where the request originated

chargebee-request-origin-user-encoded String No

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-event-email String No

skip only emails

Possible values:

  • "all-disabled"

Request body fields

Name Type Required Description
unbilled_charges Object No

Parameters for unbilled_charges

unbilled_charges.description[] Array No

Detailed description about this charge.

unbilled_charges.date_to[] Array Yes

End date of this charge.

unbilled_charges.quantity[] Array No

Quantity of the item which is represented by this charge.

unbilled_charges.quantity_in_decimal[] Array No

The decimal representation of the quantity of this entity. Returned when the entity is quantity-based and multi-decimal pricing is enabled.

unbilled_charges.use_for_proration[] Array No

If the unbilled charge falls within the subscription's current term it will be used for proration.

unbilled_charges.entity_type[] Array Yes
unbilled_charges.unit_amount_in_decimal[] Array No

The decimal representation of the amount for the charge, in major units of the currency. Typically equals to unit_amount_in_decimal x quantity_in_decimal. Returned when multi-decimal pricing is enabled.

unbilled_charges.id[] Array No

Uniquely identifies an unbilled charge.

unbilled_charges.unit_amount[] Array No

Unit amount of the charge item.

unbilled_charges.date_from[] Array Yes

Start date of this charge.

unbilled_charges.amount_in_decimal[] Array No

The decimal representation of the unit amount for the entity. The value is in major units of the currency. Returned when the entity is quantity-based and multi-decimal pricing is enabled.

unbilled_charges.entity_id[] Array No

The identifier of the modelled entity this charge is based on. Will be null for 'adhoc' entity type.

unbilled_charges.amount[] Array No

Total amount of this charge. Typically equals to unit amount x quantity.

unbilled_charges.discount_amount[] Array No

Total discounts for this charge.

unbilled_charges.is_advance_charge[] Array No

The value of this parameter will be true if it is a recurring unbilled charge for a future term.

discounts Object No

Parameters for discounts

discounts.description[] Array No

Description for this deduction.

discounts.entity_id[] Array No

When the deduction is due to a coupon, then this is the id of the coupon. Is required when discounts[entity_type] is item_level_coupon or document_level_coupon.

discounts.amount[] Array Yes

The amount deducted. The format of this value depends on the kind of currency.

discounts.entity_type[] Array No
discounts.unbilled_charge_id[] Array No

Uniquely identifies an unbilled charge.

tiers Object No

Parameters for tiers

tiers.unit_amount[] Array No

The price of the tier if the charge model is a stairtstep pricing , or the price of each unit in the tier if the charge model is tiered/volume pricing.

tiers.starting_unit_in_decimal[] Array No

The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the line_items.pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.

tiers.ending_unit[] Array No

The upper limit of a range of units for the tier

tiers.quantity_used_in_decimal[] Array No

The decimal representation of the quantity purchased from this tier. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.

tiers.starting_unit[] Array No

The lower limit of a range of units for the tier

tiers.ending_unit_in_decimal[] Array No

The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the line_items.pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.

tiers.unit_amount_in_decimal[] Array No

The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for line_item. The value is in major units of the currency. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.

tiers.unbilled_charge_id[] Array Yes

Uniquely identifies an unbilled charge.

tiers.quantity_used[] Array No

The number of units purchased in a range.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.