const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d?retrieveCVV=yes',
{
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/2821a46d80e14d1b96a7f18f1b81926d',
headers={'Authorization': 'APIKEY your-api-key'},
params={'retrieveCVV': 'yes'}
)
print(response.json())
{
"@xmlns": "http://www.pcibooking.net/reservation",
"@schemaVersion": "1.0",
"BankCard": {
"Type": "Visa",
"Number": "4918914107195005",
"NameOnCard": "Juan Dela Cruz",
"ExpirationDate": {
"Month": "07",
"Year": "2020"
},
"IssueNumber": "2"
}
}
{
"@xmlns": "http://www.pcibooking.net/reservation",
"@schemaVersion": "1.0",
"BankCard": {
"Type": "Visa",
"Number": "4918914107195005",
"NameOnCard": "Juan Dela Cruz",
"ExpirationDate": {
"Month": "07",
"Year": "2020"
},
"IssueNumber": "2",
"CVV": "123"
}
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY or HTTP Basic",
"errorList": null
}
{
"code": -160,
"message": "Uri not found",
"moreInfo": "Uri to Bank card not found",
"errorList": null
}
Use Tokens
Retrieve Card Details
Retrieve the full, unmasked card details for a token. This endpoint returns raw card data, putting your system in PCI DSS scope.
GET
/
api
/
payments
/
paycard
/
{cardToken}
const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d?retrieveCVV=yes',
{
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/2821a46d80e14d1b96a7f18f1b81926d',
headers={'Authorization': 'APIKEY your-api-key'},
params={'retrieveCVV': 'yes'}
)
print(response.json())
{
"@xmlns": "http://www.pcibooking.net/reservation",
"@schemaVersion": "1.0",
"BankCard": {
"Type": "Visa",
"Number": "4918914107195005",
"NameOnCard": "Juan Dela Cruz",
"ExpirationDate": {
"Month": "07",
"Year": "2020"
},
"IssueNumber": "2"
}
}
{
"@xmlns": "http://www.pcibooking.net/reservation",
"@schemaVersion": "1.0",
"BankCard": {
"Type": "Visa",
"Number": "4918914107195005",
"NameOnCard": "Juan Dela Cruz",
"ExpirationDate": {
"Month": "07",
"Year": "2020"
},
"IssueNumber": "2",
"CVV": "123"
}
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY or HTTP Basic",
"errorList": null
}
{
"code": -160,
"message": "Uri not found",
"moreInfo": "Uri to Bank card not found",
"errorList": null
}
Query & Retrieve Guide
Search for tokens and retrieve their metadata
Please note that the response to this method will be the full and unmasked card details. Processing this response will put the system, network and all connected components into PCI scope.
Before using this method, we recommend that you review the need for using it and setting up the proper environment to run it in.
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
| -1003 | 401 | User is not the owner and is not associated with this card |
| -160 | 404 | Card not found for the given token |
Error detail
Each condition below gives the exactmoreInfo text, why it happens and how to resolve it. The full set is on the Error Handling page.
-1003 You are not authorized to access this resource - token exists but is not yours to use
-1003 You are not authorized to access this resource - token exists but is not yours to use
HTTP status: Reason. The credential authenticated fine, but it is not allowed to act on the token in the request. The generic wording makes this the single most misread error in the API. On a token call it is far more often one of the causes below than an actual permissions problem.How to resolve.
401message: You are not authorized to access this resource. Please contact customer support.moreInfo: one of the following, depending on which check failed:User is not the owner of this bank card
Merchant or Owner are not associated with bank card [<token>] userID: <userId>
User <userId> is not associated with bank card [<token>]
- Check the token was not deleted. This is the most common cause. Deletion is permanent, and every later call on that token returns
-1003rather than a not-found error. Support can confirm when and by which user a token was deleted. - Check the tokenization actually succeeded. If the call that should have created the token failed, the token never existed, and the first call that uses it reports
-1003. - Check the environment. A sandbox token cannot be used from production, or the reverse.
- Check ownership and association. See the rules below.
- At tokenization, by passing
merchantIdon the tokenizing call. - After tokenization, by associating the token with the merchant.
- An association can only target a primary account. If you pass the ID of a sub-user or a secondary property, the request is rejected and you must associate the token with the parent account instead.
- Tokens never cross environments. A token created in sandbox cannot be used from production, and the reverse is also true.
-1003 even though the credentials are still valid and can still sign in to the portal. The response carries no moreInfo explaining this, so it is indistinguishable from a permissions failure by looking at the response alone.This is a common cause on sandbox accounts, which have a lower allowance than production.Check for it when -1003 appears suddenly across calls that used to work, on more than one token. A block affects every billable call on the account at once, whereas a genuine ownership problem affects only the specific token. Contact support with your account name to have the allowance reviewed and the block lifted.-160 Uri not found - token does not exist or was deleted
-160 Uri not found - token does not exist or was deleted
HTTP status: Reason. The token is well formed but no card is stored against it. Either it never existed, or it was deleted. Deletion is permanent and cannot be undone.How to resolve.
404message: Uri not foundmoreInfo:The provided card token does not exist or was already deleted
Token not found
- Confirm the tokenization call that should have created it returned success and returned this exact token.
- Check whether the token was deleted, either explicitly or by a CVV retention policy configured to delete the card on cleanup.
- Check the environment. A token from one environment is not visible in the other.
Some endpoints report a deleted token as
-1003 rather than -160. Treat the two as the same investigation and start with whether the token still exists.-160 Uri not found - malformed token URI
-160 Uri not found - malformed token URI
HTTP status: Reason. The value could not be read as a token at all, so no lookup was attempted. The token part of the URI must be 32 hexadecimal characters.How to resolve.
404message: Uri not foundmoreInfo:Invalid Card Uri value
Token value is not valid
- Pass the full token URI exactly as it was returned to you, for example
https://service.pcibooking.net/api/payments/paycard/<32-hex-token>. - Check for truncation, URL encoding, or a trailing space introduced by your own storage or logging.
-160 Uri not found - wrong operation for this kind of record
-160 Uri not found - wrong operation for this kind of record
HTTP status: Reason. The token exists, but it does not hold the kind of record this endpoint works on. The usual case is calling a card operation against a token that holds payment information rather than a card, or calling a card entry operation against a token created by a different capture type.How to resolve.
404message: Uri not foundmoreInfo:Resource not matching request
Resource not matching request. Cannot update a paycard
Resource not matching request. Cannot retrieve a paycard
- Check which endpoint created the token, and use the matching endpoint to read or update it.
- For a card captured through a hosted form, use the retrieval endpoint for that capture type.
Parameter Constraints
| Parameter | Type | Required | Constraints |
|---|---|---|---|
| cardToken | string | Yes | Must be a 32-character hexadecimal string |
| retrieveCVV | string | No | Accepts yes, no, or mask. Defaults to no (CVV not returned) |
| Auth | string | Yes | ApiKey with CanReplaceToken or CanRetrieveCard permission |
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. For example,
2821a46d80e14d1b96a7f18f1b81926d.Query String
string
default:"no"
Specifies how the CVV should be handled in the response: Yes: the CVV will be retrieved. No: the CVV will not be retrieved. Mask: the CVV will return masked.
const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d?retrieveCVV=yes',
{
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/2821a46d80e14d1b96a7f18f1b81926d',
headers={'Authorization': 'APIKEY your-api-key'},
params={'retrieveCVV': 'yes'}
)
print(response.json())
Response
{
"@xmlns": "http://www.pcibooking.net/reservation",
"@schemaVersion": "1.0",
"BankCard": {
"Type": "Visa",
"Number": "4918914107195005",
"NameOnCard": "Juan Dela Cruz",
"ExpirationDate": {
"Month": "07",
"Year": "2020"
},
"IssueNumber": "2"
}
}
{
"@xmlns": "http://www.pcibooking.net/reservation",
"@schemaVersion": "1.0",
"BankCard": {
"Type": "Visa",
"Number": "4918914107195005",
"NameOnCard": "Juan Dela Cruz",
"ExpirationDate": {
"Month": "07",
"Year": "2020"
},
"IssueNumber": "2",
"CVV": "123"
}
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY or HTTP Basic",
"errorList": null
}
{
"code": -160,
"message": "Uri not found",
"moreInfo": "Uri to Bank card not found",
"errorList": null
}

