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"
}{
"success": false,
"code": "UNAUTHORIZED",
"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"
}Delete a draft
Withdraws a batch that was prepared but never submitted. The draft is removed — it 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 submitted has money in flight behind it and cannot be deleted through this call — it returns 409. An expired draft can still be deleted; that is how lapsed drafts are cleared out.
Not idempotent. Once the draft is gone there is nothing left to recognise, so a repeated delete returns 404 rather than a second success.
You can only delete a draft you can open. A draft belonging to someone else is refused as if it did not exist.
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"
}{
"success": false,
"code": "UNAUTHORIZED",
"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"
}Authorizations
The caller's id_token from authentication — the ID token, not the access_token. The program and environment come from the token.
Path Parameters
The draft's batchId, from verify or the drafts listing.