MLE error Token Validation 9210


MLE error Token Validation 9210


I have issues when I deploy the Visa Direct service Project on Test server.

The MLE function works well on my computer. But as soon as I deploy it on the local test server (apache tomcat on Linux), the MLE returns error on Token Validation, but the two way ssl works well.

Kindly assist on what could be the issue.

Response detail:

401 Unauthorized: [{"responseStatus":{"status":401,"code":"9210","severity":"ERROR","message":"Token validation failed","info":""}}].


Full stack web Developer
Visa Dev Moderator

Re: MLE error Token Validation 9210

Hello @Russel,


The 401 Token Validation Failed error you're getting will be seen when the x-pay-token sent in the header is invalid. 

Few things to note while generating the token: 

  1. For starters, please follow the getting started documentation to generate a valid token. 
  2.  APIkey in the url query param should be the same as the one used to generate xpayToken 
  3. “resourcePath” sent in the xpaytoken has to be as per the documentation (eg: v2/payments?apikey={apikey}). 
  4. Payload sent in the request payload should exactly match along with spaces to the “requestBody” value used in xpaytoken. 

Can you please provide the request payload of this API call? It's possible that you're missing a field or have an inaccurate format. I'd like to see screenshot attachments of the error provided, if possible. 


Also, could you check to see if you're passing a correct value for URI. For example, make sure it’s defined correctly in the beginning of your code, and use the same value for the URI in the middle of your code. In general, for cases like this (i.e. “helloworld works, but the API XX doesn’t”). 


Thank you, 


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