Skip to main content

Cancel Batch Payout

Cancel a batch payout. Payouts still in initiated status within the batch are cancelled. Payouts that are already processing or completed are not affected.

POSThttps://api.zenpays.com/payment/api/v1/batch-payouts/{batchId}/cancel
Bearer · API key

Request​

Path Parameters​

ParameterTypeDescription
batchId
REQUIRED
stringBatch payout ID

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

Response​

Success (200 OK)​

{
"success": true,
"data": {
"success": true,
"message": "Batch batch_xxxxx cancelled. 12 pending jobs removed."
}
}

Error Responses​

CodeHTTPMessage
BATCH_CANCEL_FAILED400Batch already completed or cancelled
BATCH_NOT_FOUND404Batch payout doesn't exist

Examples​

curl -X POST "https://api.zenpays.com/payment/api/v1/batch-payouts/batch_xxxxx/cancel" \
-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"