Delete Bank Account
Remove a bank account from the merchant's registered accounts.
DELETE
https://api.zenpayz.com/merchant/api/v1/settlements/bank-accounts/{id}Bearer · API key
Request
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 |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id REQUIRED | string | Bank account ID |
warning
A primary bank account cannot be deleted. Set another account as primary first before deleting.
Response
Success (200 OK)
{
"success": true,
"message": "Bank account deleted successfully"
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| BANK_ACCOUNT_NOT_FOUND | 404 | Bank account does not exist |
| CANNOT_DELETE_PRIMARY | 400 | Cannot delete primary bank account |
Examples
- cURL
- SDK
curl -X DELETE "https://api.zenpayz.com/merchant/api/v1/settlements/bank-accounts/ba_xxxxx" \
-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"
await zenpays.settlements.deleteBankAccount('ba_xxxxx');