Cancel Payout Intent
Cancel a payout intent that has not yet been confirmed.
POST
https://api.zenpayz.com/payment/api/v1/payout-intents/{intentId}/cancelBearer · API key
Request
Path Parameters
| Parameter | Type | Description |
|---|---|---|
intentId REQUIRED | string | Payout intent ID |
Headers
| Header | Description |
|---|---|
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
| Parameter | Type | Description |
|---|---|---|
reason OPTIONAL | string | Cancellation reason |
Response
Success (200 OK)
{
"success": true,
"data": {
"intentId": "poi_xxxxx",
"status": "cancelled",
"message": "Payout intent cancelled"
}
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| PAYOUT_INTENT_CANCEL_FAILED | 400 | Intent already confirmed or in terminal state |
| NOT_FOUND | 404 | Intent not found |
Examples
- cURL
- SDK
curl -X POST "https://api.zenpayz.com/payment/api/v1/payout-intents/poi_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" \
-H "Content-Type: application/json" \
-d '{"reason": "No longer needed"}'
await zenpays.payouts.cancelPayoutIntent('poi_xxxxx', 'No longer needed')