Re: Do you need to use key file and .pem file to access visa direct api?

yibs
Helper

Do you need to use key file and .pem file to access visa direct api?

I did the following in .NET

 httpWebRequest.ContentType = "application/json";
            httpWebRequest.Method = "POST";
            httpWebRequest.Accept = "application/json,application/octet-stream";
            String username = "usernamehere";
            String password = "passwordhere";
            String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password));
            httpWebRequest.Headers.Add("Authorization",encoded);

 

Im getting an error 500. Do I need to include files when im making a post request?

 

5 REPLIES 5
API_Products
Visa Developer Support Specialist

Re: Do you need to use key file and .pem file to access visa direct api?

Hey @yibs,

 

I'll take a look and get back to you soon!

 




Thanks,

Diana H.



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

yibs
Helper

Re: Do you need to use key file and .pem file to access visa direct api?

Hi @DianaTran-Yee

 

any luck?

API_Products
Visa Developer Support Specialist

Re: Do you need to use key file and .pem file to access visa direct api?

Hey @yibs,

 

Yes, you will need to use key file and .pem file.

 

Are you able to successfully test “Hello World” example with SOAP UI? If yes, Please share screen shots and response header having correlation ID to evaluate error further.

 

Please follow the Authentication Two-Way SSL guide here and follow the steps in its specific sequence  - https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl

 

If you're still experiencing an issue, to further investigate, please provide the following information:

1. End Point
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,

Diana H.



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

yibs
Helper

Re: Do you need to use key file and .pem file to access visa direct api?

Where can I find the SOAP UI to test out the Hello World?

API_Products
Visa Developer Support Specialist

Re: Do you need to use key file and .pem file to access visa direct api?

Hey @yibs,

 

You can download SoapUI 5.4 from http://www.soapui.org

 

Each step in the Working with Visa APIs guide outlines what it takes to get your project off the ground. From finding a use case that meets your needs, to launching that project to your customers. Please follow the Working with Visa APIs guide to create a project and for sandbox testing here - https://developer.visa.com/pages/working-with-visa-apis

 

After you've registered on the VDP portal and created a project you should click on the Authentication > Two-Way SSL link here - https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl

 

Please follow the Two-Way SSL guide step by step and in sequence to have it successfully work.

 

You'll need to use the Visa Direct project app Test Data (refer to screenshot below).

20190905 Test Data.png

 

You can also use our Visa Direct Code Explorer to see a sample request and response payload here (refer to screenshot below) - https://developer.visa.com/capabilities/visa_direct/reference 

 

20190717 Visa Direct Code Explorer example.png

 

Please let us know if you have other questions and someone will be happy to help!

 




Thanks,

Diana H.



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