const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/user/booker-user-123',
{
method: 'PUT',
headers: {
'Authorization': 'APIKEY your-api-key'
}
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/user/booker-user-123',
headers={'Authorization': 'APIKEY your-api-key'}
)
print(response.status_code)
Empty response body. Association created successfully.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Could not find a valid user",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
Third-Party Permissions
Associate with Customer
Associate a token with another PCI Booking customer, allowing them to perform actions on this token.
PUT
/
api
/
payments
/
paycard
/
{cardToken}
/
user
/
{userID}
const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/user/booker-user-123',
{
method: 'PUT',
headers: {
'Authorization': 'APIKEY your-api-key'
}
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/user/booker-user-123',
headers={'Authorization': 'APIKEY your-api-key'}
)
print(response.status_code)
Empty response body. Association created successfully.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Could not find a valid user",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
Third-Party Permissions Guide
Learn how to share tokens with other PCI Booking customers
Error Responses
| Code | HTTP Status | Condition |
|---|---|---|
| -1003 | 401 | User is not the owner |
| -179 | 400 | userId is empty |
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.
-125 Bad input data - merchant not found for this account
-125 Bad input data - merchant not found for this account
HTTP status: Reason. The
400message: Bad input datamoreInfo:Could not find a valid merchant <merchantId> for <userId>
merchantId you passed is not a merchant that your account can associate a token with. Either the ID does not exist, or it belongs to an account unrelated to yours.How to resolve.- Check the
merchantIdvalue. For a property it is the external user ID, not the internal one. - Confirm the merchant sits under the same parent account as the credential making the call.
-113 This operation is not allowed for the given entity - association must target the primary account
-113 This operation is not allowed for the given entity - association must target the primary account
HTTP status: Reason. A token can only be associated with a primary account. You passed the ID of a sub-user or a secondary property, which cannot own an association.How to resolve.
403message: This operation is not allowed for the given entitymoreInfo:Please associate the card to the primary property
Please associate the card to the primary booker - <accountId>
- Use the primary account’s ID instead. When the message names an account ID, that is the one to use.
- Sub-users of the primary account can then use the token without needing their own association.
-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.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.
string
required
The user ID of a PCI Booking customer (“Booker”) that the token should be associated with. You will need to collect this userID from the booker you wish to associate the card with.
const response = await fetch(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/user/booker-user-123',
{
method: 'PUT',
headers: {
'Authorization': 'APIKEY your-api-key'
}
}
);
console.log(response.status);
import requests
response = requests.put(
'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/user/booker-user-123',
headers={'Authorization': 'APIKEY your-api-key'}
)
print(response.status_code)
Response
200 - Association created. Empty response body.Empty response body. Association created successfully.
{
"code": -125,
"message": "Bad input data",
"moreInfo": "Could not find a valid user",
"errorList": null
}
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}

