curl --request DELETE \
--url https://api.next.orenda.finance/v1/batch-payments/{batchId} \
--header 'Authorization: Bearer <token>'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)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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.next.orenda.finance/v1/batch-payments/{batchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.next.orenda.finance/v1/batch-payments/{batchId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.next.orenda.finance/v1/batch-payments/{batchId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v1/batch-payments/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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>'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)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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.next.orenda.finance/v1/batch-payments/{batchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.next.orenda.finance/v1/batch-payments/{batchId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.next.orenda.finance/v1/batch-payments/{batchId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v1/batch-payments/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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.