Process Transaction
curl --request POST \
--url https://service.pcibooking.net/api/paymentGateway \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"cardToken": "<string>",
"OperationType": "<string>",
"Amount": 123,
"Currency": "<string>",
"PaymentGateway": {
"PaymentGateway.Name": "<string>",
"PaymentGateway.Credentials": {}
},
"GatewayReference": "<string>",
"GatewayToken": "<string>",
"myRef": "<string>",
"GenerateToken": true,
"ThreeDS": true,
"Parameters": {},
"PayerDetails": {
"PayerDetails.FirstName": "<string>",
"PayerDetails.LastName": "<string>",
"PayerDetails.Email": "<string>",
"PayerDetails.Phone": "<string>",
"PayerDetails.Address1": "<string>",
"PayerDetails.Address2": "<string>",
"PayerDetails.Address3": "<string>",
"PayerDetails.City": "<string>",
"PayerDetails.StateProvince": "<string>",
"PayerDetails.PostCode": "<string>",
"PayerDetails.CountryCode": "<string>",
"PayerDetails.ClientIPAddress": "<string>"
},
"OrderDesc": "<string>",
"IsDigital": true,
"FallbackUpgs": [
{
"FallbackUpgs[].PaymentGatewayAccountName": "<string>",
"FallbackUpgs[].PaymentGatewayCertName": "<string>"
}
],
"Status": "<string>",
"TransactionID": "<string>",
"AuthorizationCode": "<string>",
"GatewayDescription": "<string>",
"AcquirerDescription": "<string>"
}
'import requests
url = "https://service.pcibooking.net/api/paymentGateway"
payload = {
"cardToken": "<string>",
"OperationType": "<string>",
"Amount": 123,
"Currency": "<string>",
"PaymentGateway": {
"PaymentGateway.Name": "<string>",
"PaymentGateway.Credentials": {}
},
"GatewayReference": "<string>",
"GatewayToken": "<string>",
"myRef": "<string>",
"GenerateToken": True,
"ThreeDS": True,
"Parameters": {},
"PayerDetails": {
"PayerDetails.FirstName": "<string>",
"PayerDetails.LastName": "<string>",
"PayerDetails.Email": "<string>",
"PayerDetails.Phone": "<string>",
"PayerDetails.Address1": "<string>",
"PayerDetails.Address2": "<string>",
"PayerDetails.Address3": "<string>",
"PayerDetails.City": "<string>",
"PayerDetails.StateProvince": "<string>",
"PayerDetails.PostCode": "<string>",
"PayerDetails.CountryCode": "<string>",
"PayerDetails.ClientIPAddress": "<string>"
},
"OrderDesc": "<string>",
"IsDigital": True,
"FallbackUpgs": [
{
"FallbackUpgs[].PaymentGatewayAccountName": "<string>",
"FallbackUpgs[].PaymentGatewayCertName": "<string>"
}
],
"Status": "<string>",
"TransactionID": "<string>",
"AuthorizationCode": "<string>",
"GatewayDescription": "<string>",
"AcquirerDescription": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cardToken: '<string>',
OperationType: '<string>',
Amount: 123,
Currency: '<string>',
PaymentGateway: {'PaymentGateway.Name': '<string>', 'PaymentGateway.Credentials': {}},
GatewayReference: '<string>',
GatewayToken: '<string>',
myRef: '<string>',
GenerateToken: true,
ThreeDS: true,
Parameters: {},
PayerDetails: {
'PayerDetails.FirstName': '<string>',
'PayerDetails.LastName': '<string>',
'PayerDetails.Email': '<string>',
'PayerDetails.Phone': '<string>',
'PayerDetails.Address1': '<string>',
'PayerDetails.Address2': '<string>',
'PayerDetails.Address3': '<string>',
'PayerDetails.City': '<string>',
'PayerDetails.StateProvince': '<string>',
'PayerDetails.PostCode': '<string>',
'PayerDetails.CountryCode': '<string>',
'PayerDetails.ClientIPAddress': '<string>'
},
OrderDesc: '<string>',
IsDigital: true,
FallbackUpgs: [
{
'FallbackUpgs[].PaymentGatewayAccountName': '<string>',
'FallbackUpgs[].PaymentGatewayCertName': '<string>'
}
],
Status: '<string>',
TransactionID: '<string>',
AuthorizationCode: '<string>',
GatewayDescription: '<string>',
AcquirerDescription: '<string>'
})
};
fetch('https://service.pcibooking.net/api/paymentGateway', 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://service.pcibooking.net/api/paymentGateway",
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([
'cardToken' => '<string>',
'OperationType' => '<string>',
'Amount' => 123,
'Currency' => '<string>',
'PaymentGateway' => [
'PaymentGateway.Name' => '<string>',
'PaymentGateway.Credentials' => [
]
],
'GatewayReference' => '<string>',
'GatewayToken' => '<string>',
'myRef' => '<string>',
'GenerateToken' => true,
'ThreeDS' => true,
'Parameters' => [
],
'PayerDetails' => [
'PayerDetails.FirstName' => '<string>',
'PayerDetails.LastName' => '<string>',
'PayerDetails.Email' => '<string>',
'PayerDetails.Phone' => '<string>',
'PayerDetails.Address1' => '<string>',
'PayerDetails.Address2' => '<string>',
'PayerDetails.Address3' => '<string>',
'PayerDetails.City' => '<string>',
'PayerDetails.StateProvince' => '<string>',
'PayerDetails.PostCode' => '<string>',
'PayerDetails.CountryCode' => '<string>',
'PayerDetails.ClientIPAddress' => '<string>'
],
'OrderDesc' => '<string>',
'IsDigital' => true,
'FallbackUpgs' => [
[
'FallbackUpgs[].PaymentGatewayAccountName' => '<string>',
'FallbackUpgs[].PaymentGatewayCertName' => '<string>'
]
],
'Status' => '<string>',
'TransactionID' => '<string>',
'AuthorizationCode' => '<string>',
'GatewayDescription' => '<string>',
'AcquirerDescription' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://service.pcibooking.net/api/paymentGateway"
payload := strings.NewReader("{\n \"cardToken\": \"<string>\",\n \"OperationType\": \"<string>\",\n \"Amount\": 123,\n \"Currency\": \"<string>\",\n \"PaymentGateway\": {\n \"PaymentGateway.Name\": \"<string>\",\n \"PaymentGateway.Credentials\": {}\n },\n \"GatewayReference\": \"<string>\",\n \"GatewayToken\": \"<string>\",\n \"myRef\": \"<string>\",\n \"GenerateToken\": true,\n \"ThreeDS\": true,\n \"Parameters\": {},\n \"PayerDetails\": {\n \"PayerDetails.FirstName\": \"<string>\",\n \"PayerDetails.LastName\": \"<string>\",\n \"PayerDetails.Email\": \"<string>\",\n \"PayerDetails.Phone\": \"<string>\",\n \"PayerDetails.Address1\": \"<string>\",\n \"PayerDetails.Address2\": \"<string>\",\n \"PayerDetails.Address3\": \"<string>\",\n \"PayerDetails.City\": \"<string>\",\n \"PayerDetails.StateProvince\": \"<string>\",\n \"PayerDetails.PostCode\": \"<string>\",\n \"PayerDetails.CountryCode\": \"<string>\",\n \"PayerDetails.ClientIPAddress\": \"<string>\"\n },\n \"OrderDesc\": \"<string>\",\n \"IsDigital\": true,\n \"FallbackUpgs\": [\n {\n \"FallbackUpgs[].PaymentGatewayAccountName\": \"<string>\",\n \"FallbackUpgs[].PaymentGatewayCertName\": \"<string>\"\n }\n ],\n \"Status\": \"<string>\",\n \"TransactionID\": \"<string>\",\n \"AuthorizationCode\": \"<string>\",\n \"GatewayDescription\": \"<string>\",\n \"AcquirerDescription\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://service.pcibooking.net/api/paymentGateway")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"cardToken\": \"<string>\",\n \"OperationType\": \"<string>\",\n \"Amount\": 123,\n \"Currency\": \"<string>\",\n \"PaymentGateway\": {\n \"PaymentGateway.Name\": \"<string>\",\n \"PaymentGateway.Credentials\": {}\n },\n \"GatewayReference\": \"<string>\",\n \"GatewayToken\": \"<string>\",\n \"myRef\": \"<string>\",\n \"GenerateToken\": true,\n \"ThreeDS\": true,\n \"Parameters\": {},\n \"PayerDetails\": {\n \"PayerDetails.FirstName\": \"<string>\",\n \"PayerDetails.LastName\": \"<string>\",\n \"PayerDetails.Email\": \"<string>\",\n \"PayerDetails.Phone\": \"<string>\",\n \"PayerDetails.Address1\": \"<string>\",\n \"PayerDetails.Address2\": \"<string>\",\n \"PayerDetails.Address3\": \"<string>\",\n \"PayerDetails.City\": \"<string>\",\n \"PayerDetails.StateProvince\": \"<string>\",\n \"PayerDetails.PostCode\": \"<string>\",\n \"PayerDetails.CountryCode\": \"<string>\",\n \"PayerDetails.ClientIPAddress\": \"<string>\"\n },\n \"OrderDesc\": \"<string>\",\n \"IsDigital\": true,\n \"FallbackUpgs\": [\n {\n \"FallbackUpgs[].PaymentGatewayAccountName\": \"<string>\",\n \"FallbackUpgs[].PaymentGatewayCertName\": \"<string>\"\n }\n ],\n \"Status\": \"<string>\",\n \"TransactionID\": \"<string>\",\n \"AuthorizationCode\": \"<string>\",\n \"GatewayDescription\": \"<string>\",\n \"AcquirerDescription\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.pcibooking.net/api/paymentGateway")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardToken\": \"<string>\",\n \"OperationType\": \"<string>\",\n \"Amount\": 123,\n \"Currency\": \"<string>\",\n \"PaymentGateway\": {\n \"PaymentGateway.Name\": \"<string>\",\n \"PaymentGateway.Credentials\": {}\n },\n \"GatewayReference\": \"<string>\",\n \"GatewayToken\": \"<string>\",\n \"myRef\": \"<string>\",\n \"GenerateToken\": true,\n \"ThreeDS\": true,\n \"Parameters\": {},\n \"PayerDetails\": {\n \"PayerDetails.FirstName\": \"<string>\",\n \"PayerDetails.LastName\": \"<string>\",\n \"PayerDetails.Email\": \"<string>\",\n \"PayerDetails.Phone\": \"<string>\",\n \"PayerDetails.Address1\": \"<string>\",\n \"PayerDetails.Address2\": \"<string>\",\n \"PayerDetails.Address3\": \"<string>\",\n \"PayerDetails.City\": \"<string>\",\n \"PayerDetails.StateProvince\": \"<string>\",\n \"PayerDetails.PostCode\": \"<string>\",\n \"PayerDetails.CountryCode\": \"<string>\",\n \"PayerDetails.ClientIPAddress\": \"<string>\"\n },\n \"OrderDesc\": \"<string>\",\n \"IsDigital\": true,\n \"FallbackUpgs\": [\n {\n \"FallbackUpgs[].PaymentGatewayAccountName\": \"<string>\",\n \"FallbackUpgs[].PaymentGatewayCertName\": \"<string>\"\n }\n ],\n \"Status\": \"<string>\",\n \"TransactionID\": \"<string>\",\n \"AuthorizationCode\": \"<string>\",\n \"GatewayDescription\": \"<string>\",\n \"AcquirerDescription\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"Status": "Success",
"TransactionID": "txn_abc123",
"AuthorizationCode": "AUTH456",
"GatewayDescription": "Approved",
"AcquirerDescription": "Transaction approved"
}
{
"Status": "Rejected",
"TransactionID": "txn_abc123",
"GatewayDescription": "Insufficient funds",
"AcquirerDescription": "51 - Insufficient Funds"
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
Payment Gateway
Process Transaction
Process a payment gateway transaction using a stored card token.
POST
/
api
/
paymentGateway
Process Transaction
curl --request POST \
--url https://service.pcibooking.net/api/paymentGateway \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"cardToken": "<string>",
"OperationType": "<string>",
"Amount": 123,
"Currency": "<string>",
"PaymentGateway": {
"PaymentGateway.Name": "<string>",
"PaymentGateway.Credentials": {}
},
"GatewayReference": "<string>",
"GatewayToken": "<string>",
"myRef": "<string>",
"GenerateToken": true,
"ThreeDS": true,
"Parameters": {},
"PayerDetails": {
"PayerDetails.FirstName": "<string>",
"PayerDetails.LastName": "<string>",
"PayerDetails.Email": "<string>",
"PayerDetails.Phone": "<string>",
"PayerDetails.Address1": "<string>",
"PayerDetails.Address2": "<string>",
"PayerDetails.Address3": "<string>",
"PayerDetails.City": "<string>",
"PayerDetails.StateProvince": "<string>",
"PayerDetails.PostCode": "<string>",
"PayerDetails.CountryCode": "<string>",
"PayerDetails.ClientIPAddress": "<string>"
},
"OrderDesc": "<string>",
"IsDigital": true,
"FallbackUpgs": [
{
"FallbackUpgs[].PaymentGatewayAccountName": "<string>",
"FallbackUpgs[].PaymentGatewayCertName": "<string>"
}
],
"Status": "<string>",
"TransactionID": "<string>",
"AuthorizationCode": "<string>",
"GatewayDescription": "<string>",
"AcquirerDescription": "<string>"
}
'import requests
url = "https://service.pcibooking.net/api/paymentGateway"
payload = {
"cardToken": "<string>",
"OperationType": "<string>",
"Amount": 123,
"Currency": "<string>",
"PaymentGateway": {
"PaymentGateway.Name": "<string>",
"PaymentGateway.Credentials": {}
},
"GatewayReference": "<string>",
"GatewayToken": "<string>",
"myRef": "<string>",
"GenerateToken": True,
"ThreeDS": True,
"Parameters": {},
"PayerDetails": {
"PayerDetails.FirstName": "<string>",
"PayerDetails.LastName": "<string>",
"PayerDetails.Email": "<string>",
"PayerDetails.Phone": "<string>",
"PayerDetails.Address1": "<string>",
"PayerDetails.Address2": "<string>",
"PayerDetails.Address3": "<string>",
"PayerDetails.City": "<string>",
"PayerDetails.StateProvince": "<string>",
"PayerDetails.PostCode": "<string>",
"PayerDetails.CountryCode": "<string>",
"PayerDetails.ClientIPAddress": "<string>"
},
"OrderDesc": "<string>",
"IsDigital": True,
"FallbackUpgs": [
{
"FallbackUpgs[].PaymentGatewayAccountName": "<string>",
"FallbackUpgs[].PaymentGatewayCertName": "<string>"
}
],
"Status": "<string>",
"TransactionID": "<string>",
"AuthorizationCode": "<string>",
"GatewayDescription": "<string>",
"AcquirerDescription": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cardToken: '<string>',
OperationType: '<string>',
Amount: 123,
Currency: '<string>',
PaymentGateway: {'PaymentGateway.Name': '<string>', 'PaymentGateway.Credentials': {}},
GatewayReference: '<string>',
GatewayToken: '<string>',
myRef: '<string>',
GenerateToken: true,
ThreeDS: true,
Parameters: {},
PayerDetails: {
'PayerDetails.FirstName': '<string>',
'PayerDetails.LastName': '<string>',
'PayerDetails.Email': '<string>',
'PayerDetails.Phone': '<string>',
'PayerDetails.Address1': '<string>',
'PayerDetails.Address2': '<string>',
'PayerDetails.Address3': '<string>',
'PayerDetails.City': '<string>',
'PayerDetails.StateProvince': '<string>',
'PayerDetails.PostCode': '<string>',
'PayerDetails.CountryCode': '<string>',
'PayerDetails.ClientIPAddress': '<string>'
},
OrderDesc: '<string>',
IsDigital: true,
FallbackUpgs: [
{
'FallbackUpgs[].PaymentGatewayAccountName': '<string>',
'FallbackUpgs[].PaymentGatewayCertName': '<string>'
}
],
Status: '<string>',
TransactionID: '<string>',
AuthorizationCode: '<string>',
GatewayDescription: '<string>',
AcquirerDescription: '<string>'
})
};
fetch('https://service.pcibooking.net/api/paymentGateway', 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://service.pcibooking.net/api/paymentGateway",
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([
'cardToken' => '<string>',
'OperationType' => '<string>',
'Amount' => 123,
'Currency' => '<string>',
'PaymentGateway' => [
'PaymentGateway.Name' => '<string>',
'PaymentGateway.Credentials' => [
]
],
'GatewayReference' => '<string>',
'GatewayToken' => '<string>',
'myRef' => '<string>',
'GenerateToken' => true,
'ThreeDS' => true,
'Parameters' => [
],
'PayerDetails' => [
'PayerDetails.FirstName' => '<string>',
'PayerDetails.LastName' => '<string>',
'PayerDetails.Email' => '<string>',
'PayerDetails.Phone' => '<string>',
'PayerDetails.Address1' => '<string>',
'PayerDetails.Address2' => '<string>',
'PayerDetails.Address3' => '<string>',
'PayerDetails.City' => '<string>',
'PayerDetails.StateProvince' => '<string>',
'PayerDetails.PostCode' => '<string>',
'PayerDetails.CountryCode' => '<string>',
'PayerDetails.ClientIPAddress' => '<string>'
],
'OrderDesc' => '<string>',
'IsDigital' => true,
'FallbackUpgs' => [
[
'FallbackUpgs[].PaymentGatewayAccountName' => '<string>',
'FallbackUpgs[].PaymentGatewayCertName' => '<string>'
]
],
'Status' => '<string>',
'TransactionID' => '<string>',
'AuthorizationCode' => '<string>',
'GatewayDescription' => '<string>',
'AcquirerDescription' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://service.pcibooking.net/api/paymentGateway"
payload := strings.NewReader("{\n \"cardToken\": \"<string>\",\n \"OperationType\": \"<string>\",\n \"Amount\": 123,\n \"Currency\": \"<string>\",\n \"PaymentGateway\": {\n \"PaymentGateway.Name\": \"<string>\",\n \"PaymentGateway.Credentials\": {}\n },\n \"GatewayReference\": \"<string>\",\n \"GatewayToken\": \"<string>\",\n \"myRef\": \"<string>\",\n \"GenerateToken\": true,\n \"ThreeDS\": true,\n \"Parameters\": {},\n \"PayerDetails\": {\n \"PayerDetails.FirstName\": \"<string>\",\n \"PayerDetails.LastName\": \"<string>\",\n \"PayerDetails.Email\": \"<string>\",\n \"PayerDetails.Phone\": \"<string>\",\n \"PayerDetails.Address1\": \"<string>\",\n \"PayerDetails.Address2\": \"<string>\",\n \"PayerDetails.Address3\": \"<string>\",\n \"PayerDetails.City\": \"<string>\",\n \"PayerDetails.StateProvince\": \"<string>\",\n \"PayerDetails.PostCode\": \"<string>\",\n \"PayerDetails.CountryCode\": \"<string>\",\n \"PayerDetails.ClientIPAddress\": \"<string>\"\n },\n \"OrderDesc\": \"<string>\",\n \"IsDigital\": true,\n \"FallbackUpgs\": [\n {\n \"FallbackUpgs[].PaymentGatewayAccountName\": \"<string>\",\n \"FallbackUpgs[].PaymentGatewayCertName\": \"<string>\"\n }\n ],\n \"Status\": \"<string>\",\n \"TransactionID\": \"<string>\",\n \"AuthorizationCode\": \"<string>\",\n \"GatewayDescription\": \"<string>\",\n \"AcquirerDescription\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://service.pcibooking.net/api/paymentGateway")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"cardToken\": \"<string>\",\n \"OperationType\": \"<string>\",\n \"Amount\": 123,\n \"Currency\": \"<string>\",\n \"PaymentGateway\": {\n \"PaymentGateway.Name\": \"<string>\",\n \"PaymentGateway.Credentials\": {}\n },\n \"GatewayReference\": \"<string>\",\n \"GatewayToken\": \"<string>\",\n \"myRef\": \"<string>\",\n \"GenerateToken\": true,\n \"ThreeDS\": true,\n \"Parameters\": {},\n \"PayerDetails\": {\n \"PayerDetails.FirstName\": \"<string>\",\n \"PayerDetails.LastName\": \"<string>\",\n \"PayerDetails.Email\": \"<string>\",\n \"PayerDetails.Phone\": \"<string>\",\n \"PayerDetails.Address1\": \"<string>\",\n \"PayerDetails.Address2\": \"<string>\",\n \"PayerDetails.Address3\": \"<string>\",\n \"PayerDetails.City\": \"<string>\",\n \"PayerDetails.StateProvince\": \"<string>\",\n \"PayerDetails.PostCode\": \"<string>\",\n \"PayerDetails.CountryCode\": \"<string>\",\n \"PayerDetails.ClientIPAddress\": \"<string>\"\n },\n \"OrderDesc\": \"<string>\",\n \"IsDigital\": true,\n \"FallbackUpgs\": [\n {\n \"FallbackUpgs[].PaymentGatewayAccountName\": \"<string>\",\n \"FallbackUpgs[].PaymentGatewayCertName\": \"<string>\"\n }\n ],\n \"Status\": \"<string>\",\n \"TransactionID\": \"<string>\",\n \"AuthorizationCode\": \"<string>\",\n \"GatewayDescription\": \"<string>\",\n \"AcquirerDescription\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.pcibooking.net/api/paymentGateway")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardToken\": \"<string>\",\n \"OperationType\": \"<string>\",\n \"Amount\": 123,\n \"Currency\": \"<string>\",\n \"PaymentGateway\": {\n \"PaymentGateway.Name\": \"<string>\",\n \"PaymentGateway.Credentials\": {}\n },\n \"GatewayReference\": \"<string>\",\n \"GatewayToken\": \"<string>\",\n \"myRef\": \"<string>\",\n \"GenerateToken\": true,\n \"ThreeDS\": true,\n \"Parameters\": {},\n \"PayerDetails\": {\n \"PayerDetails.FirstName\": \"<string>\",\n \"PayerDetails.LastName\": \"<string>\",\n \"PayerDetails.Email\": \"<string>\",\n \"PayerDetails.Phone\": \"<string>\",\n \"PayerDetails.Address1\": \"<string>\",\n \"PayerDetails.Address2\": \"<string>\",\n \"PayerDetails.Address3\": \"<string>\",\n \"PayerDetails.City\": \"<string>\",\n \"PayerDetails.StateProvince\": \"<string>\",\n \"PayerDetails.PostCode\": \"<string>\",\n \"PayerDetails.CountryCode\": \"<string>\",\n \"PayerDetails.ClientIPAddress\": \"<string>\"\n },\n \"OrderDesc\": \"<string>\",\n \"IsDigital\": true,\n \"FallbackUpgs\": [\n {\n \"FallbackUpgs[].PaymentGatewayAccountName\": \"<string>\",\n \"FallbackUpgs[].PaymentGatewayCertName\": \"<string>\"\n }\n ],\n \"Status\": \"<string>\",\n \"TransactionID\": \"<string>\",\n \"AuthorizationCode\": \"<string>\",\n \"GatewayDescription\": \"<string>\",\n \"AcquirerDescription\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"Status": "Success",
"TransactionID": "txn_abc123",
"AuthorizationCode": "AUTH456",
"GatewayDescription": "Approved",
"AcquirerDescription": "Transaction approved"
}
{
"Status": "Rejected",
"TransactionID": "txn_abc123",
"GatewayDescription": "Insufficient funds",
"AcquirerDescription": "51 - Insufficient Funds"
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
Processing Charges Guide
Process payments using stored tokens
Some payment gateways have additional requirements. Review the gateway-specific guidance before sending your first transaction.
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
-1003 | 401 | API key is missing or invalid. |
-1003 | 401 | The token does not belong to the authenticated user. |
-125 | 400 | Request body could not be parsed as JSON. |
-125 | 400 | Missing cardToken when the operation requires card data and no GatewayToken is provided. |
-125 | 400 | Invalid or malformed cardToken URI. |
-125 | 400 | Missing Amount for operations other than Void and Tokenize. |
-125 | 400 | Missing GatewayReference when OperationType is Refund. |
-125 | 400 | The credentialsId was provided but the credentials were not found or could not be parsed. |
-125 | 400 | The PaymentGateway JSON section could not be parsed. |
-125 | 400 | The payment gateway does not support network tokens, but a network token brand was provided. |
-125 | 400 | Client certificate name was provided but the certificate could not be retrieved. |
-150 | 500 | Failed to retrieve the bank card data from the vault. |
Error detail
Each condition below gives the exactmoreInfo text, why it happens and how to resolve it. The full set is on the Error Handling page.
-125 Bad input data - request object could not be parsed
-125 Bad input data - request object could not be parsed
HTTP status: Reason. The body could not be deserialised into the object the endpoint expects, so no field level validation ran. A single malformed field or a wrong container type is enough.How to resolve.
400message: Bad input datamoreInfo:Request object could not be parsed
- Validate the body against the endpoint’s schema before sending.
- Check for a value sent as the wrong type, most often a number sent as a string or an object sent where an array is expected.
- Check
Content-Typematches the body format.
-125 Bad input data - card or token missing from the request
-125 Bad input data - card or token missing from the request
HTTP status: Reason. The transaction carried no card to charge. Either the card object is absent, or the
400message: Bad input datamoreInfo:Missing Card object
Missing CardToken property
Bad or Missing CardToken property
CardToken property is missing or not a readable token URI.How to resolve.- Send exactly one of a card object or a
CardToken, as the endpoint requires. - Pass the full token URI, not the bare 32-hex token, unless the endpoint documents otherwise.
- Check the property name and its capitalisation against the endpoint reference.
-125 Bad input data - required transaction field missing
-125 Bad input data - required transaction field missing
HTTP status: Reason. A field the operation cannot run without was absent. Which field is required depends on the operation: a capture or refund needs the
400message: Bad input datamoreInfo:Missing amount property
Missing GatewayReference property
GatewayReference of the original authorisation, and an amount is required wherever money moves.How to resolve.- Add the field named in
moreInfo. - For a capture, refund or void, send the
GatewayReferencereturned by the original transaction rather than your own reference. - Send the amount in the units the gateway expects, and check whether it takes minor units.
-125 Bad input data - client certificate unavailable
-125 Bad input data - client certificate unavailable
HTTP status: Reason. The profile or gateway configuration names a client certificate for mutual TLS, but it could not be loaded. This is a configuration problem on the account, not a fault in your request.How to resolve.
400message: Bad input datamoreInfo:Cannot obtain client certificate
- Check the certificate is uploaded against the account and the profile names it exactly.
- Check the certificate has not expired.
- Contact support with the profile name if both look correct. Certificate installation is done on the PCI Booking side.
-160 Uri not found - token does not exist or was deleted
-160 Uri not found - token does not exist or was deleted
HTTP status: Reason. The token is well formed but no card is stored against it. Either it never existed, or it was deleted. Deletion is permanent and cannot be undone.How to resolve.
404message: Uri not foundmoreInfo:The provided card token does not exist or was already deleted
Token not found
- Confirm the tokenization call that should have created it returned success and returned this exact token.
- Check whether the token was deleted, either explicitly or by a CVV retention policy configured to delete the card on cleanup.
- Check the environment. A token from one environment is not visible in the other.
Some endpoints report a deleted token as
-1003 rather than -160. Treat the two as the same investigation and start with whether the token still exists.-1003 You are not authorized to access this resource - token exists but is not yours to use
-1003 You are not authorized to access this resource - token exists but is not yours to use
HTTP status: Reason. The credential authenticated fine, but it is not allowed to act on the token in the request. The generic wording makes this the single most misread error in the API. On a token call it is far more often one of the causes below than an actual permissions problem.How to resolve.
401message: You are not authorized to access this resource. Please contact customer support.moreInfo: one of the following, depending on which check failed:User is not the owner of this bank card
Merchant or Owner are not associated with bank card [<token>] userID: <userId>
User <userId> is not associated with bank card [<token>]
- Check the token was not deleted. This is the most common cause. Deletion is permanent, and every later call on that token returns
-1003rather than a not-found error. Support can confirm when and by which user a token was deleted. - Check the tokenization actually succeeded. If the call that should have created the token failed, the token never existed, and the first call that uses it reports
-1003. - Check the environment. A sandbox token cannot be used from production, or the reverse.
- Check ownership and association. See the rules below.
- At tokenization, by passing
merchantIdon the tokenizing call. - After tokenization, by associating the token with the merchant.
- An association can only target a primary account. If you pass the ID of a sub-user or a secondary property, the request is rejected and you must associate the token with the parent account instead.
- Tokens never cross environments. A token created in sandbox cannot be used from production, and the reverse is also true.
-1003 even though the credentials are still valid and can still sign in to the portal. The response carries no moreInfo explaining this, so it is indistinguishable from a permissions failure by looking at the response alone.This is a common cause on sandbox accounts, which have a lower allowance than production.Check for it when -1003 appears suddenly across calls that used to work, on more than one token. A block affects every billable call on the account at once, whereas a genuine ownership problem affects only the specific token. Contact support with your account name to have the allowance reviewed and the block lifted.Parameter Constraints
- OperationType: Must be one of
Charge,PreAuth,Capture,Void,Refund,Tokenize. - Amount: Required for all operations except
VoidandTokenize. - GatewayReference: Required for
Refundoperations. - cardToken: Required when the operation needs card data and no
GatewayTokenis provided. Must be a valid PCI Booking token URI containing a 32-character hex token. - credentialsId or PaymentGateway object: One must be provided. If using
credentialsId, the credentials must already be stored.
Parameters
Headers
string
required
Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. See the Authentication guide.Query String
string
The ID of credentials stored in PCI Booking. When provided, omit the
PaymentGateway object from the request body.string
The name of a client certificate to use for gateway authentication, if required by the gateway.
Request Body
string
The PCI Booking card token URI, received during tokenization.
string
required
The operation to perform. One of:
Charge, PreAuth, Capture, Void, Refund, Tokenize.number
The transaction amount. Required for all operations except
Void and Tokenize.string
ISO 4217 currency code (e.g.
USD, EUR). Required for all operations except Void and Tokenize.object
The payment gateway name and credentials. Not required if
credentialsId is provided.Show Properties
Show Properties
string
required
The payment gateway name (e.g.
Stripe, Adyen, Worldpay). See supported gateways.object
required
Gateway-specific credential key-value pairs. See gateway guidance for required credentials per gateway.
string
The transaction ID of a prior operation. Required for
Capture (reference the PreAuth), Refund (reference the Charge or Capture), and Void (reference the operation to void).string
A token previously generated by the payment gateway. When provided, PCI Booking uses this gateway token instead of the card token for the transaction.
string
Your own reference for this transaction. Some gateways have specific format requirements. See gateway guidance.
boolean
default:"false"
For
Charge and PreAuth operations, additionally generates a token from the payment gateway. The gateway token is returned in the response.boolean
default:"true"
Whether to include the token’s stored 3DS authentication data (if any) in the request to the PSP, for PSPs that support it - see 3D Secure and the UPG. This does not trigger a new 3DS challenge; it only controls whether existing 3DS data on the token is forwarded. Set to
false to charge without forwarding 3DS data even if the token has it.object
Gateway-specific parameters as key-value pairs. These are passed through to the payment gateway. See gateway guidance for supported parameters per gateway.
Payer and Order Details
object
Details about the customer being charged. Some gateways require specific payer fields.
Show Properties
Show Properties
string
Customer’s first name.
string
Customer’s last name.
string
Customer’s email address.
string
Customer’s phone number.
string
Billing address line 1.
string
Billing address line 2.
string
Billing address line 3.
string
Billing city.
string
Billing state or province.
string
Billing postal code.
string
ISO 3166-1 alpha-2 country code (e.g.
US, GB).string
Customer’s IP address. Required by some gateways for fraud screening.
string
Order description. Used by specific payment gateways. See gateway guidance for details.
boolean
Indicates digital goods. Used by specific gateways (e.g. WorldPay).
Fallback Routing
array
Request Example
ACharge operation for $150.00 USD, using inline gateway credentials:
- curl
- Node.js
- Python
curl -X POST "https://service.pcibooking.net/api/paymentGateway" \
-H "Authorization: APIKEY your-api-key" \
-H "Content-Type: application/json" \
-d '{
"cardToken": "https://service.pcibooking.net/api/payments/paycard/555fd7b49f134b42a5dbe4d576b2e527",
"OperationType": "Charge",
"Amount": 150.00,
"Currency": "USD",
"PaymentGateway": {
"Name": "Stripe",
"Credentials": {
"SecretKey": "sk_test_abc123"
}
},
"myRef": "order-98765",
"PayerDetails": {
"FirstName": "Jane",
"LastName": "Smith",
"Email": "jane.smith@example.com"
}
}'
const response = await fetch("https://service.pcibooking.net/api/paymentGateway", {
method: "POST",
headers: {
"Authorization": "APIKEY your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
cardToken: "https://service.pcibooking.net/api/payments/paycard/555fd7b49f134b42a5dbe4d576b2e527",
OperationType: "Charge",
Amount: 150.00,
Currency: "USD",
PaymentGateway: {
Name: "Stripe",
Credentials: {
SecretKey: "sk_test_abc123"
}
},
myRef: "order-98765",
PayerDetails: {
FirstName: "Jane",
LastName: "Smith",
Email: "jane.smith@example.com"
}
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://service.pcibooking.net/api/paymentGateway",
headers={
"Authorization": "APIKEY your-api-key",
"Content-Type": "application/json"
},
json={
"cardToken": "https://service.pcibooking.net/api/payments/paycard/555fd7b49f134b42a5dbe4d576b2e527",
"OperationType": "Charge",
"Amount": 150.00,
"Currency": "USD",
"PaymentGateway": {
"Name": "Stripe",
"Credentials": {
"SecretKey": "sk_test_abc123"
}
},
"myRef": "order-98765",
"PayerDetails": {
"FirstName": "Jane",
"LastName": "Smith",
"Email": "jane.smith@example.com"
}
}
)
print(response.json())
credentialsId query parameter and omit the PaymentGateway object:
- curl
- Node.js
- Python
curl -X POST "https://service.pcibooking.net/api/paymentGateway?credentialsId=my-stripe-prod" \
-H "Authorization: APIKEY your-api-key" \
-H "Content-Type: application/json" \
-d '{
"cardToken": "https://service.pcibooking.net/api/payments/paycard/555fd7b49f134b42a5dbe4d576b2e527",
"OperationType": "Charge",
"Amount": 150.00,
"Currency": "USD",
"myRef": "order-98765"
}'
const response = await fetch(
"https://service.pcibooking.net/api/paymentGateway?credentialsId=my-stripe-prod",
{
method: "POST",
headers: {
"Authorization": "APIKEY your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
cardToken: "https://service.pcibooking.net/api/payments/paycard/555fd7b49f134b42a5dbe4d576b2e527",
OperationType: "Charge",
Amount: 150.00,
Currency: "USD",
myRef: "order-98765"
})
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://service.pcibooking.net/api/paymentGateway",
params={"credentialsId": "my-stripe-prod"},
headers={
"Authorization": "APIKEY your-api-key",
"Content-Type": "application/json"
},
json={
"cardToken": "https://service.pcibooking.net/api/payments/paycard/555fd7b49f134b42a5dbe4d576b2e527",
"OperationType": "Charge",
"Amount": 150.00,
"Currency": "USD",
"myRef": "order-98765"
}
)
print(response.json())
Response
The response contains the gateway’s transaction result.Response Fields
string
The outcome of the operation. See the status table below.
string
PCI Booking’s internal transaction identifier.
string
The authorization code returned by the payment gateway. Only present on successful authorizations and charges.
string
The gateway’s own transaction reference. Use this value for subsequent Capture, Void, or Refund operations on the same transaction.
string
Human-readable message from the payment gateway describing the result.
string
Raw response description from the acquirer/processor.
Operation Statuses
| Status | Description |
|---|---|
Accepted | The payment gateway accepted the request. |
Success | The operation completed successfully. |
Rejected | The gateway rejected the operation. See GatewayDescription and AcquirerDescription for details. |
TemporaryFailure | The operation failed but can be retried. |
FatalFailure | The operation failed permanently. |
Consider adding business logic based on the CVV retention policy status after a transaction.
{
"Status": "Success",
"TransactionID": "txn_abc123",
"AuthorizationCode": "AUTH456",
"GatewayDescription": "Approved",
"AcquirerDescription": "Transaction approved"
}
{
"Status": "Rejected",
"TransactionID": "txn_abc123",
"GatewayDescription": "Insufficient funds",
"AcquirerDescription": "51 - Insufficient Funds"
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "...",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}

