ChargebeeAPI

Update a customer

Idempotency Supported
Try in API Explorer

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.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/customers/{customer-id}

Input Parameters

first_name
optional, string, max chars=150

First name of the customer.

last_name
optional, string, max chars=150

Last name of the customer.

email
optional, string, max chars=70

Email of the customer. Configured email notifications will be sent to this email.

preferred_currency_code
optional, string, max chars=3

The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.

phone
optional, string, max chars=50

Phone number of the customer.

company
optional, string, max chars=250

Company name of the customer.

auto_collection
optional, enumerated string, default=on

Determines whether payments should be collected automatically for this customer.

Note This setting can be overridden at the subscription level.

Possible Enum Values
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.

allow_direct_debit
optional, boolean, default=false

Whether the customer can pay via Direct Debit.

net_term_days
optional, integer, default=0

The number of days within which the customer has to make payment for the invoice.

taxability
optional, enumerated string, default=taxable

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

Possible Enum Values
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.
exemption_details
optional, jsonarray

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 .

customer_type
optional, enumerated string

Indicates the type of the customer. This is applicable only if you use Chargebee's AvaTax for Communications integration.

Possible Enum Values
residential

When the purchase is made by a customer for home use

business

When the purchase is made at a place of business

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

client_profile_id
optional, string, max chars=50

Indicates the Client profile id for the customer. This is applicable only if you use Chargebee's AvaTax for Communications integration.

taxjar_exemption_category
optional, enumerated string

Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration.

Possible Enum Values
wholesale

Whole-sale

government

Government

other

Other

locale
optional, string, max chars=50

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.

entity_code
optional, enumerated string

The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's AvaTax for Sales integration .

Possible Enum Values
a

Federal government

b

State government

c

Tribe/Status Indian/Indian Band

d

Foreign diplomat

e

Charitable or benevolent organization

exempt_number
optional, string, max chars=100

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 .

offline_payment_method
optional, enumerated string

The preferred offline payment method for the customer.

Possible Enum Values
no_preference

No Preference

cash

Cash

check

Check

bank_transfer

Bank Transfer

ach_credit

ACH Credit

invoice_notes
optional, string, max chars=2000

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
optional, boolean

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.

meta_data
optional, jsonobject

A collection of key-value pairs that provides extra information about the customer.

Note: There's a character limit of 65,535.

Learn more .

fraud_flag
optional, enumerated string

Indicates whether or not the customer has been identified as fraudulent.

Possible Enum Values
safe

The customer has been marked as safe

fraudulent

The customer has been marked as fraudulent

consolidated_invoicing
optional, boolean

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.

.

tax_providers_fields
optional, string

Parameters for tax_providers_fields

Returns

customerCustomer object

Resource object representing customer

cardCard object

Resource object representing card