const response = await fetch('https://service.pcibooking.net/api/networkToken?loc=IE', {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Card: {
Number: '4111111111111111',
ExpirationYear: 2028,
ExpirationMonth: 12,
SecurityCode: '123'
},
TokenizationRequest: {
ConsumerLanguage: 'en',
CardHolder: {
FirstName: 'John',
LastName: 'Doe',
Email: 'john.doe@example.com',
ClientIPAddress: '203.0.113.42',
CountryCode: 'US',
Address1: '123 Main St',
City: 'New York',
StateProvince: 'NY',
PostCode: '10001'
},
DeviceScore: 5,
AccountScore: 5
}
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://service.pcibooking.net/api/networkToken',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
params={
'loc': 'IE'
},
json={
'Card': {
'Number': '4111111111111111',
'ExpirationYear': 2028,
'ExpirationMonth': 12,
'SecurityCode': '123'
},
'TokenizationRequest': {
'ConsumerLanguage': 'en',
'CardHolder': {
'FirstName': 'John',
'LastName': 'Doe',
'Email': 'john.doe@example.com',
'ClientIPAddress': '203.0.113.42',
'CountryCode': 'US',
'Address1': '123 Main St',
'City': 'New York',
'StateProvince': 'NY',
'PostCode': '10001'
},
'DeviceScore': 5,
'AccountScore': 5
}
}
)
print(response.json())
{
"ResultCode": "Success",
"Brand": "Visa",
"TokenId": "4895370012003478",
"TokenizedCard": {
"Number": "489537******3478",
"ExpirationMonth": 12,
"ExpirationYear": 2028
}
}
{
"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
}
Network Tokenization
Network Tokenize a Card
Create a network token (Visa, Mastercard, or Amex) from raw card data and store it as a PCI Booking token.
POST
/
api
/
networkToken
const response = await fetch('https://service.pcibooking.net/api/networkToken?loc=IE', {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Card: {
Number: '4111111111111111',
ExpirationYear: 2028,
ExpirationMonth: 12,
SecurityCode: '123'
},
TokenizationRequest: {
ConsumerLanguage: 'en',
CardHolder: {
FirstName: 'John',
LastName: 'Doe',
Email: 'john.doe@example.com',
ClientIPAddress: '203.0.113.42',
CountryCode: 'US',
Address1: '123 Main St',
City: 'New York',
StateProvince: 'NY',
PostCode: '10001'
},
DeviceScore: 5,
AccountScore: 5
}
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://service.pcibooking.net/api/networkToken',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
params={
'loc': 'IE'
},
json={
'Card': {
'Number': '4111111111111111',
'ExpirationYear': 2028,
'ExpirationMonth': 12,
'SecurityCode': '123'
},
'TokenizationRequest': {
'ConsumerLanguage': 'en',
'CardHolder': {
'FirstName': 'John',
'LastName': 'Doe',
'Email': 'john.doe@example.com',
'ClientIPAddress': '203.0.113.42',
'CountryCode': 'US',
'Address1': '123 Main St',
'City': 'New York',
'StateProvince': 'NY',
'PostCode': '10001'
},
'DeviceScore': 5,
'AccountScore': 5
}
}
)
print(response.json())
{
"ResultCode": "Success",
"Brand": "Visa",
"TokenId": "4895370012003478",
"TokenizedCard": {
"Number": "489537******3478",
"ExpirationMonth": 12,
"ExpirationYear": 2028
}
}
{
"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
}
Network Tokenization Guide
Create and manage network tokens for stored cards
Location header.
Network tokenization replaces the real card number with a network-issued token that is bound to your merchant. The network token receives automatic card-on-file updates from the issuer, reducing declines from expired or replaced cards.
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
-1003 | 401 | API key is missing or invalid. |
-125 | 400 | Request body validation failed (missing required fields, invalid card number, etc.). |
-150 | 500 | Network tokenization failed (card cannot be network-tokenized, or the network returned an error). |
Parameter Constraints
- Card.Number: Valid card number (Visa, Mastercard, or Amex).
- Card.ExpirationMonth: Range 1-12.
- Card.SecurityCode: 3-4 digits (regex
^\d{3,4}$). - TokenizationRequest.ConsumerLanguage: Exactly 2 characters, ISO 639-1 language code. Defaults to
en. - TokenizationRequest.CardHolder.CountryCode: Exactly 2 uppercase letters (ISO 3166-1 alpha-2).
- TokenizationRequest.DeviceScore: Range 1-5, defaults to 5.
- TokenizationRequest.AccountScore: Range 1-5, defaults to 5.
- TokenizationRequest.DeviceLocationLat: Range -90 to 90.
- TokenizationRequest.DeviceLocationLon: Range -180 to 180.
Parameters
Headers
string
required
Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. See the Authentication guide.Query String
string
Token storage region. One of:
US, IN, AU, JP, CA, IE, GB, BR. If omitted, uses the account default.Request Body
object
required
object
required
Network tokenization parameters including cardholder and device information.
Show Properties
Show Properties
string
default:"en"
ISO 639-1 language code (exactly 2 characters).
object
Cardholder details required by the card network.
Show Properties
Show Properties
string
required
Cardholder first name.
string
required
Cardholder last name.
string
Cardholder email address.
string
Cardholder phone number.
string
required
Cardholder’s IP address.
string
required
ISO 3166-1 alpha-2 country code (e.g.
US, GB).string
Billing address line 1.
string
Billing city.
string
Billing state or province.
string
Billing postal code.
integer
default:"5"
Device trust score (1-5). Higher values indicate higher trust.
integer
default:"5"
Account trust score (1-5). Higher values indicate higher trust.
number
Device latitude (-90 to 90).
number
Device longitude (-180 to 180).
string
Device IP address (if different from cardholder IP).
string
Source of the card data (network-specific enum).
const response = await fetch('https://service.pcibooking.net/api/networkToken?loc=IE', {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Card: {
Number: '4111111111111111',
ExpirationYear: 2028,
ExpirationMonth: 12,
SecurityCode: '123'
},
TokenizationRequest: {
ConsumerLanguage: 'en',
CardHolder: {
FirstName: 'John',
LastName: 'Doe',
Email: 'john.doe@example.com',
ClientIPAddress: '203.0.113.42',
CountryCode: 'US',
Address1: '123 Main St',
City: 'New York',
StateProvince: 'NY',
PostCode: '10001'
},
DeviceScore: 5,
AccountScore: 5
}
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://service.pcibooking.net/api/networkToken',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
params={
'loc': 'IE'
},
json={
'Card': {
'Number': '4111111111111111',
'ExpirationYear': 2028,
'ExpirationMonth': 12,
'SecurityCode': '123'
},
'TokenizationRequest': {
'ConsumerLanguage': 'en',
'CardHolder': {
'FirstName': 'John',
'LastName': 'Doe',
'Email': 'john.doe@example.com',
'ClientIPAddress': '203.0.113.42',
'CountryCode': 'US',
'Address1': '123 Main St',
'City': 'New York',
'StateProvince': 'NY',
'PostCode': '10001'
},
'DeviceScore': 5,
'AccountScore': 5
}
}
)
print(response.json())
Response
201 - Network token created. TheLocation header contains the PCI Booking token URI for the network-tokenized card.
{
"ResultCode": "Success",
"Brand": "Visa",
"TokenId": "4895370012003478",
"TokenizedCard": {
"Number": "489537******3478",
"ExpirationMonth": 12,
"ExpirationYear": 2028
}
}
{
"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
}

