Young Developers - Using Postman to test APIs

Document created by gjsissons on Mar 29, 2017Last modified by gjsissons on Apr 10, 2017
Version 4Show Document
  • View in full screen mode

 

About Postman

 

Postman is a utility that makes it easy to exercise different types of APIs by allowing you to easily construct headers and send JSON, XML or key-value pairs to an internet endpoint..

 

If you don't have access to an environment that runs cURL, you can exercise Vantiv's payment APIs using Postman at http://getpostman.com.

 

You can download Postman for MacOS, Windows or Linux or run it as an application in the Chrome browser.

 

Call Vantiv's eCommerce platform using Postman

 

To create a test transaction with Vantiv's eCommerce (Litle) platform in Postman follow the directions below:

 

  • Create a POST transaction to the URL https://transact-prelive.litle.com/vap/communicator/online
  • In the Authorization tab select "NoAuth" (because authorization is provided in the body of the message)
  • In the Headers tab create a key called "Content-type" and give it the value "text/xml"
  • In the Body tab set the encoding to "Raw" and include the XML for "eCommerce Example 1" (starting with <litleOnlineRequest ... >) , and paste it in the Postman body.   When you execute the Authorization request in Postman you should see a response like the one below.

 

postman_ecommerce_example.JPG

 

Call Vantiv's In-Store (Express) platform using Postman

 

To create a test transaction with Vantiv's in-Store (Express) platform in PostMan use the settings below:

 

  • Create a POST transaction to the URL https://certtransaction.elementexpress.com/
  • In the Authorization tab select "NoAuth" (because authorization is provided in the body of the message)
  • In the Headers tab create a key called "Content-type" and give it the value "text/xml"
  • In the Body tab set the encoding to "Raw" and include the XML for "In-store Example 1" (starting with <CreditCardAuthorization ...>) , and paste it in the Postman body.   When you execute the Authorization request in Postman you should see a response like the one below.

 

postman_express_example.JPG

 

Calling eProtect using Postman

 

To send a request to the eProtect endpoint, set the http method to POST as shown and set the endpoint to https://request-prelive.np-securepaypage-litle.com/LitlePayPage/paypage

 

Select "Headers" and enter "Content-Type" as the first key and "application/x-www-form-urlencoded" as the first value.  These are the only headers you should need for eProtect.  Postman will generate additional headers, and for eProtect the authentication credentials are in the payload of the message

 

postman-eprotect-headers.JPG

 

Next, select "Body", select "x-www-form-urlencoded" and enter the key value pairs as shown. The key-value pairs are replicated in a table below for convenience.

 

Click "Send" once the values are entered correctly and you should receive back a JSON response.

 

If the message is "Success", the paypageRegistrationId will contain the low-value token (LVT) that you can use to process a credit card number in place of the credit card.

 

postman-eprotect-body.JPG

 

For clarity, the values to post in the Body of the Postman request are repeated below:

Keyvalue
paypageIda2y4o6m8k0
reportGroup67890
orderIdcust_order
accountNumber5454545454545454
cvv111
id12345

Attachments

    Outcomes