Skip to main content

Get Customer Transactions

Retrieve transactions for a specific customer.

GEThttps://api.zenpayz.com/merchant/api/v1/transactions/customer/{customerId}
Bearer · API key

Request

Path Parameters

ParameterTypeDescription
customerId
REQUIRED
stringCustomer ID (e.g., cus_xxxxx)

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
page
OPTIONAL
integer1Page number
limit
OPTIONAL
integer20Items per page (max 100)

Response

Success (200 OK)

{
"success": true,
"data": {
"data": [
{
"id": "txn_xxxxx",
"intent_id": "pi_xxxxx",
"merchant_id": "mer_xxxxx",
"customer_id": "cus_xxxxx",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_phone": "+1234567890",
"amount": 1000,
"currency": "USD",
"status": "success",
"payment_method": "upi",
"description": "Order #456",
"metadata": {
"orderId": "order_456"
},
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:31:00.000Z"
}
],
"pagination": {
"total": 45,
"page": 1,
"limit": 20,
"totalPages": 3
}
},
"message": "Customer transactions retrieved successfully",
"meta": {}
}

Examples

curl -X GET "https://api.zenpayz.com/merchant/api/v1/transactions/customer/cus_xxxxx?limit=50" \
-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"