Skip to main content

Vendor Commissions

Retrieve a paginated list of commission records for a specific vendor, with filtering and sorting support.

GEThttps://api.zenpayz.com/merchant/api/v1/vendors/:id/commissions
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
Content-Type
REQUIRED
application/json

Path Parameters

ParameterTypeDescription
id
REQUIRED
stringVendor ID (e.g., vnd_a1b2c3d4e5f6g7h8)

Query Parameters

ParameterTypeDescription
status
OPTIONAL
stringFilter by commission status (pending, calculated, paid, cancelled, disputed)
commissionType
OPTIONAL
stringFilter by commission type (percentage, fixed, tiered)
calculatedAfter
OPTIONAL
stringCommissions calculated after this date (ISO 8601)
calculatedBefore
OPTIONAL
stringCommissions calculated before this date (ISO 8601)
paidAfter
OPTIONAL
stringCommissions paid after this date (ISO 8601)
paidBefore
OPTIONAL
stringCommissions paid before this date (ISO 8601)
minCommissionAmount
OPTIONAL
numberMinimum commission amount
currency
OPTIONAL
stringFilter by currency code (e.g., USD, EUR)
environment
OPTIONAL
stringFilter by environment
page
OPTIONAL
numberPage number (default: 1)
limit
OPTIONAL
numberResults per page (default: 20)
sortBy
OPTIONAL
stringField to sort by
sortOrder
OPTIONAL
stringSort direction (asc, desc)

Response

Success (200 OK)

{
"success": true,
"data": [
{
"commissionId": "comm_d4e5f6g7h8i9j0k1",
"vendorId": "vnd_a1b2c3d4e5f6g7h8",
"referralId": "ref_e5f6g7h8i9j0k1l2",
"transactionId": "txn_f6g7h8i9j0k1l2m3",
"amount": 125.00,
"currency": "USD",
"commissionRate": 12.5,
"commissionType": "percentage",
"baseAmount": 1000.00,
"status": "paid",
"calculatedAt": "2024-03-15T10:00:00.000Z",
"paidAt": "2024-03-20T14:00:00.000Z",
"environment": "production"
},
{
"commissionId": "comm_g7h8i9j0k1l2m3n4",
"vendorId": "vnd_a1b2c3d4e5f6g7h8",
"referralId": "ref_h8i9j0k1l2m3n4o5",
"transactionId": "txn_i9j0k1l2m3n4o5p6",
"amount": 75.50,
"currency": "USD",
"commissionRate": 12.5,
"commissionType": "percentage",
"baseAmount": 604.00,
"status": "pending",
"calculatedAt": "2024-03-21T08:00:00.000Z",
"paidAt": null,
"environment": "production"
}
],
"message": "Vendor commissions retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-03-21T10:30:00.000Z",
"processing_time_ms": 95,
"api_version": "v1",
"endpoint": "GET /vendors/:id/commissions",
"user_type": "merchant",
"pagination": {
"page": 1,
"limit": 20,
"totalItems": 2,
"totalPages": 1
}
}
}

Error Responses

CodeHTTPMessage
VALIDATION_ERROR400Invalid query parameters
UNAUTHORIZED401Invalid API key
VENDOR_NOT_FOUND404Vendor with specified ID does not exist

Examples

curl -X GET "https://api.zenpayz.com/merchant/api/v1/vendors/vnd_a1b2c3d4e5f6g7h8/commissions?status=pending&currency=USD&page=1&limit=20" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-03-21T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json"