POST /subscriptions/{subscription-id}/update_for_items
Note:
- This endpoint optionally supports 3DS. To use it, create a
payment_intent
and provide it via this endpoint. - When the Remove mandatory add-ons from old plan during subscription plan update setting is enabled on your Chargebee site, all mandatory addons with the old plan will be automatically removed during the subscription update to a new plan.
Caution
If the subscription currently includes ramps, it's important to note that any ramps scheduled may move to the draft status due to changes in plan billing frequency, line item, or term end. Carefully review your ramp configurations and the details of the subscription update to prevent any unintended disruptions to the subscription.
Updates the specified subscription by setting the parameters passed. Any parameters not provided are left unmodified. If an invoice is generated for this operation, any available credits and excess payments for the customer are automatically applied.
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
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:
|
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:
|
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-event-email |
String | No |
skip only emails Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
discounts |
Object | No |
Parameters for discounts |
discounts.apply_on[] |
Array | No | |
discounts.included_in_mrr[] |
Array | No |
The discount is included in MRR calculations for your site. This attribute is only applicable when |
discounts.id[] |
Array | No |
The |
discounts.period_unit[] |
Array | No | |
discounts.operation_type[] |
Array | Yes | |
discounts.percentage[] |
Array | No |
The percentage of the original amount that should be deducted from it. |
discounts.period[] |
Array | No |
The duration of time for which the discount is attached to the subscription, in |
discounts.amount[] |
Array | No |
The value of the discount. The format of this value depends on the kind of currency. |
discounts.duration_type[] |
Array | Yes | |
discounts.item_price_id[] |
Array | No |
The id of the item price in the subscription to which the discount is to be applied. Relevant only when |
end_of_term |
Boolean | No |
Caution This parameter is unavailable when the Subscription Ramps feature is enabled; use Create a ramp API instead. Set this to true if you want the update to be applied at the end of the current subscription billing cycle. Default value: false |
force_term_reset |
Boolean | No |
Say the subscription has the renewal date as 28th of every month. When the plan-item price of the subscription is set to one that has the same billing period as the current plan-item price, the subscription change does not change the term. In other words, the subscription still renews on the 28th. Passing this parameter as Default value: false |
invoice_notes |
String | No |
A customer-facing note added to all invoices associated with this subscription. This note is one among all the notes displayed on the invoice PDF. |
payment_method |
Object | No |
Parameters for payment_method |
payment_method.gateway_account_id |
String | No |
The gateway account in which this payment source is stored. |
payment_method.type |
String | No |
The type of payment method. For more details refer Update payment method for a customer API under Customer resource. * google_pay - Payments made via Google Pay. * sofort - Payments made via Sofort. * netbanking_emandates - Netbanking (eMandates) Payments. * apple_pay - Payments made via Apple Pay. * unionpay - Payments made via UnionPay. * giropay - Payments made via giropay. * direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. * bancontact - Payments made via Bancontact Card. * upi - UPI Payments. * alipay - Payments made via Alipay. Possible values:
|
payment_method.tmp_token |
String | No |
Single-use tokens created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details. |
payment_method.issuing_country |
String | No |
ISO 3166 alpha-2 country code. Note : If you enter an invalid country code, the system will return an error. If you have enabled EU VAT in 2021 or have manually
enabled the Brexit configuration, then |
payment_method.additional_information |
Object | No |
* `checkout_com`: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). * `payer`: User related information. * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes). * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. * `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. * `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device. * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. * `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. * `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device. * `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted. * `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. * `payer`: User related information. * `document`: Document is the user's identification number based on their country. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device |
payment_method.reference_id |
String | No |
The reference id. In the case of Amazon and PayPal this will be the billing agreement id . For GoCardless direct debit this will be 'mandate id'. In the case of card this will be the identifier provided by the gateway/card vault for the specific payment method resource. Note: This is not the one-time temporary token provided by gateways like Stripe. |
override_relationship |
Boolean | No |
If |
subscription_items |
Object | No |
Parameters for subscription_items |
subscription_items.unit_price[] |
Array | No |
The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the |
subscription_items.charge_once[] |
Array | No |
Indicates if the charge-item is to be charged only once or each time the |
subscription_items.unit_price_in_decimal[] |
Array | No |
When price overriding is enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled. If |
subscription_items.item_price_id[] |
Array | Yes |
The unique identifier of the item price. |
subscription_items.quantity[] |
Array | No |
The quantity of the item purchased |
subscription_items.quantity_in_decimal[] |
Array | No |
The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled. |
subscription_items.billing_cycles[] |
Array | No |
For the plan-item price: For addon-item prices: |
subscription_items.charge_on_event[] |
Array | No | |
subscription_items.charge_on_option[] |
Array | No | |
subscription_items.proration_type[] |
Array | No | |
subscription_items.service_period_days[] |
Array | No |
The service period of the item in days from the day of charge. |
subscription_items.trial_end[] |
Array | No |
The date/time when the trial period of the item ends. Applies to plan-items and----when enabled----addon-items as well. |
subscription_items.usage_accumulation_reset_frequency[] |
Array | No | |
coupon_ids[] |
Array | No |
List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes. If |
prorate |
Boolean | No |
Caveat For further changes within the same billing term, when An immediate previous change was made
|
invoice_immediately |
Boolean | No |
If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to unbilled charges. The default value is as per the site settings. |
billing_override |
Object | No |
Specify limits on how credits and payments are applied to individual invoices for the subscription. Contact [Support](https://support.chargebee.com/) to enable this feature. Note: These limits do not apply to [consolidated invoices](https://www.chargebee.com/docs/2.0/consolidated-invoicing.html). |
billing_override.max_excess_payment_usage |
Integer | No |
Maximum amount of excess payments that can be applied to any single invoice associated with this subscription. Set to |
billing_override.max_refundable_credits_usage |
Integer | No |
Maximum amount of refundable credits that can be applied to any single invoice associated with this subscription. Set to |
net_term_days |
Integer | No |
Updates Net D for the subscription. Net D is the number of days within which any invoice raised for the subscription must be paid.
|
start_date |
Integer | No |
The new start date of a |
free_period |
Integer | No |
The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit. |
changes_scheduled_at |
Integer | No |
Caution This parameter cannot be set to a future date when the Subscription Ramps feature is enabled; use Create a ramp API instead.
When
. |
auto_collection |
String | No |
Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. * on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. * off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. Possible values:
|
replace_coupon_list |
Boolean | No |
If Default value: false |
reactivate_from |
Integer | No |
If the subscription
|
reactivate |
Boolean | No |
When the |
statement_descriptor |
Object | No |
Parameters for statement_descriptor |
statement_descriptor.descriptor |
String | No |
Payment transaction descriptor text to help your customer easily recognize the transaction. When this value is passed this will override the transaction descriptor text configured in the Chargebee site for all the subscription renewal transactions. |
contract_term |
Object | No |
Parameters for contract_term |
contract_term.action_at_term_end |
String | No |
Action to be taken when the contract term completes. * renew_once - Used when you want to renew the contract term just once. Does the following:
Possible values:
Default value: "renew" |
contract_term.cancellation_cutoff_period |
Integer | No |
The number of days before |
free_period_unit |
String | No |
The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the period_unit attribute of the plan chosen. * week - Charge based on week(s) * month - Charge based on month(s) * day - Charge based on day(s) * year - Charge based on year(s) Possible values:
|
billing_address |
Object | No |
Parameters for billing_address |
billing_address.first_name |
String | No |
The first name of the billing contact. |
billing_address.state |
String | No |
The state/province name. Is set by Chargebee automatically for US, Canada and India If |
billing_address.city |
String | No |
The name of the city. |
billing_address.validation_status |
String | No |
The address verification status. * valid - Address was validated successfully. * partially_valid - The address is valid for taxability but has not been validated for shipping. * invalid - Address is invalid. * not_validated - Address is not yet validated. Possible values:
Default value: "not_validated" |
billing_address.line2 |
String | No |
Address line 2 |
billing_address.line1 |
String | No |
Address line 1 |
billing_address.email |
String | No |
The email address. |
billing_address.last_name |
String | No |
The last name of the billing contact. |
billing_address.company |
String | No |
The company name. |
billing_address.line3 |
String | No |
Address line 3 |
billing_address.state_code |
String | No |
The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set |
billing_address.zip |
String | No |
Zip or postal code. The number of characters is validated according to the rules specified here. |
billing_address.phone |
String | No |
The phone number. |
billing_address.country |
String | No |
The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code. If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then |
payment_initiator |
String | No |
The type of initiator to be used for the payment request triggered by this operation. * customer - Pass this value to indicate that the request is initiated by the customer * merchant - Pass this value to indicate that the request is initiated by the merchant Possible values:
|
shipping_address |
Object | No |
Parameters for shipping_address |
shipping_address.first_name |
String | No |
The first name of the contact. |
shipping_address.state |
String | No |
The state/province name. Is set by Chargebee automatically for US, Canada and India If |
shipping_address.city |
String | No |
The name of the city. |
shipping_address.validation_status |
String | No |
The address verification status. * not_validated - Address is not yet validated. * valid - Address was validated successfully. * partially_valid - The address is valid for taxability but has not been validated for shipping. * invalid - Address is invalid. Possible values:
Default value: "not_validated" |
shipping_address.line2 |
String | No |
Address line 2 |
shipping_address.line1 |
String | No |
Address line 1 |
shipping_address.email |
String | No |
The email address. |
shipping_address.last_name |
String | No |
The last name of the contact. |
shipping_address.company |
String | No |
The company name. |
shipping_address.line3 |
String | No |
Address line 3 |
shipping_address.state_code |
String | No |
The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set |
shipping_address.zip |
String | No |
Zip or postal code. The number of characters is validated according to the rules specified here. |
shipping_address.phone |
String | No |
The phone number. |
shipping_address.country |
String | No |
The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code. Note : If you enter an invalid country code, the system will return an error. Brexit If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then |
token_id |
String | No |
The Chargebee payment token generated by Chargebee JS. |
po_number |
String | No |
Purchase order number for this subscription. |
meta_data |
Object | No |
A collection of key-value pairs that provides extra information about the subscription. **Note:** There's a character limit of 65,535. [Learn more](advanced-features#metadata). |
payment_intent |
Object | No |
Parameters for payment_intent |
payment_intent.id |
String | No |
Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. |
payment_intent.gateway_account_id |
String | No |
The gateway account used for performing the 3DS flow. |
payment_intent.payment_method_type |
String | No |
The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. * card - card * dotpay - dotpay * faster_payments - Faster Payments * upi - upi * google_pay - google_pay * paypal_express_checkout - paypal_express_checkout * klarna_pay_now - Klarna Pay Now * ideal - ideal * boleto - boleto * direct_debit - direct_debit * sepa_instant_transfer - Sepa Instant Transfer * bancontact - bancontact * venmo - Venmo * pay_to - PayTo * netbanking_emandates - netbanking_emandates * apple_pay - apple_pay * online_banking_poland - Online Banking Poland * giropay - giropay * sofort - sofort * amazon_payments - Amazon Payments Possible values:
|
payment_intent.additional_information |
Object | No |
* `checkout_com`: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). * `payer`: User related information. * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes). * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. * `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. * `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device. * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. * `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. * `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device. * `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted. * `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. * `payer`: User related information. * `document`: Document is the user's identification number based on their country. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device |
payment_intent.gw_token |
String | No |
Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer 3DS implementation in Chargebee to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. |
payment_intent.reference_id |
String | No |
Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. |
terms_to_charge |
Integer | No |
The number of subscription billing cycles to invoice in advance. If a new term is started for the subscription due to this API call, then |
mandatory_items_to_remove[] |
Array | No |
A list of item IDs representing the mandatorily attached addons associated with the plan to which the subscription is being updated. These addons will be removed from the subscription during the subscription update process. |
trial_end_action |
String | No |
Applicable only when End-of-trial Action has been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends. * activate_subscription - The subscription activates and charges are raised for non-metered items. * cancel_subscription - The subscription cancels. * plan_default - The action configured for the site at the time when the trial ends, takes effect. * site_default - This is the default value. The action configured for the site at the time when the trial ends, takes effect. Possible values:
|
card |
Object | No |
Parameters for card |
card.billing_addr2 |
String | No |
Address line 2, as available in card billing address. |
card.billing_addr1 |
String | No |
Address line 1, as available in card billing address. |
card.number |
String | No |
The credit card number without any format. If you are using Braintree.js, you can specify the Braintree encrypted card number here. |
card.first_name |
String | No |
Cardholder's first name |
card.expiry_month |
Integer | No |
Card expiry month. |
card.additional_information |
Object | No |
* `checkout_com`: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). * `payer`: User related information. * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes). * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. * `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. * `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device. * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. * `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. * `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device. * `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted. * `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. * `payer`: User related information. * `document`: Document is the user's identification number based on their country. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device |
card.last_name |
String | No |
Cardholder's last name |
card.gateway_account_id |
String | No |
The gateway account in which this payment source is stored. |
card.billing_state_code |
String | No |
The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set |
card.billing_zip |
String | No |
Postal or Zip code, as available in card billing address. |
card.expiry_year |
Integer | No |
Card expiry year. |
card.cvv |
String | No |
The card verification value (CVV). If you are using Braintree.js, you can specify the Braintree encrypted CVV here. |
card.billing_city |
String | No |
City, as available in card billing address. |
card.billing_state |
String | No |
The state/province name. Is set by Chargebee automatically for US, Canada and India If |
card.preferred_scheme |
String | No |
The customer's preferred card scheme for co-branded cards. Possible values:
|
card.billing_country |
String | No |
The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code. Note : If you enter an invalid country code, the system will return an error. Brexit If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then |
replace_items_list |
Boolean | No |
If Default value: false |
auto_close_invoices |
Boolean | No |
Set to |
billing_cycles |
Integer | No |
Billing cycles set for plan-item price is used by default. |
invoice_usages |
Boolean | No |
Setting this attribute to Default value: false |
offline_payment_method |
String | No |
The preferred offline payment method for the subscription. * sepa_credit - SEPA Credit * cash - Cash * no_preference - No Preference * bank_transfer - Bank Transfer * check - Check * eu_automated_bank_transfer - EU Automated Bank Transfer * jp_automated_bank_transfer - JP Automated Bank Transfer * uk_automated_bank_transfer - UK Automated Bank Transfer * custom - Custom * boleto - Boleto * mx_automated_bank_transfer - MX Automated Bank Transfer * us_automated_bank_transfer - US Automated Bank Transfer * ach_credit - ACH Credit Possible values:
|
create_pending_invoices |
Boolean | No |
Indicates whether the invoices for this subscription are generated with a You can also set this to
Applicable only when Metered Billing is enabled for the site . |
customer |
Object | No |
Parameters for customer |
customer.vat_number_prefix |
String | No |
An overridden value for the first two characters of the full VAT
number. Only applicable specifically for customers with billing_address When you have enabled EU VAT in 2021 or have manually
enabled the Brexit configuration, you have the option of setting billing_address |
customer.entity_identifier_standard |
String | No |
The standard used for specifying the If there are additional entity identifiers for the customer not associated with the Default value: "iso6523-actorid-upis" |
customer.entity_identifier_scheme |
String | No |
The Peppol BIS scheme associated with the vat_number of the customer. This helps identify the specific type of customer entity. For example, If there are additional entity identifiers for the customer not associated with the |
customer.vat_number |
String | No |
The VAT/tax registration number for the customer. For customers with billing_address |
customer.is_einvoice_enabled |
Boolean | No |
Determines whether the customer is e-invoiced. When set to It is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled. |
customer.einvoicing_method |
String | No |
Determines whether to send einvoice manually or automatic. * automatic - Use this value to send e-invoice every time an invoice or credit note is created. * manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. * site_default - The default value of the site which can be overridden at the customer level. Possible values:
|
customer.business_customer_without_vat_number |
Boolean | No |
Confirms that a customer is a valid business without an EU/UK VAT number. |
customer.registered_for_gst |
Boolean | No |
Confirms that a customer is registered under GST. If set to |
billing_alignment_mode |
String | No |
Override the billing alignment mode chosen for the site for calendar billing. Only applicable when using calendar billing. * immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. * delayed - Subscription period will be aligned with the configured billing date at the next renewal. Possible values:
|
item_tiers |
Object | No |
Parameters for item_tiers |
item_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 |
item_tiers.price_in_decimal[] |
Array | No |
The decimal representation of the per-unit price for the tier when the |
item_tiers.package_size[] |
Array | No |
Package size for the tier when pricing type is |
item_tiers.price[] |
Array | No |
The overridden price of the tier. The value depends on the type of currency. |
item_tiers.ending_unit[] |
Array | No |
The highest value in the quantity tier. |
item_tiers.item_price_id[] |
Array | No |
The id of the item price for which the tier price is being overridden. |
item_tiers.pricing_type[] |
Array | No | |
item_tiers.starting_unit[] |
Array | No |
The lowest value in the quantity tier. |
item_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 |
invoice_date |
Integer | No |
The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if
|
trial_end |
Integer | No |
The time at which the trial has ended or will end for the subscription. Set it to
|
contract_term_billing_cycle_on_renewal |
Integer | No |
Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as |
change_option |
String | No |
Specifies the effective date for the subscription change. * end_of_term - The change is carried out at the end of the current billing cycle of the subscription. * specific_date - Executes the change on a specified date. The change occurs as of the date/time defined in The Possible values:
|
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.