v1

latestOpenAPI 3.0.02026-07-24103118224.7 KB
Customer

Get paginated list of customers

Returns a paginated list of customers belonging to the authenticated merchant. Supports filtering by search term (matches email, first name, or last name), whether the customer has an active payment method, billing country, and whether they are purchasing as a business. Use the page and limit query parameters to control pagination.

get/api/customer

Query parameters

searchstring

Search term to filter customers by email, first name, or last name

hasPaymentMethodboolean

Filter customers by whether they have an active payment method

countrystring

Filter customers by billing country

purchasingAsBusinessboolean

Filter customers by whether they are purchasing as a business

pagenumber

The page number

limitnumber

The number of items per page

Response

Paginated list of customers matching the filters.

Example response

{
  "data": [
    {
      "id": "cus_abc123xyz789",
      "email": "john.doe@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+33612345678",
      "billingCountry": "FR",
      "businessName": null,
      "purchasingAsBusiness": false,
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-03-20T14:45:00.000Z",
      "paymentMethod": {
        "type": "card",
        "cardBrand": "Visa",
        "cardLast4": "4242"
      },
      "stats": {
        "totalPayments": 15,
        "totalSubscriptions": 2
      }
    },
    {
      "id": "cus_def456uvw012",
      "email": "jane.smith@company.com",
      "firstName": "Jane",
      "lastName": "Smith",
      "phone": "+14155551234",
      "billingCountry": "US",
      "businessName": "Tech Solutions Inc",
      "purchasingAsBusiness": true,
      "createdAt": "2024-02-10T08:15:00.000Z",
      "updatedAt": "2024-03-18T16:20:00.000Z",
      "paymentMethod": {
        "type": "card",
        "cardBrand": "Mastercard",
        "cardLast4": "5555"
      },
      "stats": {
        "totalPayments": 8,
        "totalSubscriptions": 1
      }
    }
  ],
  "meta": {
    "total": 145,
    "lastPage": 15,
    "currentPage": 1,
    "perPage": 10,
    "next": 2
  }
}