curl --request POST \
--url https://api.pgw-sandbox.finventi.com/v1/cancellation-requests/{id}:accept \
--header 'Content-Type: application/json' \
--data '{
"feeAmount": 1
}'import requests
url = "https://api.pgw-sandbox.finventi.com/v1/cancellation-requests/{id}:accept"
payload = { "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({feeAmount: 1})
};
fetch('https://api.pgw-sandbox.finventi.com/v1/cancellation-requests/{id}:accept', 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/v1/cancellation-requests/{id}:accept",
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([
'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/v1/cancellation-requests/{id}:accept"
payload := strings.NewReader("{\n \"feeAmount\": 1\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/v1/cancellation-requests/{id}:accept")
.header("Content-Type", "application/json")
.body("{\n \"feeAmount\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pgw-sandbox.finventi.com/v1/cancellation-requests/{id}:accept")
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 \"feeAmount\": 1\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>"
}Accept cancellation request
Accepts a cancellation request by initiating a payment return to the original sender.
curl --request POST \
--url https://api.pgw-sandbox.finventi.com/v1/cancellation-requests/{id}:accept \
--header 'Content-Type: application/json' \
--data '{
"feeAmount": 1
}'import requests
url = "https://api.pgw-sandbox.finventi.com/v1/cancellation-requests/{id}:accept"
payload = { "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({feeAmount: 1})
};
fetch('https://api.pgw-sandbox.finventi.com/v1/cancellation-requests/{id}:accept', 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/v1/cancellation-requests/{id}:accept",
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([
'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/v1/cancellation-requests/{id}:accept"
payload := strings.NewReader("{\n \"feeAmount\": 1\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/v1/cancellation-requests/{id}:accept")
.header("Content-Type", "application/json")
.body("{\n \"feeAmount\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pgw-sandbox.finventi.com/v1/cancellation-requests/{id}:accept")
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 \"feeAmount\": 1\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>"
}Overview
This endpoint accepts a payment cancellation request. The system creates a payment return transaction and sends a PACS.004 message to the original payment initiator.Process Flow
- Validates the cancellation request
- Creates a payment return transaction
- Sends PACS.004 message to the original sender
- Updates the cancellation request status
405 ILLEGAL_TRANSACTION_METHOD.
Use Respond to cancellation request instead.Path Parameters
Cancellation request ID.
Body
Fee amount (minor currency units) charged for cancellation request accept operation.
Must be non-negative and less than transaction's amount.
x >= 0Response
Cancellation request accepted
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.