Tokenisation Profile How to manage profiles to work with incoming cards
A Tokenisation Profile is a setting to represent how to exclude information from a 3rd party service message.
Please ask us to create profiles for you (No Charge). You are welcome to try yourself but we have working profiles and can make new profiles easily.
Tokenisation Profile structure
Copy {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"type" : "tokenization_profile" ,
"attributes" : {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"name" : "sample" ,
"profile" : {
"type" : "json" ,
"schema" : {
"message_node" : {
"selector" : "$.data"
} ,
"card_node" : {
"selector" : "attributes.guarantee"
}
} ,
"card_token_placement" : {
"type" : "card_node" ,
"card_token_node" : "token" ,
"error_node" : "error" ,
} ,
"card_node" : {
"card_number" : {
"selector" : "card_number"
} ,
"cardholder_name" : {
"selector" : "cardholder_name"
} ,
"expiration_month" : {
"selector" : "expiration_date" ,
"transformation" : "substring:0,2"
} ,
"expiration_year" : {
"selector" : "expiration_date" ,
"transformation" : "substring:3,6"
} ,
"service_code" : {
"selector" : "cvv"
}
}
} ,
"created_at" : "2020-06-08T05:49:10.979Z" ,
"updated_at" : "2020-06-08T05:49:10.979Z"
}
}
Unique identifier based at UUID v4
Tokenisation profile name, URL-safe string
Tokenisation profile structure
timestamp when profile was created
timestamp when profile was updated
Profile
type of incoming content (JSON or XML)
information about message_node and card_node placement
information about card_token destination
information about card information nodes
Schema
JSON object with selector field with JSONPath or XPath to booking message node at 3rd party service message
JSON object with selector field with relative JSONPath or XPath to credit card node
Card Token Placement
One of possible values: card_node, headers
required field if type is card_node, XPath or JSONPath to node, where card_token should be inserted
If you choose card_node
, card_token
will be inserted into message structure. If headers
chosen, card_token will be return at X-PCI-CHANNEX-TOKENS
Header. If message contain several bookings, we will return several card_tokens. If one of messages does not have credit card info, it will be represent as an empty string at Headers.
Card Node
JSON object with selector for Card Number
JSON object with selector for Cardholder name
JSON object with selector for Expiration Month
JSON object with selector for Expiration Year
JSON object with selector for Service Code (CVV, CVC)
Each selector can contain field selector with JSONPath or XPath, and field transformation to modify the excluded value.
Please, keep in mind, our Tokenisation Profiles are based at XPath or JSONPath functionality.
Get List of Tokenisation Profiles
Method to get list of Tokenisation Profiles
Request Success Response
Copy GET https://pci.channex.io/api/v1/tokenization_profiles?api_key={API_KEY}
Copy {
"data" : [
{
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"type" : "tokenization_profile" ,
"attributes" : {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"name" : "sample" ,
"profile" : {
"type" : "json" ,
"schema" : {
"message_node" : {
"selector" : "$.data"
} ,
"card_node" : {
"selector" : "attributes.guarantee"
}
} ,
"card_token_placement" : {
"type" : "card_node" ,
"card_token_node" : "token" ,
"error_node" : "error"
} ,
"card_node" : {
"card_number" : {
"selector" : "card_number"
} ,
"cardholder_name" : {
"selector" : "cardholder_name"
} ,
"expiration_month" : {
"selector" : "expiration_date" ,
"transformation" : "substring:0,2"
} ,
"expiration_year" : {
"selector" : "expiration_date" ,
"transformation" : "substring:3,6"
} ,
"service_code" : {
"selector" : "cvv"
}
}
} ,
"created_at" : "2020-06-08T05:49:10.979Z" ,
"updated_at" : "2020-06-08T05:49:10.979Z"
}
}
]
}
Create Tokenisation Profile
Method to create a new Tokenisation profile
Reqeust Success Response
Copy POST https://pci.channex.io/api/v1/tokenization_profiles?api_key={API_KEY}
{
"tokenization_profile": {
"name": "sample",
"type": "json",
"schema": {
"message_node": {
"selector": "$.data"
},
"card_node": {
"selector": "attributes.guarantee"
}
},
"card_token_placement": {
"type": "card_node",
"node": "token"
},
"card_node": {
"card_number": {
"selector": "card_number"
},
"cardholder_name": {
"selector": "cardholder_name"
},
"expiration_month": {
"selector": "expiration_date",
"transformation": "substring:0,2"
},
"expiration_year": {
"selector": "expiration_date",
"transformation": "substring:3,6"
},
"service_code": {
"selector": "cvv"
}
}
}
}
Copy {
"data" : {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"type" : "tokenization_profile" ,
"attributes" : {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"name" : "sample" ,
"profile" : {
"type" : "json" ,
"schema" : {
"message_node" : {
"selector" : "$.data"
} ,
"card_node" : {
"selector" : "attributes.guarantee"
}
} ,
"card_token_placement" : {
"type" : "card_node" ,
"card_token_node" : "token" ,
"error_node" : "error"
} ,
"card_node" : {
"card_number" : {
"selector" : "card_number"
} ,
"cardholder_name" : {
"selector" : "cardholder_name"
} ,
"expiration_month" : {
"selector" : "expiration_date" ,
"transformation" : "substring:0,2"
} ,
"expiration_year" : {
"selector" : "expiration_date" ,
"transformation" : "substring:3,6"
} ,
"service_code" : {
"selector" : "cvv"
}
}
} ,
"created_at" : "2020-06-08T05:49:10.979Z" ,
"updated_at" : "2020-06-08T05:49:10.979Z"
}
}
}
Get Tokenisation Profile
Method to get Tokenisation Profile by ID
Request Success Response
Copy GET https://pci.channex.io/api/v1/tokenization_profiles/{id}?api_key={API_KEY}
Copy {
"data" : {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"type" : "tokenization_profile" ,
"attributes" : {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"name" : "sample" ,
"profile" : {
"type" : "json" ,
"schema" : {
"message_node" : {
"selector" : "$.data"
} ,
"card_node" : {
"selector" : "attributes.guarantee"
}
} ,
"card_token_placement" : {
"type" : "card_node" ,
"card_token_node" : "token" ,
"error_node" : "error"
} ,
"card_node" : {
"card_number" : {
"selector" : "card_number"
} ,
"cardholder_name" : {
"selector" : "cardholder_name"
} ,
"expiration_month" : {
"selector" : "expiration_date" ,
"transformation" : "substring:0,2"
} ,
"expiration_year" : {
"selector" : "expiration_date" ,
"transformation" : "substring:3,6"
} ,
"service_code" : {
"selector" : "cvv"
}
}
} ,
"created_at" : "2020-06-08T05:49:10.979Z" ,
"updated_at" : "2020-06-08T05:49:10.979Z"
}
}
}
Update Tokenisation Profile
Method to update Tokenisation Profile
Request Success Response
Copy PUT https://pci.channex.io/api/v1/tokenization_profiles/{id}?api_key={API_KEY}
{
"tokenization_profile": {
"name": "sample",
"type": "json",
"schema": {
"message_node": {
"selector": "$.data"
},
"card_node": {
"selector": "attributes.guarantee"
}
},
"card_token_placement": {
"type": "card_node",
"node": "token"
},
"card_node": {
"card_number": {
"selector": "card_number"
},
"cardholder_name": {
"selector": "cardholder_name"
},
"expiration_month": {
"selector": "expiration_date",
"transformation": "substring:0,2"
},
"expiration_year": {
"selector": "expiration_date",
"transformation": "substring:3,6"
},
"service_code": {
"selector": "cvv"
}
}
}
}
Copy {
"data" : {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"type" : "tokenization_profile" ,
"attributes" : {
"id" : "441928a5-6cf6-4735-ae95-8b1a27178d1c" ,
"name" : "sample" ,
"profile" : {
"type" : "json" ,
"schema" : {
"message_node" : {
"selector" : "$.data"
} ,
"card_node" : {
"selector" : "attributes.guarantee"
}
} ,
"card_token_placement" : {
"type" : "card_node" ,
"card_token_node" : "token" ,
"error_node" : "error"
} ,
"card_node" : {
"card_number" : {
"selector" : "card_number"
} ,
"cardholder_name" : {
"selector" : "cardholder_name"
} ,
"expiration_month" : {
"selector" : "expiration_date" ,
"transformation" : "substring:0,2"
} ,
"expiration_year" : {
"selector" : "expiration_date" ,
"transformation" : "substring:3,6"
} ,
"service_code" : {
"selector" : "cvv"
}
}
} ,
"created_at" : "2020-06-08T05:49:10.979Z" ,
"updated_at" : "2020-06-08T05:49:10.979Z"
}
}
}
Remove Tokenisation Profile
Method to remove a Tokenisation Profile
Request Success Response
Copy DELETE https://pci.channex.io/api/v1/tokenization_profiles/{id}?api_key={API_KEY}
Copy Status : 204 No Content