Customers API
List Customers
GET /api/customersQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
per_page | number | Items per page (default: 20) |
search | string | Search by name or email |
Response:
json
{
"items": [
{
"id": "cus_xxx",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"company": "Acme Inc",
"country": "US",
"createdAt": "2025-01-01T00:00:00.000Z"
}
],
"pagination": { "page": 1, "perPage": 20, "total": 50, "totalPages": 3 }
}Get Customer
GET /api/customers/:idReturns the customer with their licenses, payments, and subscriptions.
Create Customer
POST /api/customersjson
{
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"company": "Acme Inc",
"phone": "+1234567890",
"street": "123 Main St",
"city": "New York",
"state": "NY",
"postalCode": "10001",
"country": "US",
"timezone": "America/New_York",
"metadata": { "source": "manual" }
}Only email is required.
Update Customer
PUT /api/customers/:idAccepts partial body.
Delete Customer
DELETE /api/customers/:id