Cancel direct debit collection
curl --request POST \
--url https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit', 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/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit"
req, _ := http.NewRequest("POST", 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.post("https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "PENDING_CANCELLATION",
"paymentRequestId": "<string>"
}{
"success": false,
"code": "<string>",
"message": "<string>"
}Payments
Cancel direct debit collection
Customer-initiated refusal of an upcoming SEPA direct debit collection (ClearBank MS02).
POST
/
v1
/
customers
/
{customerId}
/
accounts
/
{accountId}
/
payments
/
requests
/
{paymentRequestId}
/
cancel-direct-debit
Cancel direct debit collection
curl --request POST \
--url https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit', 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/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit"
req, _ := http.NewRequest("POST", 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.post("https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v1/customers/{customerId}/accounts/{accountId}/payments/requests/{paymentRequestId}/cancel-direct-debit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "PENDING_CANCELLATION",
"paymentRequestId": "<string>"
}{
"success": false,
"code": "<string>",
"message": "<string>"
}Use this when the account holder wants to stop a direct debit collection that is
still
Poll payment requests until status is
INITIATED or PENDING (not yet settled). Identify those rows via
isDirectDebit: true on list payment requests
(or ?isDirectDebit=true).
| Response | Meaning |
|---|---|
202 { "status": "PENDING_CANCELLATION", "paymentRequestId": "..." } | Cancel accepted; ClearBank refusal is in flight. |
| 400 | Not found, wrong account, not a DD collection, or invalid path params. |
| 409 | Already terminal, not cancellable, or cutoff passed. |
FAILED (via list API later) | Refusal confirmed — collection will not settle. |
FAILED. If cancel
fails at ClearBank, status may revert to INITIATED or PENDING.
Cutoff: 09:00 Europe/Amsterdam on the collection day (or once collection-day
funding stamps
nonCancellable). After that, cancellation returns 409.
Unfunded collections are refused automatically by the daily scheduler — no
customer cancel needed.Authorizations
The user's id_token from authentication — the ID token, not the access_token. The program and environment come from the token.
Path Parameters
Customer identifier.
Account identifier. The account determines which optional features and limits apply.
⌘I