Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
Parameters
- emailstring
A case-sensitive filter on the list based on the customer’s
email
field. The value must be a string.
More parameters
- createdobject
Only return customers that were created during the given date interval.
- created.
gtinteger Minimum value to filter by (exclusive)
- created.
gteinteger Minimum value to filter by (inclusive)
- created.
ltinteger Maximum value to filter by (exclusive)
- created.
lteinteger Maximum value to filter by (inclusive)
- ending_
beforestring A cursor for use in pagination.
ending_
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withbefore obj_
, your subsequent call can includebar ending_
in order to fetch the previous page of the list.before=obj_ bar - limitinteger
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
- starting_
afterstring A cursor for use in pagination.
starting_
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withafter obj_
, your subsequent call can includefoo starting_
in order to fetch the next page of the list.after=obj_ foo - test_
clockstring Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.
Returns
A object with a data
property that contains an array of up to limit
customers, starting after customer starting_
. Passing an optional email
will result in filtering to customers with only that exact email address. Each entry in the array is a separate customer object. If no more customers are available, the resulting array will be empty.
{ "object": "list", "url": "/v1/customers", "has_more": false, "data": [ { "id": "cus_NffrFeUfNV2Hib", "object": "customer", "address": null, "balance": 0, "created": 1680893993, "currency": null, "default_source": null, "delinquent": false, "description": null, "email": "jennyrosen@example.com", "invoice_prefix": "0759376C", "invoice_settings": { "custom_fields": null, "default_payment_method": null, "footer": null, "rendering_options": null }, "livemode": false, "metadata": {}, "name": "Jenny Rosen", "next_invoice_sequence": 1, "phone": null, "preferred_locales": [], "shipping": null, "tax_exempt": "none", "test_clock": null } ]}