Skip to main content

Generate Report

Generate a new report for transactions, payouts, settlements, or other data.

POSThttps://api.zenpayz.com/merchant/api/v1/reports/generate
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

Body Parameters

ParameterTypeDescription
type
REQUIRED
stringReport type: transactions, payouts, settlements, refunds, customers
format
OPTIONAL
stringOutput format: csv, xlsx, pdf (default: csv)
startDate
REQUIRED
stringStart date (ISO 8601)
endDate
REQUIRED
stringEnd date (ISO 8601)
filters
OPTIONAL
objectAdditional filters based on report type
columns
OPTIONAL
arraySpecific columns to include

Response

Success (201 Created)

{
"success": true,
"data": {
"id": "rep_550e8400-e29b-41d4-a716-446655440000",
"merchantId": "mer_xxxxx",
"type": "transactions",
"format": "csv",
"status": "processing",
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-01-31T23:59:59.999Z",
"createdAt": "2024-01-15T10:30:00.000Z"
}
}

Report Status

StatusDescription
pendingReport queued for processing
processingReport is being generated
completedReport ready for download
failedReport generation failed

Examples

curl -X POST https://api.zenpayz.com/merchant/api/v1/reports/generate \
-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" \
-H "Content-Type: application/json" \
-d '{
"type": "transactions",
"format": "csv",
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-01-31T23:59:59.999Z"
}'