POST /customers/{customer-id}/update_billing_info
Updates a customer's billing information, including billing address and tax-related details such as VAT number.
Note
See Related APIs for other customer attributes that can be updated.
Prerequisites & Constraints
In some cases, passing the following parameters can cause the request to fail: vat_number, business_customer_without_vat_number, tax_providers_fields, and registered_for_gst. See Implementation Notes for more details.
Impacts
Customer
For certain parameters, if you do not include a parameter in the request, Chargebee removes the corresponding attribute from the customer object. To retain an existing attribute, you must explicitly include its parameter in your request.
Parameters that are affected by this behavior
billing_address.first_namebilling_address.last_namebilling_address.phonebilling_address.emailbilling_address.line1billing_address.line2billing_address.line3billing_address.citybilling_address.statebilling_address.countrybilling_address.zipvat_numbervat_number_prefixbusiness_customer_without_vat_numberregistered_for_gst
Example
Assume the customer object has these attributes set:
Current attributes:
billing_address.first_namebilling_address.last_namebilling_address.phonebilling_address.emailvat_number
You make an API call with only the following parameters:
Request parameters:
billing_address.first_namebilling_address.last_namebilling_address.phone
Result: The billing_address.email and vat_number attributes are removed from the customer object because they weren't included in the request. To preserve these attributes, include them in the request.
Invoices
- Chargebee uses the
billing_addressobject from the customer to set the values in thebilling_addressof the invoices generated for the customer. - If the
billing_addressobject does not include thefirst_name,last_name, orcompanyfields, Chargebee automatically uses the values fromcustomer.first_name,customer.last_name, andcustomer.company(if available) when generating invoices.
Implementation Notes
- Ensure that
vat_numberandbusiness_customer_without_vat_number=trueare not passed together in the same request. - Ensure that
tax_providers_fieldsis not passed if Indian GST is not configured for your site. - Ensure that
registered_for_gst=trueis not passed if Australian GST is not configured for your site.
Use Cases
Prevent tax provider errors due to missing billing information
After integrating tax providers, you might encounter unintended tax calculation failures during renewals. The error message typically states:
Unable to calculate the tax rate as the shipping/billing address is either invalid or incomplete. Please verify and try again.
This error can occur even if the is_taxable value of item prices is changed from true to false before subscription renewal and reactivation.
Solution
Use this operation to update the billing address attributes to ensure they are accurate and complete.
Troubleshooting
Error: 400: "Operation failed as the country entered in the billing address by the customer cannot be verified against IP address or card BIN number."
This error occurs when location validation is enabled in the tax settings and there's a mismatch between the customer's billing country and their IP address or the card issuing country.
Resolution
Choose one of the following solutions:
Option A: Fix IP address mismatch
Use the Update a card payment source API and include the correct IP address in the request header.
Option B: Fix BIN mismatch
Ask the customer to update their payment method with one whose BIN matches their country. You can do this using the Request Payment Method option or the Self-Serve Portal.
Option C: Disable location validation
- In Chargebee Billing, navigate to Settings > Configure Chargebee > Taxes.
- Select the country.
- In the right pane, clear the Enable location validation checkbox.
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
customer-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 |
|---|---|---|---|
vat_number_prefix |
String | No |
An overridden value for the first two characters of the full VAT number.
Only applicable specifically for customers with Warning If you don't pass this parameter, the value will be deleted from the customer object. |
tax_providers_fields |
Object | No |
Parameters for tax_providers_fields. **Note** This parameter is supported only when selling to [India-SEZ](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-special-economic-zones-sezs) customers or when you're an [Indian business that sells to customers outside India](https://www.chargebee.com/docs/billing/2.0/taxes/indian-gst#configuring-taxes-for-exports). |
tax_providers_fields.field_value[] |
Array | No |
The value of the related tax field. |
tax_providers_fields.field_id[] |
Array | No |
Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee. |
tax_providers_fields.provider_name[] |
Array | No |
Name of the tax provider. |
entity_identifier_standard |
String | No |
The standard used for specifying the Tip: If there are additional entity identifiers for the customer not associated with the Default value: "iso6523-actorid-upis" |
entity_identifiers |
Object | No |
Parameters for entity_identifiers. |
entity_identifiers.id[] |
Array | No |
The unique id for the |
entity_identifiers.operation[] |
Array | No | |
entity_identifiers.value[] |
Array | No |
The value of the Tip: If there is only one entity identifier for the customer and the value is the same as |
entity_identifiers.scheme[] |
Array | No |
The Peppol BIS scheme associated with the Tip
If there is only one entity identifier for the customer and the value is the same as |
entity_identifiers.standard[] |
Array | No |
The standard used for specifying the Tip: If there is only one entity identifier for the customer and the value is the same as |
entity_identifier_scheme |
String | No |
The Peppol BIS scheme associated with the Tip: If there are additional entity identifiers for the customer not associated with the |
vat_number |
String | No |
The VAT/tax registration number for the customer.
For customers with Warning
|
is_einvoice_enabled |
Boolean | No |
Determines whether the customer is e-invoiced. When set to Tip: 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. |
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. Valid values:
|
registered_for_gst |
Boolean | No |
Confirms that a customer is registered under GST. If set to Warning
|
business_customer_without_vat_number |
Boolean | No |
Confirms that a customer is a valid business without an EU/UK VAT number. Warning
|
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. Warning If you don't pass this parameter, the value will be deleted from the customer object. Note
If you don't pass this parameter, the value will be 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. * invalid - Address is invalid. * valid - Address was validated successfully. * partially_valid - The address is valid for taxability but has not been validated for shipping. * not_validated - Address is not yet validated. Valid 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 example:
|
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. Warning If you don't pass this parameter, the value will be deleted from the customer object. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then E-Invoicing
If |
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.