POST /items/{item-id}/attached_items
Creates an attached addon or a charge item for a plan.
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
item-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 Valid values:
|
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 Valid values:
|
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 Valid values:
|
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
charge_on_event |
String | No |
Indicates when the item is charged. This parameter only applies to charge-items. * contract_termination -when a contract term is terminated . * subscription_creation -the time of creation of the subscription. * subscription_trial_start -the time when the trial period of the subscription begins. * on_demand -Item can be charged on demand * plan_activation -same as subscription activation, but also includes the case when the plan-item of the subscription is changed. * subscription_activation -the moment a subscription enters an Valid values:
|
charge_once |
Boolean | No |
Indicates if the charge-item is to be charged only once or each time the |
quantity |
Integer | No |
The default quantity of the addon to be attached when the quantity is not specified while creating /updating the subscription. |
quantity_in_decimal |
String | No |
The decimal representation of the quantity of the addon. Returned for quantity-based addons when multi-decimal pricing is enabled. |
type |
String | No |
The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. * recommended -The addon is recommended to go with the plan-item when using Checkout or Portal . * optional -The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a The addon is attached automatically to the subscription for the plan-item unless explicitly removed via API. Valid values:
|
business_entity_id |
String | No |
The unique ID of the business entity for this Note: An alternative way of passing this parameter is by using a custom HTTP header or query string parameter. |
item_id |
String | Yes |
The id of the addon or charge that is being attached to the plan-item. |
billing_cycles |
Integer | No |
The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires addon billing cycles to be enabled for the site. The value set explicitly for |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.