Payment search service call from postman throwing error response status 401

bhaskar_de
Regular Visitor

Payment search service call from postman throwing error response status 401

Hello All,

 

I have created an application CyberSourcePaymentApi in the dashboard and got  1. Api Keys and 2. x-pay-Token . Having had them I tried to call payment search service using the following data in Postman UI for restful service calls.

 

URL : POSThttps://sandbox.api.visa.com/cybersource/payments/v1/search?apikey=M1EONEY935VIDPVOK81J21HLAS_Nx8qXx...

 
// Header
content-type: application/json
x-pay-token: {generated while creating the application in the dashboard}
 

// Body

{
  "limit": 10,
  "offset": 1,
  "query": "accountSuffix=1111"
}
 
 
On sending the reqeust to the above service I am getting the following error
 
{
"responseStatus": {
"code": "9101",
"severity": "ERROR",
"message": "Token validation failed",
"info": "",
"status": 401
}
}
 
 
I am receiving the same response for all the service calls. 
 
Would somebody please figure where I am going wrong. Did I not get the right X-Pay-Token ?
 
Regards
 
Bhaskar De
 
 
 
3 REPLIES 3
ricardo_visa
Community Scholar

Re: Payment search service call from postman throwing error response status 401

Hi Bhaskar,

 

Looking into this for you.

 

-Ricardo




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

Re: Payment search service call from postman throwing error response status 401

Bhaskar,

 

Can you send your client code that generated the x-pay token, once we have that this can be looked into.

 

Thank you,

Ricardo




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

Re: Payment search service call from postman throwing error response status 401

Hi Ricardo,

 

The client java code , from what I saw last night , was working fine sending me right response but if I try to use the same request with same api key and x-pay-token was throwing the 401 error.

 

Is it so that tools such as SOAP UI and Postman can not be used here? I initially tried to feed the above data into Postman and SOAP UI with the right headers and body as given in the sandbox . But was getting the error

 

{
"responseStatus": {
"code": "9101",
"severity": "ERROR",
"message": "Token validation failed",
"info": "",
"status": 401
}
}

 

Regards

 

Bhaskar De