paytrack docs
Customers
Create and manage the customer records that Payment Plans, payments, and reminders connect to.
Overview
Customers represent the people or businesses your workspace collects from. Store names, contact details, notes, and use customer IDs when creating Payment Plans or recording payments.
Required scope
customers:read or customers:writeEndpoints
Operations
Available API methods for this resource.
GET/api/v1/customersList customers in the workspace.
POST/api/v1/customersCreate a customer.
GET/api/v1/customers/{id}Retrieve one customer.
PATCH/api/v1/customers/{id}Update customer details.
DELETE/api/v1/customers/{id}Delete or archive a customer where allowed.
Request example
Example
curl https://paytrack.ng/api/v1/customers \
-X POST \
-H "Authorization: Bearer $PAYTRACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Ada Furniture",
"phone": "+2348012345678",
"email": "ada@example.com",
"notes": "Wholesale customer"
}'Response example
Example
{
"success": true,
"data": {
"id": "cus_123",
"name": "Ada Furniture",
"phone": "+2348012345678",
"email": "ada@example.com"
},
"request_id": "req_xxx"
}Error example
Example
{
"success": false,
"error": {
"code": "validation_error",
"message": "The request failed validation.",
"details": {}
},
"request_id": "req_xxx"
}