Skip to main content

Get Top Customers

Retrieve top customers by transaction volume.

GEThttps://api.zenpayz.com/merchant/api/v1/customers/top
Bearer · API key

Request

Headers

HeaderDescription
Authorization
REQUIRED
Bearer {api_key}
X-Signature
REQUIRED
HMAC-SHA256 signature
X-Timestamp
REQUIRED
ISO 8601 timestamp
X-Secret-Salt
REQUIRED
Secret salt for HMAC validation

Query Parameters

ParameterTypeDescription
limit
OPTIONAL
integer10Number of customers (max 100)
startDate
OPTIONAL
string-Start date (ISO 8601)
endDate
OPTIONAL
string-End date (ISO 8601)
currency
OPTIONAL
string-Filter by currency

Response

Success (200 OK)

{
"success": true,
"data": [
{
"customerId": "cust_a1b2c3d4e5f6g7h8",
"email": "vip@example.com",
"name": "Jane Smith",
"lifetimeValue": 150000,
"totalTransactions": 45
},
{
"customerId": "cust_c3d4e5f6g7h8i9j0",
"email": "john@example.com",
"name": "John Doe",
"lifetimeValue": 125000,
"totalTransactions": 38
}
],
"message": "Top customers retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-15T10:30:00.000Z",
"processing_time_ms": 150,
"api_version": "v1",
"endpoint": "GET /customers/top",
"user_type": "merchant"
}
}

Examples

curl -X GET "https://api.zenpayz.com/merchant/api/v1/customers/top?limit=20&currency=USD" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt"