POST /customers/{customer-id}
Updates the customer resource. You may also update any of its custom attributes. However, this method cannot be used for updating the 'Billing Info' - the Billing Address and 'vat_number' attributes - of the customer. To update the same, use our Update Billing Info API.
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 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 |
---|---|---|---|
taxability |
String | No |
Specifies if the customer is liable for tax. * taxable - Computes tax for the customer based on the site configuration. In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. * exempt -
Possible values:
Default value: "taxable" |
consolidated_invoicing |
Boolean | No |
Indicates whether invoices raised on the same day for the Any invoices raised when a subscription activates from |
entity_code |
String | No |
The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's AvaTax for Sales integration. * med2 - US Medical Device Excise Tax with taxable sales tax * med1 - US Medical Device Excise Tax with exempt sales tax * d - Foreign diplomat * e - Charitable or benevolent organization * f - Religious organization * g - Resale * a - Federal government * b - State government * c - Tribe/Status Indian/Indian Band * l - Other or custom * m - Educational organization * n - Local government * h - Commercial agricultural production * i - Industrial production/manufacturer * j - Direct pay permit * k - Direct mail * p - Commercial aquaculture * q - Commercial Fishery * r - Non-resident Possible values:
|
meta_data |
Object | No |
A collection of key-value pairs that provides extra information about the customer. **Note:** There's a character limit of 65,535. [Learn more](advanced-features?prod_cat_ver=2#metadata). |
exempt_number |
String | No |
Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's AvaTax for Sales integration. |
first_name |
String | No |
First name of the customer. |
exemption_details[] |
Array | No |
Indicates the exemption information. You can customize customer exemption based on specific Location, Tax level (Federal, State, County and Local), Category of Tax or specific Tax Name. This is applicable only if you use Chargebee's AvaTax for Communications integration. |
fraud_flag |
String | No |
Indicates whether or not the customer has been identified as fraudulent. * fraudulent - The customer has been marked as fraudulent * suspicious - The customer has been identified as potentially fraudulent by the gateway * safe - The customer has been marked as safe Possible values:
|
customer_type |
String | No |
Indicates the type of the customer. This is applicable only if you use Chargebee's AvaTax for Communications integration. * senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks * industrial - When the purchase is made by an industrial business * business - When the purchase is made at a place of business * residential - When the purchase is made by a customer for home use Possible values:
|
invoice_notes |
String | No |
A customer-facing note added to all invoices associated with this API resource. This note becomes one among all the notes displayed on the invoice PDF. |
auto_close_invoices |
Boolean | No |
Override for this customer, the site-level setting for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the subscription level which takes precedence. |
allow_direct_debit |
Boolean | No |
Whether the customer can pay via Direct Debit. Default value: false |
client_profile_id |
String | No |
Indicates the Client profile id for the customer. This is applicable only if you use Chargebee's AvaTax for Communications integration. |
offline_payment_method |
String | No |
The preferred offline payment method for the customer. * custom - Custom * bank_transfer - Bank Transfer * boleto - Boleto * jp_automated_bank_transfer - JP Automated Bank Transfer * sepa_credit - SEPA Credit * cash - Cash * check - Check * mx_automated_bank_transfer - MX Automated Bank Transfer * no_preference - No Preference * us_automated_bank_transfer - US Automated Bank Transfer * eu_automated_bank_transfer - EU Automated Bank Transfer * ach_credit - ACH Credit * uk_automated_bank_transfer - UK Automated Bank Transfer Possible values:
|
email |
String | No |
Email of the customer. Configured email notifications will be sent to this email. |
net_term_days |
Integer | No |
The number of days within which the customer has to make payment for the invoice. . Default value: 0 |
last_name |
String | No |
Last name of the customer. |
company |
String | No |
Company name of the customer. |
phone |
String | No |
Phone number of the customer. |
tax_providers_fields |
Object | No |
Parameters for tax_providers_fields |
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. |
auto_collection |
String | No |
Whether payments needs to be collected automatically for this customer. * on - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. * off - Automatic collection of charges will not be made. All payments must be recorded offline. Possible values:
Default value: "on" |
locale |
String | No |
Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication. |
preferred_currency_code |
String | No |
The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled. |
taxjar_exemption_category |
String | No |
Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. * government - Government * other - Other * wholesale - Whole-sale 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.