Re: using POSTMAN creating x-pay-token and using CyberSource API

DaVinceCoder
Helper

using POSTMAN creating x-pay-token and using CyberSource API

Hello Guys,

I just want to share on how to use POSTMAN to test one of the API(CyberSource) Generate Key API in Visa Developer.

-Note : You need to add a project first in your developer account and add the CyberSoure Payment API

1) In Postman set the URL endpoint .Screen Shot 2019-01-11 at 7.47.25 PM.png

2) I then go to the Pre-Requisite Script tab in order to generate x-pay-token needed for the generating keys API 

(Javascript language and POSTMAN is supporting Nodejs runtime) 

Screen Shot 2019-01-11 at 7.46.27 PM.png

3) Setting the x-pay-token header . The global variable {{xpaytoken}} is set in Pre-Requiesite Script tab.

Screen Shot 2019-01-11 at 7.47.41 PM.png

4) I have set the request body in Body->raw option and set dropdown to JSON(Application/json) for the API Generating Keys 

Screen Shot 2019-01-11 at 7.47.00 PM.png

5) In order to press the send button. You should see the same response below 

 

Screen Shot 2019-01-11 at 7.48.12 PM.png

Thanks Guys! Happy coding. 

3 REPLIES 3
jvenkata
Community Moderator

Re: using POSTMAN creating x-pay-token and using CyberSource API

Hello,

 

Great Job ! Thanks for sharing !!

 

Thanks,

Jai

DaVinceCoder
Helper

Re: using POSTMAN creating x-pay-token and using CyberSource API

Hello Jai,

 

I'm glad to help and share idea's to help the developer community.

DarylDixon
Dabbler

Re: using POSTMAN creating x-pay-token and using CyberSource API

Anybody else work with this company? They have like a million guides that can be quite confusing. I keep getting declined on a capture test from an auth with token and they told me I am sending level three data for a capture .. can anybody explain this? Is grand total purchase a level three field ?