Re: X-Pat Token , Visa Card Eligibility getting 105 error code using sandbox

shivang
Helper

X-Pat Token , Visa Card Eligibility getting 105 error code using sandbox

Url : https://sandbox.api.visa.com/visacardeligibilityservices/v1/cardeligibility/validate?apiKey={{api key}}

 

Request :

{
  "correlationId": "84E411BB-3C12-4D8E-897E-730E37F9B071",
  "vendorUniqueId": "19016_TstVDPPgm1",
  "requestTimeStamp": "{{body_Date}}",
  "permanentAccountNumber": "4000000000000011"
}
 
Response :
{
    "statusCode": "105",
    "statusDescription": "Invalid request object. Please check.",
    "CorrelationId": "84E411BB-3C12-4D8E-897E-730E37F9B071",
    "responseTimeStamp": "2/19/2024 3:52:57 PM",
    "eligibilityLevel": "0",
    "cardId": "0"
}
 
Postman Pre request Script :
var resourcePath = 'v1/cardeligibility/validate';
var queryParams = 'apiKey={{api key}}';
var sharedSecret = '{{ sharedSecret }}';
var postBody = pm.request.body.raw;
var moment = require('moment'); // require
let date_now = moment().utc();
var body_Date = date_now.format("MM/dd/yyyy hh:mm:ss a")
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)


getting Invalid request object. Please check. error , please help.
6 REPLIES 6
shivang
Helper

Re: X-Pat Token , Visa Card Eligibility getting 105 error code using sandbox

Got the fix for the above issue :
var body_Date = date_now.format("MM/DD/YYYY hh:mm:ss a")
body_date is not passing that why i am getting this issue after passing the body date i am facing Token Validation failed,

{
"responseStatus": {
"status": 401,
"code": "9159",
"severity": "ERROR",
"message": "Token Validation Failed",
"info": ""
}
}
shivang
Helper

Re: X-Pat Token , Visa Card Eligibility getting 105 error code using sandbox

Any update.
jenn_kh
Community Moderator

Re: X-Pat Token , Visa Card Eligibility getting 105 error code using sandbox

Hi @shivangThank you for reaching out. One of our agents will look into this and get back to you soon. In the meantime, if any community members know a solution, please feel free to reply to this thread.

API_Products
Visa Developer Support Specialist

Re: X-Pat Token , Visa Card Eligibility getting 105 error code using sandbox

Hi @shivang,

 

If you're still experiencing an error, please provide the following information. If the error is fixed, please let us know and I'll take you off my contact list.

1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

You can find the x-correlation-id in the response header.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

shivang
Helper

Re: X-Pat Token , Visa Card Eligibility getting 105 error code using sandbox

Working fine now, the issue is occurring because the request JSON is not the same one that I am passing for token generation.

Now is working fine.
API_Products
Visa Developer Support Specialist

Re: X-Pat Token , Visa Card Eligibility getting 105 error code using sandbox

Hi @shivang,

 

Thanks for letting us know the error is fixed. I'll close the case. 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.