Delete a draft
curl --request DELETE \
--url https://api.next.orenda.finance/v1/batch-payments/{batchId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.next.orenda.finance/v1/batch-payments/{batchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.next.orenda.finance/v1/batch-payments/{batchId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"success": true,
"data": {
"batchId": "b2c3d4e5-0000-1111-2222-333344445555",
"status": "DELETED",
"payloadPurged": true
}
}{
"success": false,
"message": "VALIDATION_FAILED",
"code": "VALIDATION_ERROR"
}{
"message": "Unauthorized"
}{
"success": false,
"code": "FORBIDDEN",
"message": "Forbidden"
}{
"success": false,
"code": "RESOURCE_NOT_FOUND",
"message": "Batch not found"
}{
"success": false,
"message": "Batch is no longer a draft and cannot be deleted",
"code": "BATCH_NOT_A_DRAFT"
}{
"success": false,
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error"
}Batch payments
Delete a draft
Withdraws a batch that was prepared but never paid. The draft is removed and stops being listable and openable at once, and the verified payload behind it (the payee names, accounts, and amounts checked at verification) is deleted with it.
Drafts only. A batch that has been paid has money in flight behind it and returns 409. An expired draft can still be deleted; that’s how lapsed drafts are cleared out.
Not idempotent. Once the draft is gone there’s nothing left to recognise, so a repeated delete returns 404 rather than a second success. To prepare the same payments again, verify them; that creates a new draft. You can only delete a draft you can open; someone else’s is refused as if it didn’t exist.
DELETE
/
v1
/
batch-payments
/
{batchId}
Delete a draft
curl --request DELETE \
--url https://api.next.orenda.finance/v1/batch-payments/{batchId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.next.orenda.finance/v1/batch-payments/{batchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.next.orenda.finance/v1/batch-payments/{batchId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"success": true,
"data": {
"batchId": "b2c3d4e5-0000-1111-2222-333344445555",
"status": "DELETED",
"payloadPurged": true
}
}{
"success": false,
"message": "VALIDATION_FAILED",
"code": "VALIDATION_ERROR"
}{
"message": "Unauthorized"
}{
"success": false,
"code": "FORBIDDEN",
"message": "Forbidden"
}{
"success": false,
"code": "RESOURCE_NOT_FOUND",
"message": "Batch not found"
}{
"success": false,
"message": "Batch is no longer a draft and cannot be deleted",
"code": "BATCH_NOT_A_DRAFT"
}{
"success": false,
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error"
}