Skip to main content
GET
/
v1
/
subscriptions
/
customers
JavaScript
import Hercules from '@usehercules/sdk';

const client = new Hercules({
  apiVersion: '2025-12-09',
  apiKey: process.env['HERCULES_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const customer of client.beta.subscriptions.customers.list()) {
  console.log(customer.id);
}
{
  "data": [
    {
      "id": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "email": "<string>",
      "phone": "<string>",
      "address": {
        "line1": "<string>",
        "line2": "<string>",
        "city": "<string>",
        "state": "<string>",
        "postal_code": "<string>",
        "country": "<string>"
      },
      "stripe_id": "<string>"
    }
  ],
  "has_more": true
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as: Bearer

Query Parameters

limit
integer
default:100

Maximum number of customers to return (1-100)

Required range: 1 <= x <= 100
starting_after
string

Cursor for forward pagination

ending_before
string

Cursor for backward pagination

Response

200 - application/json

A paginated list of customer objects

Paginated list of customers

data
object[]
required

Array of customer objects

has_more
boolean
required

Whether there are more customers available after this page