Skip to main content

Upload Batch Payout

Upload multiple payouts in a single API call using a CSV or Excel file. Use Batch Payout Template to get the correct column headers and field definitions before building your file.

POSThttps://api.zenpays.com/payment/api/v1/batch-payouts/upload
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
X-Merchant-Id
REQUIRED
Your merchant ID
X-Request-Id
OPTIONAL
Idempotency key for the request
Content-Type
REQUIRED
multipart/form-data

Body Parameters​

ParameterTypeDescription
file
REQUIRED
FileCSV or Excel file (max 5MB). Accepted: .csv, .xlsx, .xls
webhookUrl
OPTIONAL
stringURL for batch status webhooks

Response​

Success (200 OK)​

{
"success": true,
"data": {
"batch_id": "batch_1774867295648_06f4074d",
"total_payouts": 5,
"total_amount": 50000,
"currency": "INR",
"estimated_fees": 125,
"status": "validated",
"message": "Batch payout uploaded and validated successfully",
"preview_data": [
{
"row_number": 1,
"customer_email": "[email protected]",
"beneficiary_name": "Rajesh Kumar",
"amount": 10000,
"currency": "INR",
"payout_type": "IMPS",
"beneficiary_account": "1234567890"
}
],
"validation_errors": []
}
}

Response Fields​

ParameterTypeDescription
batch_id
OPTIONAL
stringUnique identifier for the batch
total_payouts
OPTIONAL
numberNumber of payout rows parsed
total_amount
OPTIONAL
numberSum of all payout amounts
currency
OPTIONAL
stringCurrency code from the file
estimated_fees
OPTIONAL
numberEstimated processing fees
status
OPTIONAL
stringBatch status after upload (validated)
message
OPTIONAL
stringHuman-readable status message
preview_data
OPTIONAL
arrayPreview of the first rows in the batch
validation_errors
OPTIONAL
arrayPer-row validation errors (empty when all rows pass)
note

After upload, the batch is in validated status. You must call Confirm Batch Payout to start processing.

Error Responses​

CodeHTTPMessage
MISSING_FILE400No file uploaded
BATCH_UPLOAD_FAILED400File parsing or validation failed
UNAUTHORIZED401Invalid API key

Examples​

curl -X POST "https://api.zenpays.com/payment/api/v1/batch-payouts/upload" \
-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 "X-Merchant-Id: ZP_FIN_xxxxx" \
-H "X-Request-Id: req_unique_id" \
-F "[email protected]" \
-F "webhookUrl=https://your-server.com/webhooks/batch-payout"