curl --request POST \
--url https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond \
--header 'Content-Type: application/json' \
--data '
{
"responseDetails": {
"additionalInformation": "<string>",
"feeAmount": 1
}
}
'import requests
url = "https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond"
payload = { "responseDetails": {
"additionalInformation": "<string>",
"feeAmount": 1
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({responseDetails: {additionalInformation: '<string>', feeAmount: 1}})
};
fetch('https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond', 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.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'responseDetails' => [
'additionalInformation' => '<string>',
'feeAmount' => 1
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond"
payload := strings.NewReader("{\n \"responseDetails\": {\n \"additionalInformation\": \"<string>\",\n \"feeAmount\": 1\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond")
.header("Content-Type", "application/json")
.body("{\n \"responseDetails\": {\n \"additionalInformation\": \"<string>\",\n \"feeAmount\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"responseDetails\": {\n \"additionalInformation\": \"<string>\",\n \"feeAmount\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"direction": "OUTBOUND",
"id": 123,
"reason": "DUPL",
"sepaMessageId": "<string>",
"status": "CANCELLATION_CREATED",
"additionalComment": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"externalTransactionReferenceId": 123,
"rejectionAdditionalReason": "<string>",
"rejectionReason": "<string>",
"rejectionSepaMessageId": "<string>",
"returnTransactionId": 123,
"sepaCancellationId": "<string>",
"transactionId": 123
}{
"code": "<string>",
"data": {
"errors": [
{
"code": "<string>",
"field_name": "<string>",
"message": "<string>",
"value": "<string>"
}
],
"message": "<string>"
},
"message": "<string>"
}{
"code": "<string>",
"data": {
"errors": [
{
"code": "<string>",
"field_name": "<string>",
"message": "<string>",
"value": "<string>"
}
],
"message": "<string>"
},
"message": "<string>"
}{
"code": "<string>",
"data": {
"errors": [
{
"code": "<string>",
"field_name": "<string>",
"message": "<string>",
"value": "<string>"
}
],
"message": "<string>"
},
"message": "<string>"
}{
"code": "<string>",
"data": {
"errors": [
{
"code": "<string>",
"field_name": "<string>",
"message": "<string>",
"value": "<string>"
}
],
"message": "<string>"
},
"message": "<string>"
}Respond to cancellation request
Accepts or rejects an inbound cancellation request for a SEPA or SWIFT payment.
curl --request POST \
--url https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond \
--header 'Content-Type: application/json' \
--data '
{
"responseDetails": {
"additionalInformation": "<string>",
"feeAmount": 1
}
}
'import requests
url = "https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond"
payload = { "responseDetails": {
"additionalInformation": "<string>",
"feeAmount": 1
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({responseDetails: {additionalInformation: '<string>', feeAmount: 1}})
};
fetch('https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond', 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.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'responseDetails' => [
'additionalInformation' => '<string>',
'feeAmount' => 1
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond"
payload := strings.NewReader("{\n \"responseDetails\": {\n \"additionalInformation\": \"<string>\",\n \"feeAmount\": 1\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond")
.header("Content-Type", "application/json")
.body("{\n \"responseDetails\": {\n \"additionalInformation\": \"<string>\",\n \"feeAmount\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pgw-sandbox.finventi.com/v3/cancellation-requests/{id}:respond")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"responseDetails\": {\n \"additionalInformation\": \"<string>\",\n \"feeAmount\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"direction": "OUTBOUND",
"id": 123,
"reason": "DUPL",
"sepaMessageId": "<string>",
"status": "CANCELLATION_CREATED",
"additionalComment": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"externalTransactionReferenceId": 123,
"rejectionAdditionalReason": "<string>",
"rejectionReason": "<string>",
"rejectionSepaMessageId": "<string>",
"returnTransactionId": 123,
"sepaCancellationId": "<string>",
"transactionId": 123
}{
"code": "<string>",
"data": {
"errors": [
{
"code": "<string>",
"field_name": "<string>",
"message": "<string>",
"value": "<string>"
}
],
"message": "<string>"
},
"message": "<string>"
}{
"code": "<string>",
"data": {
"errors": [
{
"code": "<string>",
"field_name": "<string>",
"message": "<string>",
"value": "<string>"
}
],
"message": "<string>"
},
"message": "<string>"
}{
"code": "<string>",
"data": {
"errors": [
{
"code": "<string>",
"field_name": "<string>",
"message": "<string>",
"value": "<string>"
}
],
"message": "<string>"
},
"message": "<string>"
}{
"code": "<string>",
"data": {
"errors": [
{
"code": "<string>",
"field_name": "<string>",
"message": "<string>",
"value": "<string>"
}
],
"message": "<string>"
},
"message": "<string>"
}Overview
Answers a cancellation request another bank sent you. One endpoint covers both outcomes: setresponseCode to ACCEPTED to return the funds, or REJECTED to decline.
It is the only way to respond to a SWIFT cancellation request. The v1 endpoints
Accept cancellation request and
Reject cancellation request return
405 ILLEGAL_TRANSACTION_METHOD for SWIFT, and remain available for SEPA Direct Debit.
Scheme coverage
| Schema | Supported |
|---|---|
SEPA (CT and Instant) | Yes |
SWIFT | Yes, once enabled for your tenant |
SDD | No - use the v1 accept and reject endpoints |
T2 | No |
409 UNSUPPORTED_CANCELLATION_SCHEMA.
403 FEATURE_DISABLED. Contact your integration manager to be
switched on.What to send in responseDetails
Which fields you must supply depends on the response code and the schema.
| Field | When to send it |
|---|---|
rejectionReasonCode | Required for a SEPA rejection. Not used for SWIFT |
swiftRejectionReasonCode | Required for a SWIFT rejection. Not used for SEPA |
additionalInformation | Required for a SEPA rejection, 1-1300 characters. Optional for SWIFT and capped at 105 characters, except with reason ARDT, where it must be absent |
feeAmount | Optional when accepting a SEPA request, in minor currency units and non-negative. Must be absent or zero for SWIFT |
Rejecting with ARDT
ARDT says the payment was already returned, and CBPR+ requires the returned payment’s UETR in
additionalInformation - it refuses the camt.029 without one.
The platform supplies it. Send the reason on its own:
{
"responseCode": "REJECTED",
"responseDetails": {
"swiftRejectionReasonCode": "ARDT"
}
}
additionalInformation yourself with ARDT is rejected with
400 VALIDATION_ERROR rather than overridden, so you are never left believing you set a value that
was replaced. The same error means the payment carries no UETR to send.
Every other SWIFT reason code takes additionalInformation as optional free text.
Errors
A 4xx response means the cancellation request is unchanged.| Status | Code | Cause |
|---|---|---|
| 400 | ILLEGAL_CANCELLATION_REQUEST_STATUS | The request is no longer in a state that accepts a response |
| 400 | ILLEGAL_CANCELLATION_REASON | Rejection reason not valid for the derived schema |
| 400 | VALIDATION_ERROR | additionalInformation missing, too long, or sent where not allowed |
| 400 | NEGATIVE_FEE_AMOUNT | feeAmount is below zero |
| 400 | FEE_AMOUNT_GREATER_THAN_OR_EQUAL_TO_TRANSACTION_AMOUNT | feeAmount is not smaller than the payment amount |
| 400 | FEE_NOT_SUPPORTED_FOR_SCHEMA | The derived schema does not accept a fee |
| 400 | CANCELLATION_CHANNEL_BIC_MISSING | The response cannot be addressed - the channel BIC is absent |
| 400 | VALID_RETURN_EXISTS | A return already exists for the payment |
| 400 | ILLEGAL_TRANSACTION_DIRECTION | The payment is not inbound |
| 400 | CANCELLATION_REQUEST_TRANSACTION_NOT_FOUND | The request has no linked payment |
| 403 | FEATURE_DISABLED | Inbound SWIFT cancellation is not enabled for your tenant |
| 404 | CANCELLATION_REQUEST_NOT_FOUND | Unknown cancellation request id |
| 405 | ILLEGAL_TRANSACTION_METHOD | The payment method cannot be handled here |
| 409 | UNSUPPORTED_CANCELLATION_SCHEMA | Responding is not supported for this schema |
Tracking the outcome
Accepting sends a pacs.004 return; rejecting sends a camt.029. Either way, follow the cancellation webhook for the resulting status changes.Path Parameters
Cancellation request ID.
Body
Response code indicating acceptance or rejection of the cancellation request
ACCEPTED, REJECTED Response details; which fields are required depends on the response code and the payment schema
Show child attributes
Show child attributes
Response
Cancellation request response processed
Cancellation request transaction direction.
OUTBOUND, INBOUND Cancellation request ID.
Cancellation request reason.
DUPL, CUST, FRAD, TECH, AC03, AM09, AGNT, COVR, CURR, CUTA, DS24, FRNA, FRTR, INDM, SYAD, UPAY, NARR, AC01, AC04, AC06, AC13, AG01, AG02, AM01, AM04, AM05, CNOR, DNOR, MD01, MD02, MD07, MS02, MS03, RC01, RR01, RR02, RR03, RR04, SL01, BE05, FF01, DT01, ED05, PY01 Cancellation request sepa message ID.
Cancellation request status.
CANCELLATION_CREATED, CANCELLATION_IN_PROGRESS, CANCELLATION_REFUSED, PAYMENT_RETURNED, PROCESSING_FAILED, REFUSING, RETURNING, CANCELLATION_COMPLETED, CANCELLATION_REJECTED, CANCELLATION_ACCEPTED Cancellation request additional comment.
Cancellation request creation date time (ISO-8601 format).
ID of the external transaction reference from cancellation request, if present.
Cancellation request rejection additional reason.
Cancellation request rejection reason.
Cancellation request rejection SEPA message ID.
Cancellation request return transaction ID.
Cancellation request original ID (cxlId).
Cancellation request transaction ID.