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
}
]
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
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
}
]
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
Query & Retrieve Guide
Search for tokens and retrieve their metadata
Parameter Constraints
| Parameter | Type | Required | Constraints |
|---|---|---|---|
| to | 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 |
This endpoint is rate limited.
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
-1003 | 401 | API key is missing or invalid. |
-179 | 400 | Invalid query parameter values. |
Parameters
Headers
string
required
Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. See the Authentication guide.Query String
string
The reference value provided during tokenization to locate this token. Exact match only.
integer
default:"0"
Chronological counter of tokens from which to start retrieving.
integer
default:"100"
The number of tokens to return in the response.
string
The property ID of the hotel the tokens were associated with. You would have used this method to set up the association first.
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 "to=10"
const params = new URLSearchParams({
ref: "booking-12345",
from: "0",
to: "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,
"to": 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.
string
The date and time the token was created (ISO 8601).
string
The card brand (e.g.
Visa, Mastercard, Amex). See supported card types.string
The first 6 digits (BIN) of the card number.
string
The last 4 digits of the card number.
integer
The card expiration year.
integer
The card expiration month.
string
The cardholder ID, if provided at tokenization time.
string
The name on the card, if provided at tokenization time.
string
The PCI Booking user ID that owns this token.
string
The card issue number (used by some card schemes).
string
The full token URI for use in API calls.
boolean
Whether CVV data is currently stored on this token.
string
The date after which the CVV will be automatically deleted (ISO 8601). Reflects the CVV retention policy.
string[]
List of PCI Booking customer (booker) user IDs associated with this token.
string[]
List of property user IDs associated with this token.
object
3D Secure authentication data, if stored on this token. See 3D Secure Authentication for field details.
string
The card network scheme if this is a network token (e.g.
Visa, Mastercard). null for regular cards.string
The network token identifier assigned by the card scheme.
null for regular cards.string
The geographic storage location of the token data.
null for default (in-table) storage.[
{
"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
}
]
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
⌘I

