Skip to main content

Vendor Payout

Initiate a commission payout to a vendor. This triggers a transfer of earned commissions to the vendor's registered bank account.

POSThttps://api.zenpays.com/merchant/api/v1/vendors/:id/payouts
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)

Body Parameters​

ParameterTypeDescription
amount
OPTIONAL
numberPayout amount (min: 0). If omitted, pays all pending commissions
currency
REQUIRED
stringCurrency code (e.g., USD, EUR, INR)
paymentMethod
OPTIONAL
stringPayout method override
adminNotes
OPTIONAL
stringInternal notes about this payout
environment
REQUIRED
stringEnvironment identifier

Response​

Success (201 Created)​

{
"success": true,
"data": {
"payoutId": "pyt_n4o5p6q7r8s9t0u1",
"vendorId": "vnd_a1b2c3d4e5f6g7h8",
"amount": 5312.50,
"currency": "USD",
"status": "processing",
"paymentMethod": "wire",
"commissionsIncluded": 12,
"bankDetails": {
"bankName": "First National Bank",
"beneficiaryName": "Acme Referrals LLC",
"accountNumber": "****6789"
},
"adminNotes": "Q1 2024 commission payout",
"environment": "production",
"initiatedAt": "2024-03-21T16:00:00.000Z",
"estimatedArrival": "2024-03-24T16:00:00.000Z"
},
"message": "Vendor payout initiated successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-03-21T16:00:00.000Z",
"processing_time_ms": 250,
"api_version": "v1",
"endpoint": "POST /vendors/:id/payouts",
"user_type": "merchant"
}
}

Error Responses​

CodeHTTPMessage
VALIDATION_ERROR400Invalid request parameters
INSUFFICIENT_BALANCE400Payout amount exceeds pending commissions
UNAUTHORIZED401Invalid API key
VENDOR_NOT_FOUND404Vendor with specified ID does not exist
PAYOUT_IN_PROGRESS409A payout is already being processed for this vendor
KYC_NOT_VERIFIED422Vendor KYC must be verified before payouts

Examples​

curl -X POST https://api.zenpays.com/merchant/api/v1/vendors/vnd_a1b2c3d4e5f6g7h8/payouts \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-03-21T16:00:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json" \
-d '{
"amount": 5312.50,
"currency": "USD",
"paymentMethod": "wire",
"adminNotes": "Q1 2024 commission payout",
"environment": "production"
}'