How Placeholders Work
- Write each placeholder as
$~Name~$, for example$~Number~$. Names are not case-sensitive. - Do not send
profileName. If you do, PCI Booking uses the profile and ignores the placeholders. - PCI Booking finds placeholders by searching the text of the message. The message does not need to be valid JSON or XML, and placeholders can sit at any depth in a nested structure.
- Each value is inserted exactly as it is stored. PCI Booking does not add quotes, remove characters or escape anything.
- If the token has no value for a field, for example no 3D Secure data, the placeholder is replaced with an empty string.
Available Placeholders
The 3D Secure placeholders are filled only when 3D Secure data is stored for the token. See 3DS Auth Management.
Where Placeholders Can Go
In the body. This is the usual case. The body can be in any text format: JSON, XML, SOAP, form data or plain text. AContent-Type header is required.
Inside one parameter. Some third parties expect the card data inside a single parameter, for example an XML document posted in a form field. Pass that parameter’s name in contentParam. PCI Booking first looks for the parameter in the query string of targetUri, then in the form body, and replaces placeholders only inside that parameter’s value.
Placeholders in JSON
Because values are inserted as they are, you decide in your message whether each value is a JSON string or a JSON number:- For a string, put the placeholder inside quotes:
"number": "$~Number~$". - For a number, leave the placeholder without quotes and use a format without a leading zero:
"expiryMonth": $~ExpirationM~$and"expiryYear": $~ExpirationYYYY~$. - Do not use
$~ExpirationMM~$without quotes. A value such as07is not a valid JSON number.
& or < produces invalid XML unless you use a target profile.
Example: a GraphQL API
GraphQL APIs take a JSON body with aquery and a variables object. Put the placeholders inside variables. Headers the third party needs, such as its own Authorization and a User-Agent, are sent as normal and forwarded unchanged.
variables.card, sent to https://api.example-crs.com/graphql with the same headers. The Authorization header here is the third party’s own. You authenticate to PCI Booking with the accessToken query parameter.
Related
- Token Replacement in Request: how the relay works and what it changes in your request.
- Token Replacement API reference: all parameters and errors.
- Target Profiles: the alternative to placeholders.

