Customers

Store customer profiles that can be linked to orders, invoices, and Stripe customers. Customer records support loyalty tracking, purchase history, and personalised receipts.

List customers

bash
GET /v1/slate/customers
NameTypeRequiredDescription
qstringNoSearch by name or email (partial match).
pageintegerNoPage number.
per_pageintegerNoResults per page. Max 100.
json
{
  "data": [
    {
      "id": "cus_01hxyz",
      "tenant_id": "ten_01hxyz",
      "name": "Jane Smith",
      "email": "[email protected]",
      "phone": "+61400000000",
      "stripe_customer_id": "cus_Qxxx",
      "notes": "Prefers oat milk",
      "created_at": "2025-05-01T00:00:00Z"
    }
  ]
}

Create a customer

bash
POST /v1/slate/customers
NameTypeRequiredDescription
namestringYesFull name of the customer.
emailstringNoEmail address. Used for receipts and invoice delivery.
phonestringNoPhone number in E.164 format.
notesstringNoInternal notes visible to staff only.
create_stripe_customerbooleanNoIf true, creates a matching Stripe Customer and saves the ID. Defaults to false.
bash
curl -X POST https://api.hldgroup.org/v1/slate/customers \
  -H "x-internal-secret: <key>" \
  -H "x-tenant-id: ten_01hxyz" \
  -H "x-user-id: usr_01hxyz" \
  -H "x-platform-role: tenant-system-admin" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Smith",
    "email": "[email protected]",
    "phone": "+61400000000",
    "create_stripe_customer": true
  }'

Get a customer

bash
GET /v1/slate/customers/:id

Update a customer

bash
PATCH /v1/slate/customers/:id

All fields are optional. Send only what you want to change.

Note:When you attach a customer to a PaymentIntent (POST /v1/slate/payments), Stripe stores their payment method for future use. This enables one-click checkout for returning customers.