List customers
Lists customers, newest first, or finds one by `email`. One page carries `items`, `has_more` and `next_cursor`; pass `next_cursor` back as `cursor` for the next page. Only customers belonging to the key's merchant and mode are listed.
Lists customers, newest first, or finds one by email. One page carries items, has_more and next_cursor; pass next_cursor back as cursor for the next page. Only customers belonging to the key's merchant and mode are listed.
Authorization
secretKey Your secret key: sk_live_… or sk_test_….
In: header
Query Parameters
How many records to return in one page: 1 to 100, and 20 when left out. Asking for more than 100 is refused with INVALID_REQUEST.
1 <= value <= 10020The next_cursor of the previous page; leave it out for the first page. A cursor marks the record the next page starts after, so records created while you walk the list never shift the pages you have not read yet. Anything the API did not issue is refused with INVALID_CURSOR.
The customer with this email address, compared in lower case. Emails are unique per merchant and mode, so at most one customer matches.
emailResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/customers"{ "items": [ { "object": "customer", "customer_id": "cus_3f2b8c1e9a4d4e7b8c2a1d5e6f7a8b9c", "name": "string", "email": "user@example.com", "phone_number": "string", "metadata": { "property1": "string", "property2": "string" }, "created_at": "2019-08-24T14:15:22Z" } ], "has_more": true, "next_cursor": "string"}Retrieve a customer GET
Returns one customer, with the metadata you stored on them. Only customers belonging to the key's merchant and mode are visible.
Update a customer PATCH
Changes a customer's name, email, phone number or metadata. Fields you leave out keep their values, and `metadata` replaces what was stored rather than merging into it. The new email must be free in this merchant and mode (`409 CUSTOMER_EXISTS`). Payments and subscriptions already taken keep the name, email and phone number they were paid with; they are not rewritten.