Getting "Expected input credential was not present" when using visa par inquiry API

prashanthshetty
Regular Visitor

Getting "Expected input credential was not present" when using visa par inquiry API

Hi,

I'm able to successfully perform mutual auth using sample hello world api. However when I try to use the VISA PAR API, getting "

Expected input credential was not present" error. 

I have followed the steps present in the below message level encryption guide, 

https://developer.visa.com/pages/encryption_guide

 

The X-CORRELATION-ID for one of the request is as below.

X-CORRELATION-ID: 1578086293_963_1985815249_l73c018_VDP_WS

 

Can someone in the community please help to understand the reason when this error is triggered.

{"responseStatus":{"status":400,"code":"9125","severity":"ERROR","message":"Expected input credential was not present","info":""}}

6 REPLIES 6
API_Managers
Visa Developer Support Specialist

Re: Getting "Expected input credential was not present" when using visa par inquiry API

Hey @prashanthshetty,

 

Happy New Year and I'm happy to help you resolve the issue. To continue, please provide the following information:

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

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




Thanks,

Tee



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

prashanthshetty
Regular Visitor

Re: Getting "Expected input credential was not present" when using visa par inquiry API

Happy new year!

 

Please find the details as below:

 

Endpoint: https://sandbox.api.visa.com/par/v1/inquiry

Request Body: 

     {
           "clientId": "0123456789012345678901234567999",
           "correlatnId": "0123456789012345678901234567000",
           "primaryAccount": "1234567898123456"
      }

 

Response Header (include the x-correlation-id)

      

HTTP/1.1 400 Bad Request [Server: nginx, Content-Type: application/json;charset=UTF-8, Content-Length: 130, X-SERVED-BY: l73c013, X-CORRELATION-ID: 1578096782_274_1565485890_l73c013_VDP_WS, X-APP-STATUS: 400, X-Frame-Options: SAMEORIGIN, X-XSS-Protection: 1; mode=block, X-Content-Type-Options: nosniff, Strict-Transport-Security: max-age=2592000;includeSubdomains, Cache-Control: no-cache, no-store, must-revalidate, Pragma: no-cache, Expires: -1, X-Cnection: close, Date: Sat, 04 Jan 2020 00:13:02 GMT, Connection: close] [Content-Length: 130,Chunked: false]

 

Response Body:

{"responseStatus":{"status":400,"code":"9125","severity":"ERROR","message":"Expected input credential was not present","info":""}}

 

Please note that I'm using test java app to test this API. With the same encryption keys, it did work with "Visa Developer Center Playground"

 

I did follow the steps provided in the below url:

https://developer.visa.com/pages/encryption_guide#sample_code_java

 

Thanks!

 

 

prashanthshetty
Regular Visitor

Re: Getting "Expected input credential was not present" when using visa par inquiry API

Hi,

 

The issue is resolved now. Was setting the keyId in JWEHeader, however looks like this had to be set in the HTTPHeader.

 

Can you please let me know if there is any sample code I can refer to for decrypting the response payload. (Please note the sample presented in the below page talks only about encrypting the request, but not on how to decrypt the response).

https://developer.visa.com/pages/encryption_guide

API_Managers
Visa Developer Support Specialist

Re: Getting "Expected input credential was not present" when using visa par inquiry API

Hey @prashanthshetty,

 

Thanks for letting us know how you resolved the issue 🙂

Regarding your question on sample code for decrypting the response payload, I'll get back to you soon on this.

 

 




Thanks,

Tee



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

API_Managers
Visa Developer Support Specialist

Re: Getting "Expected input credential was not present" when using visa par inquiry API

Hey @prashanthshetty,

 

To answer your question, we do not have a decryption sample code explicitly. To decrypt the payload response, you would need to use the JWE Object decrypt function and correct certificate.

Hope that helps and have a good day!




Thanks,

Tee



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

davidatmeew
Occasional Visitor

Re: Getting "Expected input credential was not present" when using visa par inquiry API

In my case, I was getting this response code due to the payload of the request.

 

I solved it by using the test payload given in the API documentation (https://developer.visa.com/capabilities/visa_direct/reference#visa_direct__funds_transfer__v1__pullf...) and secondly, making sure my request included the content-type header, in my case:

 

 

 

headers["Content-Type"] = 'application/json'

 

 

If you are using ruby, make sure you cast the payload to JSON:

 

 

{the_test_payload}.to_json