const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/op/validate',
{
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
FirstName: 'Juan',
LastName: 'Dela Cruz',
Email: 'juan@example.com',
Phone: '14155551234',
Address1: '123 Main Street',
PostCode: '10001',
City: 'New York',
StateProvince: 'NY',
CountryCode: 'US',
clientIPAddress: '203.0.113.42'
})
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/op/validate',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
json={
'FirstName': 'Juan',
'LastName': 'Dela Cruz',
'Email': 'juan@example.com',
'Phone': '14155551234',
'Address1': '123 Main Street',
'PostCode': '10001',
'City': 'New York',
'StateProvince': 'NY',
'CountryCode': 'US',
'clientIPAddress': '203.0.113.42'
}
)
print(response.json())
{
"RiskLevel": "High",
"Description": "Mismatch between billing address and credit card issuer country",
"CountryByIP": "US",
"IssuerCountry": "HK",
"IssuerName": "CITIC BANK INTERNATIONAL, LTD.",
"CardBrand": "VISA",
"CardType": "CREDIT",
"CardCategory": "CLASSIC",
"CountryFromBillingAddress": "US",
"AnonymousProxyUsed": false
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Missing Payer details",
"errorList": 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.
Use Tokens
Risk Assessment API
Assess the risk level of a tokenized card by cross-referencing billing address, card issuer country, and client IP address.
POST
/
api
/
payments
/
paycard
/
{cardToken}
/
op
/
validate
const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/op/validate',
{
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
FirstName: 'Juan',
LastName: 'Dela Cruz',
Email: 'juan@example.com',
Phone: '14155551234',
Address1: '123 Main Street',
PostCode: '10001',
City: 'New York',
StateProvince: 'NY',
CountryCode: 'US',
clientIPAddress: '203.0.113.42'
})
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/op/validate',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
json={
'FirstName': 'Juan',
'LastName': 'Dela Cruz',
'Email': 'juan@example.com',
'Phone': '14155551234',
'Address1': '123 Main Street',
'PostCode': '10001',
'City': 'New York',
'StateProvince': 'NY',
'CountryCode': 'US',
'clientIPAddress': '203.0.113.42'
}
)
print(response.json())
{
"RiskLevel": "High",
"Description": "Mismatch between billing address and credit card issuer country",
"CountryByIP": "US",
"IssuerCountry": "HK",
"IssuerName": "CITIC BANK INTERNATIONAL, LTD.",
"CardBrand": "VISA",
"CardType": "CREDIT",
"CardCategory": "CLASSIC",
"CountryFromBillingAddress": "US",
"AnonymousProxyUsed": false
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Missing Payer details",
"errorList": 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.
Risk Assessment Guide
Evaluate transaction risk before processing payments
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
| -125 | 400 | Payer details missing (null body) |
| -125 | 400 | CountryCode is empty |
| -1003 | 401 | User is not the owner |
Parameter Constraints
- Only CountryCode is required. It must be a 2-letter ISO country code.
- clientIPAddress, City and StateProvince feed the
RiskLevelandCountryByIPvalues. Without a real cardholder IP those two values are not meaningful. - IssuerCountry, IssuerName, CardBrand, CardType and CardCategory are looked up from the card itself and are returned whatever else you send, so the call can be used as a BIN lookup with
CountryCodealone. - FirstName and LastName only affect the
Descriptiontext. They never changeRiskLevel. - Email, Phone, Address1 and PostCode are accepted but not used in the assessment.
Parameters
Authentication
API key, access token or session token. Use the API key for server-to-server calls, and an access token or a session token when the call is made from a browser. Send one of the three.string
Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. The x-pcibooking-api-key header is also accepted. See the Authentication guide.string
Generated on your side. Single use, and valid for up to 72 hours. How to generate.
string
Returned by an API call. Valid for 5 minutes, and can be used more than once within that time. How to generate.
Path Parameters
string
required
The token ID as returned by one of the tokenization methods.
Payer Information
string
Payer’s first name.
string
Payer’s last name.
string
Payer’s email address.
string
Payer’s phone number.
Billing Address
string
Primary billing address line.
string
Secondary billing address line.
string
Tertiary billing address line.
string
Billing postal/ZIP code.
string
Billing city.
string
Billing state or province.
string
required
2-letter country code.
Client Details
string
Client’s IP address. Both IPv6 and IPv4 formats are supported.
const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/op/validate',
{
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
FirstName: 'Juan',
LastName: 'Dela Cruz',
Email: 'juan@example.com',
Phone: '14155551234',
Address1: '123 Main Street',
PostCode: '10001',
City: 'New York',
StateProvince: 'NY',
CountryCode: 'US',
clientIPAddress: '203.0.113.42'
})
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/op/validate',
headers={
'Authorization': 'APIKEY your-api-key',
'Content-Type': 'application/json'
},
json={
'FirstName': 'Juan',
'LastName': 'Dela Cruz',
'Email': 'juan@example.com',
'Phone': '14155551234',
'Address1': '123 Main Street',
'PostCode': '10001',
'City': 'New York',
'StateProvince': 'NY',
'CountryCode': 'US',
'clientIPAddress': '203.0.113.42'
}
)
print(response.json())
Response
{
"RiskLevel": "High",
"Description": "Mismatch between billing address and credit card issuer country",
"CountryByIP": "US",
"IssuerCountry": "HK",
"IssuerName": "CITIC BANK INTERNATIONAL, LTD.",
"CardBrand": "VISA",
"CardType": "CREDIT",
"CardCategory": "CLASSIC",
"CountryFromBillingAddress": "US",
"AnonymousProxyUsed": false
}
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Missing Payer details",
"errorList": 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.

