How to access VISA API through Postman for a study assignment where I need to create API automation.

Solved! Go to solution
kamalmehta
Regular Visitor

How to access VISA API through Postman for a study assignment where I need to create API automation.

Hi Community,

Thanks in Advance.

I need to access any two API's GET and POST of visa through Postman and need to create API automation using Java library like HTTP or rest assured. 

I am not sure if I can directly access the API's through Postman and consume it with any sample data. I am new to the visa developer community. Please suggest how can I access any API and create an automation test on that API.

 

Regards,

Kamal

 

 

3 REPLIES 3
API_Products
Visa Developer Support Specialist

Re: How to access VISA API through Postman for a study assignment where I need to create API automat

Hey @kamalmehta,

 

Postman is an API development and testing solution that allows developers to quickly create and execute RESTful API functional tests. Here's the user guide for Postman – https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl#testing_twoway_ssl_connectivity_... 
 

To get started with your Visa Developer application project, please refer to the "Working with Visa APIs" link below to develop a Visa Developer application. https://developer.visa.com/pages/working-with-visa-apis 

 

The "Working With Visa APIs" guide provides the primary steps on how to create an application, credentials, and connection validation. After you're finished testing your App in sandbox, submit a production request and your Application will get evaluated. If you have other questions, please reach out to us and someone will be happy to help. 




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.

kamalmehta
Regular Visitor

Re: How to access VISA API through Postman for a study assignment where I need to create API automat

Hi Team,

 

Thanks for the help. I followed the solution and I am able to make one Post call "https://sandbox.api.visa.com/forexrates/v1/foreignexchangerates" but when I am trying to make a get call I am getting error although I added correct cert file and key file in certificates. Also in basic auth provided correct credentials.

image.png

API_Products
Visa Developer Support Specialist

Re: How to access VISA API through Postman for a study assignment where I need to create API automat

Hey @kamalmehta,

 

For error cause and resolution please go to this page or refer to below - https://developer.visa.com/pages/visa-developer-error-codes 

AuthN Error Codes

HTTP STATUS HTTP CODE CAUSE/RESOLUTION
UNAUTHORIZED 401

Depending on the authentication/encryption mechanism being used, this could be due any of the following reasons. If you are unable to root-cause the same from the possible reasons below, please contact Visa Support at developer@visa.com with the details of the error message, and full http request, response details.

Two-Way SSL (Mutual Authentication):

  • Authorization Header missing in the request.
  • Authorization Header in invalid format. It either does not start with 'Basic' or the userId or password fields are blank.
  • UserId or Password or Subject DN on the certificate is invalid.
  • You could be presenting a wrong client certificate for that environment.

X-Pay Token:

  • x-pay-token is blank or not in valid format.
  • Timestamp field not in valid UTC timestamp format.
  • Version field is invalid.
  • Token's timestamp is more than 8 minutes off from the current time.
  • Token hash mismatch.
  • APIKey not present in request.
  • APIKey is not active.
  • APIKey not valid.
  • APIKey not active.
  • The request contains an older version of x-pay-token than supported by the API/project. Please upgrade to the latest supported version. Consult the VDP Getting Started Guide for the same.

JWE: 

  • JWE Token format is invalid.
  • Kid not present in the token.
  • Token validation against Shared secret failed.
  • JWT Grant Type or Token value is either missing, empty or has multiple values.

JWS:

  • JWS token validation failed.
  • Kid extraction from header failed.
  •  JWT Grant Type or Token value is either missing, empty or has multiple values.
  • Kid missing in JWS header.

JWS/JWE:

  • JWT prefix not in proper format.
  • JWT in Request Body not a well-formed JSON.
  • JWT does not contain grant type field or grant type field is blank.
  • JWT does not contain assertions field or assertions field is blank.
  • JWT token value does not start with the appropriate bearer_JWT prefix.
  • APIKey is not active.
  • APIKey not valid.
  • APIKey not active.

This could be due to any of the following scenarios in Message Level Encryption (JWE):

  • KeyId in request is invalid.
  • KeyId not present in the request (JWE Header/Request Header).
  • JWE payload element in request is not in the proper format.
  • JWE token does not have iat header or token has expired.

General:

  • Request has more than one authentication tokens which is not supported.
  • Incoming http request does not contain any of the required authentication tokens for this API.
 

 




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.