code, a fixed message for that code, and a moreInfo string describing the specific failure. This page lists the conditions you are most likely to hit, with the exact text each returns and what to do about it.
How to read an error
Thecode alone is rarely enough to identify a problem. Several codes are deliberately broad: -125 covers every kind of bad input, and -1003 covers everything from a wrong API key to a deleted token. Three pieces of information together identify a condition:
The code
The moreInfo string
The endpoint you called
-1003 on an authentication call is a credential problem; on a token call it usually is not.Codes and their fixed text
Themessage for a given code never varies. Only moreInfo changes.
-174, -176, -180, -1004, -1005 or -1006.Authentication and access
Tokens
-160 Uri not found - token does not exist or was deleted
-160 Uri not found - token does not exist or was deleted
404message: Uri not foundmoreInfo:- 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.
-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
404message: Uri not foundmoreInfo:- 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
404message: Uri not foundmoreInfo:- 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.
-125 Bad input data - expiration date rejected
-125 Bad input data - expiration date rejected
400message: Bad input datamoreInfo:- Send the month as two digits,
01through12. - Check the year format the endpoint expects. Some accept two digits and some four, and they are not interchangeable.
- Check the date is not in the past. An expired card is rejected at tokenization.
-179 Bad input parameter - CVV format rejected
-179 Bad input parameter - CVV format rejected
400message: Bad input parametermoreInfo:- Send digits only, with no spaces or punctuation.
- Use four digits for American Express and three for other brands.
- Omit the field entirely rather than sending an empty string when you have no CVV to send.
Accounts and merchant association
-125 Bad input data - merchant not found for this account
-125 Bad input data - merchant not found for this account
400message: Bad input datamoreInfo: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
403message: This operation is not allowed for the given entitymoreInfo:- 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.
Token replacement and relay
-125 Bad input data - profile not found
-125 Bad input data - profile not found
400message: Bad input datamoreInfo: the wording depends on which endpoint you called:paycard/relay). The second is returned by tokenization on response (paycard/capture). They mean the same thing.Reason. The profileName you passed could not be resolved for the account making the request. In almost every case the profile does exist, but on a different account than the one your credentials belong to. A misspelled profile name produces the same error.How to resolve.A PCI Shield profile belongs to the account, not to the sub-user that calls the API. When a sub-user makes a request, the profile is looked up against that sub-user’s parent account. A profile configured on one account is never visible to a sub-user of a different account, and sandbox and production accounts are separate.To check which profiles your credential can see:- Identify the parent account of the sub-user whose credentials you are using.
- Sign in to the PCI Booking portal as that account and open PCI Shield Settings > PCI Shield Profile Settings.
- Confirm the profile name appears there, spelled exactly as you send it. Profile names are matched exactly.
- If the profile is listed under a different account, switch your request to a sub-user of that account rather than copying the profile.
GET /api/booker returns the platform-wide preset tokenization profiles, which are a different set. Your own profiles are visible in the portal only.-125 Bad input data - card data could not be substituted
-125 Bad input data - card data could not be substituted
400message: Bad input datamoreInfo:- Compare the profile’s selectors against the exact payload you sent. A selector that assumes a different nesting depth or element name matches nothing.
- Check the namespaces. For XML and SOAP, a selector written without namespace handling will not match a namespaced document.
- Confirm the body is the format the profile was written for. A profile written for XML will not match a JSON body.
- Test the profile against a saved copy of a real request before using it in production.
-125 Bad input data - request body is empty
-125 Bad input data - request body is empty
400message: Bad input datamoreInfo:- Send the third-party request you want relayed as the body of the call, not as a query parameter.
- If you are pointing at the content with a parameter name, check that parameter is present and actually carries the payload.
- Check no proxy or client library between you and the API is dropping the body on a
GETrelay.
-125 Bad input data - Content-Type header missing
-125 Bad input data - Content-Type header missing
400message: Bad input datamoreInfo:Content-Type header it cannot choose a parser.How to resolve.- Set
Content-Typeto match the body you are sending, for exampleapplication/json,text/xml, orapplication/x-www-form-urlencoded. - Send the charset if the third party requires one, for example
text/xml; charset=UTF-8.
-125 Bad input data - unsupported httpMethod value
-125 Bad input data - unsupported httpMethod value
400message: Bad input datamoreInfo:httpMethod parameter names a method the relay does not forward.How to resolve.- Use one of
POST,GET,PUT,PATCHorDELETE, in upper case. - Omit the parameter to accept the default of
POST.
-125 Bad input data - targetUri not usable
-125 Bad input data - targetUri not usable
400message: Bad input datamoreInfo:targetUri could not be parsed as an absolute URL, so the relay had nowhere to send the request.How to resolve.- Send an absolute URL including the scheme, for example
https://api.example.com/path. - URL-encode the value if you pass it as a query parameter, so that its own query string does not terminate yours.
-125 Bad input data - no token found in the custom header
-125 Bad input data - no token found in the custom header
400message: Bad input datamoreInfo:X-pciBooking-cardUri header, but the header was absent or held no readable token.How to resolve.- Add the
X-pciBooking-cardUriheader carrying the full token URI. - Separate multiple tokens as the endpoint documents, and check none of them is empty.
-175 Request timed out - third party did not respond in time
-175 Request timed out - third party did not respond in time
504message: Request timed outmoreInfo: not populated for this condition. The code and the endpoint are the only signal.Reason. PCI Booking relayed your request but the target server did not answer within the timeout. The failure is on the far side, not in PCI Booking. Card data may already have reached the third party, so the operation cannot be assumed not to have happened.How to resolve.- Raise the
timeoutparameter if the third party is legitimately slow. Check the maximum the endpoint accepts before relying on a high value. - Confirm the target host is reachable and not rate limiting or blocking the call. PCI Booking calls the third party from its own addresses, which the third party may need to allow.
- Do not blind retry a charge. Query the third party for the outcome first. A timeout is an unknown result, not a failure.
Request format
-123 Message badly formatted - body is not valid XML for this endpoint
-123 Message badly formatted - body is not valid XML for this endpoint
400message: Message badly formattedmoreInfo:moreInfo.How to resolve.- Read the list in
moreInfo. It names the elements that failed, which is usually enough on its own. - Check element order. The schema is sequence-sensitive, so correctly named elements in the wrong order still fail.
- Check the declared encoding matches what you actually sent.
Payment gateway
-125 Bad input data - request object could not be parsed
-125 Bad input data - request object could not be parsed
400message: Bad input datamoreInfo:- Validate the body against the endpoint’s schema before sending.
- Check for a value sent as the wrong type, most often a number sent as a string or an object sent where an array is expected.
- Check
Content-Typematches the body format.
-125 Bad input data - card or token missing from the request
-125 Bad input data - card or token missing from the request
400message: Bad input datamoreInfo:CardToken property is missing or not a readable token URI.How to resolve.- Send exactly one of a card object or a
CardToken, as the endpoint requires. - Pass the full token URI, not the bare 32-hex token, unless the endpoint documents otherwise.
- Check the property name and its capitalisation against the endpoint reference.
-125 Bad input data - required transaction field missing
-125 Bad input data - required transaction field missing
400message: Bad input datamoreInfo:GatewayReference of the original authorisation, and an amount is required wherever money moves.How to resolve.- Add the field named in
moreInfo. - For a capture, refund or void, send the
GatewayReferencereturned by the original transaction rather than your own reference. - Send the amount in the units the gateway expects, and check whether it takes minor units.
Card requests
-160 Uri not found - card request not found
-160 Uri not found - card request not found
404message: Uri not foundmoreInfo:requestID given. Card requests are not permanent: once completed or expired, a request is no longer retrievable.How to resolve.- Check the
requestIDis the one returned when the request was created. - Check the request has not already been completed by the cardholder, or passed its expiry.
- Confirm the credential belongs to the account that created the request.
When to contact support
Some conditions cannot be resolved from your side. Contact support when:- A
-1003persists after you have ruled out deletion, environment and association. Support can tell you whether a token was deleted, and by which user. - Calls that used to work start failing with
-1003across the whole account at once, which suggests a processing allowance block. - A
-150repeats on the same well-formed request. - A client certificate is named correctly but cannot be loaded.
code, message and moreInfo verbatim, the endpoint and HTTP method, the token URI or your own reference, and whether the call was against sandbox or production.
Related
- Return Codes - flat lookup table of every code
- Card Validation Errors - card number, expiration and CVV validation detail
- Troubleshooting - symptom-first guide when you do not have an error code
- API Conventions - request and response formats

