POST /customers/{customer-id}

Updates the details of the specified customer.

Use this API to modify customer information, including standard attributes and any configured custom attributes.

Impacts

Invoices

  • See auto_collection parameter to understand the impact on invoices.
  • See taxability parameter to understand how taxes on invoices are impacted.

CRM integrations

When you update customer details in Chargebee using this API, the corresponding records are synced with integrated CRM systems, such as HubSpot or Salesforce, depending on your integration configuration.

Servers

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:

  • "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

Valid 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

Valid values:

  • "all-disabled"

Request body fields

Name Type Required Description
taxability String No

Specifies whether taxes are applicable to invoices generated for this customer.

* taxable -

Taxes are calculated for this customer based on the site's tax configuration. In some regions, shipping_address is required for tax computation. If a shipping address is not provided, the billing_address is used. If neither address is available, no tax is applied.

* exempt -

The customer is exempt from tax.

  • If you use Chargebee Taxes or the TaxJar integration, no additional action is required.
  • If you use the Avalara integration, optionally specify the entity_code or exempt_number attributes with AvaTax for Sales, or the exemption_details attribute with AvaTax for Communications. Avalara may still apply tax depending on the values of entity_code, exempt_number, or exemption_details, and the jurisdiction (state, region, or province) of the taxable address.

Valid values:

  • "exempt"
  • "taxable"

Default value: "taxable"

consolidated_invoicing Boolean No

Indicates whether invoices raised on the same day for the customer are consolidated. When provided, this overrides the default configuration at the site-level. This parameter can be provided only when Consolidated Invoicing is enabled.

Note:

Any invoices raised when a subscription activates from in_trial or future status, are not consolidated by default. Contact Support to enable consolidation for such invoices.

.

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

Valid values:

  • "d"
  • "c"
  • "b"
  • "a"
  • "med2"
  • "med1"
  • "r"
  • "q"
  • "p"
  • "n"
  • "m"
  • "l"
  • "k"
  • "j"
  • "i"
  • "h"
  • "g"
  • "f"
  • "e"
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](/docs/api/advanced-features) .

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. To know more about what values you need to provide, refer to this Avalara's API document .

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

Valid values:

  • "safe"
  • "fraudulent"
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

Valid values:

  • "residential"
  • "business"
  • "senior_citizen"
  • "industrial"
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

Valid values:

  • "mx_automated_bank_transfer"
  • "cash"
  • "boleto"
  • "no_preference"
  • "bank_transfer"
  • "jp_automated_bank_transfer"
  • "custom"
  • "check"
  • "eu_automated_bank_transfer"
  • "sepa_credit"
  • "ach_credit"
  • "us_automated_bank_transfer"
  • "uk_automated_bank_transfer"
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

Determines whether payments should be collected automatically for this customer.
Note This setting can be overridden at the subscription level. * on -

Payments are automatically collected for new invoices. For existing invoices, Chargebee attempts collections through dunning as per the configured schedule. * off -

Payments are not automatically collected for this customer.

Valid values:

  • "on"
  • "off"

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

Valid values:

  • "other"
  • "wholesale"
  • "government"

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.