cURL
curl --request POST \
--url https://api-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/ \
--header 'Authorization: Bearer <token>' \
--header 'X-Pay-Connect-Integrator-Id: <x-pay-connect-integrator-id>'import requests
url = "https://api-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/"
headers = {
"X-Pay-Connect-Integrator-Id": "<x-pay-connect-integrator-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Pay-Connect-Integrator-Id': '<x-pay-connect-integrator-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/', 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-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/",
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>",
"X-Pay-Connect-Integrator-Id: <x-pay-connect-integrator-id>"
],
]);
$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-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Pay-Connect-Integrator-Id", "<x-pay-connect-integrator-id>")
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-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/")
.header("X-Pay-Connect-Integrator-Id", "<x-pay-connect-integrator-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Pay-Connect-Integrator-Id"] = '<x-pay-connect-integrator-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"operation_id": "<string>",
"transaction_id": "<string>"
}Transaction Operations
Revert operation
The revert operation will be initiated and sent to the terminal.
POST
/
v1
/
pay-connect
/
transaction-operations
/
{transaction_id}
/
revert
/
cURL
curl --request POST \
--url https://api-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/ \
--header 'Authorization: Bearer <token>' \
--header 'X-Pay-Connect-Integrator-Id: <x-pay-connect-integrator-id>'import requests
url = "https://api-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/"
headers = {
"X-Pay-Connect-Integrator-Id": "<x-pay-connect-integrator-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Pay-Connect-Integrator-Id': '<x-pay-connect-integrator-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/', 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-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/",
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>",
"X-Pay-Connect-Integrator-Id: <x-pay-connect-integrator-id>"
],
]);
$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-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Pay-Connect-Integrator-Id", "<x-pay-connect-integrator-id>")
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-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/")
.header("X-Pay-Connect-Integrator-Id", "<x-pay-connect-integrator-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-payment.lab4pay.com/v1/pay-connect/transaction-operations/{transaction_id}/revert/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Pay-Connect-Integrator-Id"] = '<x-pay-connect-integrator-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"operation_id": "<string>",
"transaction_id": "<string>"
}Operation details endpoint have to be used for polling or webhook to confirm the status change.There might be a case where the terminal could not process operation or the transaction was already completed before the terminal received the operation request.
Only the most recent successfully completed transaction can be reverted.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Pay-Connect Integrator ID
Path Parameters
ID of the transaction