ChargebeeAPI
Join the Chargebee Developers Discord — Connect, ask questions, and build faster.Join

List customers

Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.

Sample Request

URL Format

GET https://[site].chargebee.com/api/v2/customers

Input Parameters

limit
optional, integer, default=10, min=1, max=100

The number of resources to be returned.

offset
optional, string, max chars=1000

Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.

include_deleted
optional, boolean, default=false

If set to true, includes the deleted resources in the response. For the deleted resources in the response, the 'deleted ' attribute will be 'true '.

sort_by[<sort-order>]
optional, object

optional, string filter

Sorts based on the specified attribute. Supported attributes : created_at, updated_at

Supported sort-orders : asc, desc

Example → sort_by[asc] = "created_at"

This will sort the result based on the 'created_at' attribute in ascending(earliest first) order.

Filter Params

For operator usages, see the Pagination and Filtering section.
id[<operator>]

optional, string filter

Identifier of the customer. Supported operators : is, is_not, starts_with, in, not_in

Example → id[is_not] = "9bsvnHgsvmsI"

Supported operators: is, is_not, starts_with, in, not_in
Example 9bsvnHgsvmsI
first_name[<operator>]

optional, string filter

First name of the customer. Supported operators : is, is_not, starts_with, is_present

Example → first_name[is] = "John"

Supported operators: is, is_not, starts_with, is_present
Example John
last_name[<operator>]

optional, string filter

Last name of the customer. Supported operators : is, is_not, starts_with, is_present

Example → last_name[is] = "Clint"

Supported operators: is, is_not, starts_with, is_present
Example Clint
email[<operator>]

optional, string filter

Email of the customer. Configured email notifications will be sent to this email. Supported operators : is, is_not, starts_with, is_present

Example → email[is] = "john@test.com"

Supported operators: is, is_not, starts_with, is_present
Example john@test.com
company[<operator>]

optional, string filter

Company name of the customer. Supported operators : is, is_not, starts_with, is_present

Example → company[is] = "Globex Corp"

Supported operators: is, is_not, starts_with, is_present
Example Globex Corp
phone[<operator>]

optional, string filter

Phone number of the customer. Supported operators : is, is_not, starts_with, is_present

Example → phone[is] = "(541) 754-3010"

Supported operators: is, is_not, starts_with, is_present
Example (541) 754-3010
auto_collection[<operator>]

optional, enumerated string filter

Whether payments needs to be collected automatically for this customer. Possible values are : on, off.

Supported operators : is, is_not, in, not_in

Example → auto_collection[is] = "on"

Supported operators: is, is_not, in, not_in
Example on
taxability[<operator>]

optional, enumerated string filter

Specifies if the customer is liable for tax. Possible values are : taxable, exempt.

Supported operators : is, is_not, in, not_in

Example → taxability[is] = "taxable"

Supported operators: is, is_not, in, not_in
Example taxable
created_at[<operator>]

optional, timestamp(UTC) in seconds filter

Timestamp indicating when this customer resource is created. Supported operators : after, before, on, between

Example → created_at[after] = "1435054328"

Supported operators: after, before, on, between
Example 1435054328
updated_at[<operator>]

optional, timestamp(UTC) in seconds filter

To filter based on updated_at. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the sort_by input parameter as updated_at for a faster response. Supported operators : after, before, on, between

Example → updated_at[on] = "1243545465"

Supported operators: after, before, on, between
Example 1243545465
offline_payment_method[<operator>]

optional, enumerated string filter

The preferred offline payment method for the customer. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.

Supported operators : is, is_not, in, not_in

Example → offline_payment_method[is] = "cash"

Supported operators: is, is_not, in, not_in
Example cash
auto_close_invoices[<operator>]

optional, boolean filter

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. Possible values are : true, false

Supported operators : is

Example → auto_close_invoices[is] = "true"

Supported operators: is
Example true
channel[<operator>]

optional, enumerated string filter

The subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.

Supported operators : is, is_not, in, not_in

Example → channel[is] = "APP STORE"

Supported operators: is, is_not, in, not_in
Example APP STORE
business_entity_id[<operator>]

optional, string filter

The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.

Note

Multiple Business Entities is a feature available only on Product Catalog 2.0.

Supported operators : is, is_not, starts_with

Example → business_entity_id[is_not] = "business_entity_id"

Supported operators: is
Example business_entity_id
relationship

Parameters for relationship

pass parameters as relationship[<param name>][<operator>]

Returns

next_offsetoptional, string, max chars=1000

This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.

customerCustomer object
Resource object representing customer
cardCard object
Resource object representing card