Re: Getting "Token validation failed" error in QueryAPI

Solved! Go to solution
amandeep
Regular Visitor

Getting "Token validation failed" error in QueryAPI

Hello,

 

I am getting "Token Validation failed" error in QueryAPI when I am trying to execute from postman. FYI I am getting Success for "Hello World" API and "Merchant push API". Please let me know if I am missing something. 

 

Request URL

https://sandbox.api.visa.com/visadirect/v1/transactionquery?acquiringBIN=408999

 

Response

{
    "responseStatus": {
        "status"401,
        "code""9209",
        "severity""ERROR",
        "message""Token validation failed",
        "info"""
    }
}
5 REPLIES 5
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: Getting "Token validation failed" error in QueryAPI

Hi @amandeep,

 

For the Query API, please use the GET method, see example below:

 

End Point https://sandbox.api.visa.com/visadirect/v1/transactionquery?acquiringBIN=408999&transactionIdentifie...
Method GET
Request
{}


Response
[{"accountNumberMasked":"495703xxxxxx0454","acquiringBin":"408999","actionCode":"00","amount":"124.02","approvalCode":"21324K","cardAcceptor.idCode":"Cardacceptor_1","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"","responseCode":"5","retrievalReferenceNumber":"532018886398","statusCode":"COMPLETED","systemsTraceAuditNumber":"886398","transactionCurrencyCode":"840","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:21:26","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"495703xxxxxx0454","acquiringBin":"408999","actionCode":"00","amount":"124.02","approvalCode":"21324K","cardAcceptor.idCode":"Cardacceptor_1","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"","responseCode":"5","retrievalReferenceNumber":"412412886651","statusCode":"COMPLETED","systemsTraceAuditNumber":"886651","transactionCurrencyCode":"840","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:21:26","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"499001xxxxxx3078","acquiringBin":"408999","actionCode":"00","amount":"124.02","approvalCode":"98765X","cardAcceptor.idCode":"Cardacceptor_1","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"","responseCode":"5","retrievalReferenceNumber":"812810887406","statusCode":"COMPLETED","systemsTraceAuditNumber":"887406","transactionCurrencyCode":"840","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:21:27","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"499001xxxxxx3078","acquiringBin":"408999","actionCode":"00","amount":"124.02","approvalCode":"98765X","cardAcceptor.idCode":"Cardacceptor_1","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"","responseCode":"5","retrievalReferenceNumber":"424112887654","statusCode":"COMPLETED","systemsTraceAuditNumber":"887654","transactionCurrencyCode":"840","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:21:27","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"495703xxxxxx0454","acquiringBin":"408999","actionCode":"00","amount":"124.02","approvalCode":"21324K","cardAcceptor.idCode":"Cardacceptor_1","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"AB1","responseCode":"5","retrievalReferenceNumber":"511316884778","statusCode":"COMPLETED","systemsTraceAuditNumber":"194135","transactionCurrencyCode":"840","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:21:33","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"495703xxxxxx0454","acquiringBin":"408999","actionCode":"00","amount":"124.02","approvalCode":"21324K","cardAcceptor.idCode":"Cardacceptor_1","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"AB1","responseCode":"5","retrievalReferenceNumber":"415316885050","statusCode":"COMPLETED","systemsTraceAuditNumber":"649131","transactionCurrencyCode":"840","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:21:33","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"495703xxxxxx0454","acquiringBin":"408999","actionCode":"00","amount":"100","approvalCode":"21324K","cardAcceptor.idCode":"Cardacceptor_1","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"","responseCode":"5","retrievalReferenceNumber":"428314884778","statusCode":"COMPLETED","systemsTraceAuditNumber":"990573","transactionCurrencyCode":"840","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:21:33","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"495703xxxxxx0454","acquiringBin":"408999","actionCode":"00","amount":"100","approvalCode":"21324K","cardAcceptor.idCode":"Cardacceptor_1","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"","responseCode":"5","retrievalReferenceNumber":"836116885050","statusCode":"COMPLETED","systemsTraceAuditNumber":"696884","transactionCurrencyCode":"840","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:21:33","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"495703xxxxxx0454","acquiringBin":"408999","actionCode":"00","amount":"10","approvalCode":"21324K","cardAcceptor.idCode":"CAIDCode77765","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"","responseCode":"5","retrievalReferenceNumber":"113700932604","statusCode":"COMPLETED","systemsTraceAuditNumber":"932604","transactionCurrencyCode":"356","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:22:13","transactionType":"CRED VOUCHER"},{"accountNumberMasked":"462294xxxxxx1113","acquiringBin":"408999","actionCode":"00","amount":"1000","approvalCode":"98765X","cardAcceptor.idCode":"CA-IDCode-77765","cardAcceptor.name":"ABC XYZ","feeProgramIndicator":"","responseCode":"5","retrievalReferenceNumber":"433520303192","statusCode":"COMPLETED","systemsTraceAuditNumber":"503192","transactionCurrencyCode":"356","transactionDate":"17-05-2021","transactionIdentifier":"234234322342343","transactionTime":"00:40:03","transactionType":"CRED VOUCHER"}]


Best,
Stacey

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

Re: Getting "Token validation failed" error in QueryAPI

Hi,

I am still getting same error.

 

{
    "responseStatus": {
        "status"401,
        "code""9209",
        "severity""ERROR",
        "message""Token validation failed",
        "info"""
    }
}
amandeep
Regular Visitor

Re: Getting "Token validation failed" error in QueryAPI

Also, getting same error for "Foreign Exchange Rates API" and "/fundstransferinquiry API". Only "Hello world API" and "Merchant Push Payment API" is returning proper response.

 

Looking forward for your help on this.

amandeep
Regular Visitor

Re: Getting "Token validation failed" error in QueryAPI

All APIs are working now. MLE was enforced due to which I was getting this error.

 

Thanks for your support and time!

SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: Getting "Token validation failed" error in QueryAPI

Nice catch @amandeep! Thanks for sharing!


Best,
Stacey

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