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
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY or Temp Session or One-Time Accesss Token",
"errorList": null
}
{
"code": -160,
"message": "Uri not found",
"moreInfo": "Uri to Bank card not found",
"errorList": null
}
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
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY or Temp Session or One-Time Accesss Token",
"errorList": null
}
{
"code": -160,
"message": "Uri not found",
"moreInfo": "Uri to Bank card not found",
"errorList": null
}
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
Headers
string
required
Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. See the Authentication guide.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
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY or Temp Session or One-Time Accesss Token",
"errorList": null
}
{
"code": -160,
"message": "Uri not found",
"moreInfo": "Uri to Bank card not found",
"errorList": null
}

