> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getopenrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customers

> List and retrieve customer records created during checkout.

Customers are created automatically when a checkout session is created with a new email address. Use these endpoints to look up customers and navigate to their associated payments and invoices.

## GET /api/gateway/customers

Returns a paginated list of customers.

```bash theme={null}
curl "https://dash.getopenrails.com/api/gateway/customers?limit=20"
```

### Query parameters

| Parameter    | Type   | Description                                          |
| ------------ | ------ | ---------------------------------------------------- |
| `limit`      | number | Maximum number of records to return. Defaults to 20. |
| `customerId` | string | Filter to a specific customer by `cus_*` ID.         |
| `email`      | string | Filter by exact email address.                       |
| `status`     | string | Filter by customer status.                           |

### Response

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "cus_7G42M9",
      "object": "customer",
      "email": "buyer@example.com",
      "status": "active",
      "created": "2026-05-01T10:00:00Z"
    }
  ],
  "hasMore": false
}
```

## GET /api/gateway/customers/{customerId}

Fetches a single customer by their `cus_*` ID.

```bash theme={null}
curl https://dash.getopenrails.com/api/gateway/customers/cus_7G42M9
```

### Response

```json theme={null}
{
  "id": "cus_7G42M9",
  "object": "customer",
  "email": "buyer@example.com",
  "status": "active",
  "created": "2026-05-01T10:00:00Z"
}
```

Use the `customerId` to filter [payments](/api-reference/payments) and [invoices](/api-reference/invoices) for this customer.
