ChargebeeAPI

Customers

Represents a customer. Subscriptions, Card and Billing Address are associated with the customer resource. Customer resource will be created along with subscription via "Create a Subscription" API. The id of the customer will be same as that of associated subscription id if not explicitly set.

The Billing Address is significant especially when EU VAT taxes are involved, for tax calculations will be based on this address. For customers without Billing Address, EU VAT taxes will not be included. Thus ensure to set this properly if you have configured EU VAT Tax.

Note: For the customers who signed up before 1st Mar 2014, Customer's Billing Address and 'vat_number' will be replaced automatically whenever the associated Card gets updated. i.e existing values for Billing Address and 'vat_number' will be cleared and the new values will be set. This behaviour is changed now - The VAT Number should always be passed along Billing Address and not with Card address. Both the addresses have to be dealt separately.

Sample CustomerJSON

API Index URL

https://[site].chargebee.com/api/v1/customers

Customers attributes

id
required, string, max chars=50

Identifier of the customer.

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.

phone
optional, string, max chars=50

Phone number of the customer

company
optional, string, max chars=250

Company name of the customer.

vat_number
optional, string, max chars=20

The VAT/tax registration number for the customer. For customers with billing_address

country as XI (which is United Kingdom - Northern Ireland ), the first two characters of the full VAT number can be overridden by setting vat_number_prefix .

auto_collection
required, enumerated string, default=on

Whether payments needs to be collected automatically for this customer

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

allow_direct_debit
required, boolean, default=false

Whether the customer can pay via Direct Debit

created_at
required, timestamp(UTC) in seconds

Timestamp indicating when this customer resource is created.

created_from_ip
optional, string, max chars=50

The IP address of the customer. Used primarily for referral integrations and EU/UK VAT validation.

taxability
optional, enumerated string, default=taxable

Specifies if the customer is liable for tax

Possible Enum Values
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
  • Customer is exempted from tax. When using Chargebee's native Taxes feature or when using the TaxJar integration, no other action is needed.
  • However, when using our Avalara integration, optionally, specify entity_code or exempt_number attributes if you use Chargebee's AvaTax for Sales or specify exemption_details attribute if you use Chargebee's AvaTax for Communications integration. Tax may still be applied by Avalara for certain values of entity_code/exempt_number/exemption_details based on the state/region/province of the taxable address.
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.

account_credits
required, in cents, min=0

Promotional credits balance of this customer

refundable_credits
required, in cents, min=0

Refundable credits balance of this customer

excess_payments
required, in cents, min=0

Total unused payments associated with the customer

meta_data
optional, jsonobject

A set of key-value pairs stored as additional information for the customer. Learn more .

billing_address

Object of parameters for billing_address

contacts

Array containing object of parameters for contacts

payment_method

Object of parameters for payment_method