Postman
Overview
Postman is a HTTP client for testing web services which makes it easy to test APIs by providing a simple interface for making API requests and viewing responses.
Getting Started
Postman Collection
The easiest way to get started using our API is to use our Postman Collection. Postman is a free client application that enables you to make calls using API easily. To make integrating with our API easier, we have created Postman Collection of all our endpoints so that you can test our APIs more easily.
The following is an outline of actions to get started with Postman
You’ll need to create a Xendit account to access Xendit APIs via Postman Collection
Authorize Your Account to Perform API Call
You can authorize your account by converting your Xendit Secret Key to a Base64-encoded Authorization header
- Open Postman and select any API in API-Xendit collection you would like to try (in this tutorial, let’s select GET Balance API)
- Obtain your Xendit Secret key. Visit Xendit Dashboard and navigate to API Keys Settings tab
- Create Secret API key. Copy the API key
- In Postman, navigate to Authorization tab and select Basic Auth from Type dropdown. Paste your Secret API key in Username field and left the Password empty. Click Preview Request to complete this step.
- You have now authorized your API! You can find Authorization field alongside its value in Header tab > Temporary Header section to verify the result
- Learn about API Integration API keys here
Make Your First API Call
- Try getting your balance by hitting the blue Send button. In the response area below, you should get your latest Cash balance
- If you can get your balance successfully, you are all set up! Feel free to explore our other APIs by selecting it in the collection and launching it
Optional - Create Environment in Postman
To skip authorization processs for each API call, you can create a new environment to save your authorization credentials for future usage. Here's how you can do it
- In Postman, navigate to Header tab. Find and copy Authorization value in Temporary Headers section
- Navigate to the upper right corner to find and click gear icon
- In the Manage Environment window, add a name to the environment (let's name it Xendit Testing for now)
- Type Authorization in Variable column and paste your Authorization value from step 8.1 in Current Value column
- Click Add button to save
- Close Manage Environment window
- On the left side of the gear icon, select your new Xendit Testing environment
- Select an API and navigate to Header tab. Rename the Authorization value to {{Authorization}}
Last Updated on 2023-06-02