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": "3f1c9b7e-1f4a-4d2b-9c11-2f8a6b0e4d31"
}Cancel direct debit collection
Customer-initiated refusal (SEPA MS02) of a direct debit collection that is still INITIATED or PENDING. Find those rows with isDirectDebit: true on List payment requests. Available where program.payments.directDebit.sepa is true in GET /v1/capabilities.
| Response | Meaning |
|---|---|
202 { "status": "PENDING_CANCELLATION", "paymentRequestId" } | Cancel accepted; the bank’s refusal is in flight. |
400 | Not found, wrong account, not a DD collection, or invalid path params. |
409 | Already terminal, not cancellable, or the cutoff has passed. |
Poll List payment requests until the status is FAILED, which means the refusal went through. If the cancel fails at the bank the status may revert to INITIATED or PENDING.
Cutoff is 09:00 Europe/Amsterdam on the collection day, or as soon as collection-day funding stamps nonCancellable. After that, cancellation returns 409. Unfunded collections are refused automatically by the daily scheduler; no customer cancel is needed.
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": "3f1c9b7e-1f4a-4d2b-9c11-2f8a6b0e4d31"
}Authorizations
The user's access_token from authentication. The program and environment come from the token.
Path Parameters
Customer identifier.
Account identifier. The account determines which optional features and limits apply.
Response
Cancel accepted; the refusal is in flight. This route answers with the bare object below: no success/data envelope. Poll List payment requests until the row is FAILED.