Hi, Please could you help me with cof and postman
My body request:
{
"requestHeader": {
"requestMessageId": "6da6b8b024532a2e0eacb1af58581",
"messageDateTime": "2019-02-35 05:25:12.327"
},
"requestData": {
"pANs": [
4072208010000000
],
"group": "STANDARD"
}
}
My pre-request script in postman:
var resourcePath = 'cofds-web/v1/datainfo';
var queryParams = 'apiKey=*************************';
var sharedSecret = '*************************';
var postBody = pm.request.body.raw;
console.log("body = " + postBody)
var timestamp = Math.floor(Date.now() / 1000);
var preHashString = timestamp + resourcePath + queryParams + postBody;
var hashString = CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA256(preHashString, sharedSecret));
var xPayToken = 'xv2:' + timestamp + ':' + hashString;
postman.setEnvironmentVariable('x-pay-token', xPayToken);
My correlation id
X-CORRELATION-ID:"1685025727417_671818728-5c8c48b66-9VDPWS"
request headers:
I try with many scripts and always is the same error, please if you have any tip or information.
the error is:
{
"responseStatus": {
"status": 401,
"code": "9207",
"severity": "ERROR",
"message": "Token validation failed",
"info": ""
}
}
Solved! Go to Solution
Thank you for reaching out, @moises! An agent is looking into this and will get back to you as soon as possible. In the meantime, if any community members know a solution, feel free to reply here.
Any update ?
Hi @moises,
If you are attempting to call the Card on File Data Inquiry API, this product's authentication method is Two-Way SSL, not X-Pay Token. You can find more information on Two-Way SSL here:
The 9207 Token Validation Error you're seeing is usually due to an invalid JWE payload; please refer to the Visa Developer X-Pay Token guide for more information:
Thanks,
Illana