Query Tokens
curl --request GET \
--url https://service.pcibooking.net/api/payments/paycard/meta \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"CreateDate": "<string>",
"CardType": "<string>",
"LeadingDigits": "<string>",
"LastDigits": "<string>",
"ExpirationYear": 123,
"ExpirationMonth": 123,
"OwnerID": "<string>",
"OwnerName": "<string>",
"UserID": "<string>",
"IssueNumber": "<string>",
"URI": "<string>",
"CvvExists": true,
"EndRetentionDate": "<string>",
"AssociatedMerchants": [
"<string>"
],
"AssociatedProperties": [
"<string>"
],
"ThreeDSecureInfo": {},
"NetworkTokenScheme": "<string>",
"NetworkTokenId": "<string>",
"TokenLocation": "<string>"
}
'import requests
url = "https://service.pcibooking.net/api/payments/paycard/meta"
payload = {
"CreateDate": "<string>",
"CardType": "<string>",
"LeadingDigits": "<string>",
"LastDigits": "<string>",
"ExpirationYear": 123,
"ExpirationMonth": 123,
"OwnerID": "<string>",
"OwnerName": "<string>",
"UserID": "<string>",
"IssueNumber": "<string>",
"URI": "<string>",
"CvvExists": True,
"EndRetentionDate": "<string>",
"AssociatedMerchants": ["<string>"],
"AssociatedProperties": ["<string>"],
"ThreeDSecureInfo": {},
"NetworkTokenScheme": "<string>",
"NetworkTokenId": "<string>",
"TokenLocation": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
CreateDate: '<string>',
CardType: '<string>',
LeadingDigits: '<string>',
LastDigits: '<string>',
ExpirationYear: 123,
ExpirationMonth: 123,
OwnerID: '<string>',
OwnerName: '<string>',
UserID: '<string>',
IssueNumber: '<string>',
URI: '<string>',
CvvExists: true,
EndRetentionDate: '<string>',
AssociatedMerchants: ['<string>'],
AssociatedProperties: ['<string>'],
ThreeDSecureInfo: {},
NetworkTokenScheme: '<string>',
NetworkTokenId: '<string>',
TokenLocation: '<string>'
})
};
fetch('https://service.pcibooking.net/api/payments/paycard/meta', 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/payments/paycard/meta",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'CreateDate' => '<string>',
'CardType' => '<string>',
'LeadingDigits' => '<string>',
'LastDigits' => '<string>',
'ExpirationYear' => 123,
'ExpirationMonth' => 123,
'OwnerID' => '<string>',
'OwnerName' => '<string>',
'UserID' => '<string>',
'IssueNumber' => '<string>',
'URI' => '<string>',
'CvvExists' => true,
'EndRetentionDate' => '<string>',
'AssociatedMerchants' => [
'<string>'
],
'AssociatedProperties' => [
'<string>'
],
'ThreeDSecureInfo' => [
],
'NetworkTokenScheme' => '<string>',
'NetworkTokenId' => '<string>',
'TokenLocation' => '<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/payments/paycard/meta"
payload := strings.NewReader("{\n \"CreateDate\": \"<string>\",\n \"CardType\": \"<string>\",\n \"LeadingDigits\": \"<string>\",\n \"LastDigits\": \"<string>\",\n \"ExpirationYear\": 123,\n \"ExpirationMonth\": 123,\n \"OwnerID\": \"<string>\",\n \"OwnerName\": \"<string>\",\n \"UserID\": \"<string>\",\n \"IssueNumber\": \"<string>\",\n \"URI\": \"<string>\",\n \"CvvExists\": true,\n \"EndRetentionDate\": \"<string>\",\n \"AssociatedMerchants\": [\n \"<string>\"\n ],\n \"AssociatedProperties\": [\n \"<string>\"\n ],\n \"ThreeDSecureInfo\": {},\n \"NetworkTokenScheme\": \"<string>\",\n \"NetworkTokenId\": \"<string>\",\n \"TokenLocation\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", 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.get("https://service.pcibooking.net/api/payments/paycard/meta")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"CreateDate\": \"<string>\",\n \"CardType\": \"<string>\",\n \"LeadingDigits\": \"<string>\",\n \"LastDigits\": \"<string>\",\n \"ExpirationYear\": 123,\n \"ExpirationMonth\": 123,\n \"OwnerID\": \"<string>\",\n \"OwnerName\": \"<string>\",\n \"UserID\": \"<string>\",\n \"IssueNumber\": \"<string>\",\n \"URI\": \"<string>\",\n \"CvvExists\": true,\n \"EndRetentionDate\": \"<string>\",\n \"AssociatedMerchants\": [\n \"<string>\"\n ],\n \"AssociatedProperties\": [\n \"<string>\"\n ],\n \"ThreeDSecureInfo\": {},\n \"NetworkTokenScheme\": \"<string>\",\n \"NetworkTokenId\": \"<string>\",\n \"TokenLocation\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.pcibooking.net/api/payments/paycard/meta")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"CreateDate\": \"<string>\",\n \"CardType\": \"<string>\",\n \"LeadingDigits\": \"<string>\",\n \"LastDigits\": \"<string>\",\n \"ExpirationYear\": 123,\n \"ExpirationMonth\": 123,\n \"OwnerID\": \"<string>\",\n \"OwnerName\": \"<string>\",\n \"UserID\": \"<string>\",\n \"IssueNumber\": \"<string>\",\n \"URI\": \"<string>\",\n \"CvvExists\": true,\n \"EndRetentionDate\": \"<string>\",\n \"AssociatedMerchants\": [\n \"<string>\"\n ],\n \"AssociatedProperties\": [\n \"<string>\"\n ],\n \"ThreeDSecureInfo\": {},\n \"NetworkTokenScheme\": \"<string>\",\n \"NetworkTokenId\": \"<string>\",\n \"TokenLocation\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
{
"CreateDate": "2020-05-19T16:51:00",
"CardType": "Visa",
"LastDigits": "5005",
"LeadingDigits": "491891",
"ExpirationYear": 2020,
"ExpirationMonth": 7,
"OwnerID": "",
"OwnerName": "Juan Dela Cruz",
"UserID": "myUser",
"IssueNumber": "2",
"URI": "https://service.pcibooking.net/api/payments/paycard/eb454e0462d548ddbc6e6c2193b749a9",
"EndRetentionDate": "2017-07-08T00:00:00",
"CvvExists": true,
"AssociatedMerchants": ["userID1", "userID2"],
"AssociatedProperties": ["hotel1", "hotel2"],
"ThreeDSecureInfo": {
"Token": "42c775efa8b04b1d8bf14ef49a9e45e5",
"ThreeDSSessionID": "uOrDbh0dEimUDmB3Vvn2f5CAM9B1bMQX",
"Indication": "Authenticated",
"AuthenticationValue": "AJkBAoEREQAAAAB4hABwcAAAAAA=",
"Eci": "05",
"XID": "861433f4-abff-4c40-b2fd-fea208856a33",
"AcsTransactionId": "e7a46959-9630-413e-ab56-4e399b96244a",
"Version": "2.1.0",
"MerchantName": "PCI Booking * Hotelreservation"
},
"NetworkTokenScheme": null,
"NetworkTokenId": null,
"TokenLocation": null
}
]
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.
Query & Update
Query Tokens
Search for tokens by creator reference. Returns metadata for up to 100 matching tokens, with pagination support.
GET
/
api
/
payments
/
paycard
/
meta
Query Tokens
curl --request GET \
--url https://service.pcibooking.net/api/payments/paycard/meta \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"CreateDate": "<string>",
"CardType": "<string>",
"LeadingDigits": "<string>",
"LastDigits": "<string>",
"ExpirationYear": 123,
"ExpirationMonth": 123,
"OwnerID": "<string>",
"OwnerName": "<string>",
"UserID": "<string>",
"IssueNumber": "<string>",
"URI": "<string>",
"CvvExists": true,
"EndRetentionDate": "<string>",
"AssociatedMerchants": [
"<string>"
],
"AssociatedProperties": [
"<string>"
],
"ThreeDSecureInfo": {},
"NetworkTokenScheme": "<string>",
"NetworkTokenId": "<string>",
"TokenLocation": "<string>"
}
'import requests
url = "https://service.pcibooking.net/api/payments/paycard/meta"
payload = {
"CreateDate": "<string>",
"CardType": "<string>",
"LeadingDigits": "<string>",
"LastDigits": "<string>",
"ExpirationYear": 123,
"ExpirationMonth": 123,
"OwnerID": "<string>",
"OwnerName": "<string>",
"UserID": "<string>",
"IssueNumber": "<string>",
"URI": "<string>",
"CvvExists": True,
"EndRetentionDate": "<string>",
"AssociatedMerchants": ["<string>"],
"AssociatedProperties": ["<string>"],
"ThreeDSecureInfo": {},
"NetworkTokenScheme": "<string>",
"NetworkTokenId": "<string>",
"TokenLocation": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
CreateDate: '<string>',
CardType: '<string>',
LeadingDigits: '<string>',
LastDigits: '<string>',
ExpirationYear: 123,
ExpirationMonth: 123,
OwnerID: '<string>',
OwnerName: '<string>',
UserID: '<string>',
IssueNumber: '<string>',
URI: '<string>',
CvvExists: true,
EndRetentionDate: '<string>',
AssociatedMerchants: ['<string>'],
AssociatedProperties: ['<string>'],
ThreeDSecureInfo: {},
NetworkTokenScheme: '<string>',
NetworkTokenId: '<string>',
TokenLocation: '<string>'
})
};
fetch('https://service.pcibooking.net/api/payments/paycard/meta', 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/payments/paycard/meta",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'CreateDate' => '<string>',
'CardType' => '<string>',
'LeadingDigits' => '<string>',
'LastDigits' => '<string>',
'ExpirationYear' => 123,
'ExpirationMonth' => 123,
'OwnerID' => '<string>',
'OwnerName' => '<string>',
'UserID' => '<string>',
'IssueNumber' => '<string>',
'URI' => '<string>',
'CvvExists' => true,
'EndRetentionDate' => '<string>',
'AssociatedMerchants' => [
'<string>'
],
'AssociatedProperties' => [
'<string>'
],
'ThreeDSecureInfo' => [
],
'NetworkTokenScheme' => '<string>',
'NetworkTokenId' => '<string>',
'TokenLocation' => '<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/payments/paycard/meta"
payload := strings.NewReader("{\n \"CreateDate\": \"<string>\",\n \"CardType\": \"<string>\",\n \"LeadingDigits\": \"<string>\",\n \"LastDigits\": \"<string>\",\n \"ExpirationYear\": 123,\n \"ExpirationMonth\": 123,\n \"OwnerID\": \"<string>\",\n \"OwnerName\": \"<string>\",\n \"UserID\": \"<string>\",\n \"IssueNumber\": \"<string>\",\n \"URI\": \"<string>\",\n \"CvvExists\": true,\n \"EndRetentionDate\": \"<string>\",\n \"AssociatedMerchants\": [\n \"<string>\"\n ],\n \"AssociatedProperties\": [\n \"<string>\"\n ],\n \"ThreeDSecureInfo\": {},\n \"NetworkTokenScheme\": \"<string>\",\n \"NetworkTokenId\": \"<string>\",\n \"TokenLocation\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", 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.get("https://service.pcibooking.net/api/payments/paycard/meta")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"CreateDate\": \"<string>\",\n \"CardType\": \"<string>\",\n \"LeadingDigits\": \"<string>\",\n \"LastDigits\": \"<string>\",\n \"ExpirationYear\": 123,\n \"ExpirationMonth\": 123,\n \"OwnerID\": \"<string>\",\n \"OwnerName\": \"<string>\",\n \"UserID\": \"<string>\",\n \"IssueNumber\": \"<string>\",\n \"URI\": \"<string>\",\n \"CvvExists\": true,\n \"EndRetentionDate\": \"<string>\",\n \"AssociatedMerchants\": [\n \"<string>\"\n ],\n \"AssociatedProperties\": [\n \"<string>\"\n ],\n \"ThreeDSecureInfo\": {},\n \"NetworkTokenScheme\": \"<string>\",\n \"NetworkTokenId\": \"<string>\",\n \"TokenLocation\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service.pcibooking.net/api/payments/paycard/meta")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"CreateDate\": \"<string>\",\n \"CardType\": \"<string>\",\n \"LeadingDigits\": \"<string>\",\n \"LastDigits\": \"<string>\",\n \"ExpirationYear\": 123,\n \"ExpirationMonth\": 123,\n \"OwnerID\": \"<string>\",\n \"OwnerName\": \"<string>\",\n \"UserID\": \"<string>\",\n \"IssueNumber\": \"<string>\",\n \"URI\": \"<string>\",\n \"CvvExists\": true,\n \"EndRetentionDate\": \"<string>\",\n \"AssociatedMerchants\": [\n \"<string>\"\n ],\n \"AssociatedProperties\": [\n \"<string>\"\n ],\n \"ThreeDSecureInfo\": {},\n \"NetworkTokenScheme\": \"<string>\",\n \"NetworkTokenId\": \"<string>\",\n \"TokenLocation\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
{
"CreateDate": "2020-05-19T16:51:00",
"CardType": "Visa",
"LastDigits": "5005",
"LeadingDigits": "491891",
"ExpirationYear": 2020,
"ExpirationMonth": 7,
"OwnerID": "",
"OwnerName": "Juan Dela Cruz",
"UserID": "myUser",
"IssueNumber": "2",
"URI": "https://service.pcibooking.net/api/payments/paycard/eb454e0462d548ddbc6e6c2193b749a9",
"EndRetentionDate": "2017-07-08T00:00:00",
"CvvExists": true,
"AssociatedMerchants": ["userID1", "userID2"],
"AssociatedProperties": ["hotel1", "hotel2"],
"ThreeDSecureInfo": {
"Token": "42c775efa8b04b1d8bf14ef49a9e45e5",
"ThreeDSSessionID": "uOrDbh0dEimUDmB3Vvn2f5CAM9B1bMQX",
"Indication": "Authenticated",
"AuthenticationValue": "AJkBAoEREQAAAAB4hABwcAAAAAA=",
"Eci": "05",
"XID": "861433f4-abff-4c40-b2fd-fea208856a33",
"AcsTransactionId": "e7a46959-9630-413e-ab56-4e399b96244a",
"Version": "2.1.0",
"MerchantName": "PCI Booking * Hotelreservation"
},
"NetworkTokenScheme": null,
"NetworkTokenId": null,
"TokenLocation": null
}
]
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.
Query & Retrieve Guide
Search for tokens and retrieve their metadata
ref matches the reference the owner assigned, and UserID is the owner’s user ID, not yours.
Parameter Constraints
| Parameter | Type | Required | Constraints |
|---|---|---|---|
| num | integer | No | Maximum number of results to return. Defaults to 100 |
| from | integer | No | Pagination offset (chronological counter). Defaults to 0 |
| ref | string | No | Filter by creator reference value (exact match) |
| property | string | No | Filter by associated property ID (Property Management only) |
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
| none | 401 | API key is missing or invalid. The response body is empty. |
-179 | 400 | Invalid query parameter values. |
Parameters
Authentication
API key only. This endpoint does not accept access tokens or session tokens.Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. The x-pcibooking-api-key header is also accepted. See the Authentication guide.Query String
The property ID of the hotel the tokens were associated with. Property Management only. Property Management is closed to new accounts; see Property Management.
Request Example
Query all tokens created with the referencebooking-12345, returning the first 10 results:
- curl
- Node.js
- Python
curl -G "https://service.pcibooking.net/api/payments/paycard/meta" \
-H "Authorization: APIKEY your-api-key" \
--data-urlencode "ref=booking-12345" \
--data-urlencode "from=0" \
--data-urlencode "num=10"
const params = new URLSearchParams({
ref: "booking-12345",
from: "0",
num: "10"
});
const response = await fetch(
`https://service.pcibooking.net/api/payments/paycard/meta?${params}`,
{
headers: {
"Authorization": "APIKEY your-api-key"
}
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
"https://service.pcibooking.net/api/payments/paycard/meta",
headers={"Authorization": "APIKEY your-api-key"},
params={
"ref": "booking-12345",
"from": 0,
"num": 10
}
)
print(response.json())
property parameter:
- curl
- Node.js
- Python
curl -G "https://service.pcibooking.net/api/payments/paycard/meta" \
-H "Authorization: APIKEY your-api-key" \
--data-urlencode "ref=booking-12345" \
--data-urlencode "property=hotel-sunrise"
const params = new URLSearchParams({
ref: "booking-12345",
property: "hotel-sunrise"
});
const response = await fetch(
`https://service.pcibooking.net/api/payments/paycard/meta?${params}`,
{
headers: {
"Authorization": "APIKEY your-api-key"
}
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
"https://service.pcibooking.net/api/payments/paycard/meta",
headers={"Authorization": "APIKEY your-api-key"},
params={
"ref": "booking-12345",
"property": "hotel-sunrise"
}
)
print(response.json())
Response
200 - An array of token metadata objects. If no cards match the query, the response is a200 with an empty array - not an error. Each item contains the fields below. For the single-token equivalent (which also returns CreatorReference and VirtualInfo), see Retrieve Token Metadata.
The card brand (e.g.
Visa, Mastercard, Amex). See supported card types.The date after which the CVV will be automatically deleted (ISO 8601). Reflects the CVV retention policy.
List of property user IDs associated with this token. Property Management only. Property Management is closed to new accounts; see Property Management.
3D Secure authentication data, if stored on this token. See 3D Secure Authentication for field details.
The card network scheme if this is a network token (e.g.
Visa, Mastercard). null for regular cards.The region where the card data is stored, as a code such as
IE or US. null means the card is in PCI Booking’s main card store in Ireland and has no region code. See Card Storage Regions.[
{
"CreateDate": "2020-05-19T16:51:00",
"CardType": "Visa",
"LastDigits": "5005",
"LeadingDigits": "491891",
"ExpirationYear": 2020,
"ExpirationMonth": 7,
"OwnerID": "",
"OwnerName": "Juan Dela Cruz",
"UserID": "myUser",
"IssueNumber": "2",
"URI": "https://service.pcibooking.net/api/payments/paycard/eb454e0462d548ddbc6e6c2193b749a9",
"EndRetentionDate": "2017-07-08T00:00:00",
"CvvExists": true,
"AssociatedMerchants": ["userID1", "userID2"],
"AssociatedProperties": ["hotel1", "hotel2"],
"ThreeDSecureInfo": {
"Token": "42c775efa8b04b1d8bf14ef49a9e45e5",
"ThreeDSSessionID": "uOrDbh0dEimUDmB3Vvn2f5CAM9B1bMQX",
"Indication": "Authenticated",
"AuthenticationValue": "AJkBAoEREQAAAAB4hABwcAAAAAA=",
"Eci": "05",
"XID": "861433f4-abff-4c40-b2fd-fea208856a33",
"AcsTransactionId": "e7a46959-9630-413e-ab56-4e399b96244a",
"Version": "2.1.0",
"MerchantName": "PCI Booking * Hotelreservation"
},
"NetworkTokenScheme": null,
"NetworkTokenId": null,
"TokenLocation": null
}
]
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.

