Payments Scheme

Testing with Postman

Learn how to test using Postman

Postman is a popular API testing tool that allows you to send HTTP requests and inspect responses. The Postman collections can be used to test the API in the sandbox environment to understand the API behavior and test the integration.

Prerequisites

Before you begin, ensure you have:

Testing in Sandbox

Sandbox returns static sample responses and does not contain any application logic. It may not be suitable for full qualification testing.

Sandbox is recommended for developers who want to learn and understand the authentication method and for developers who are trying to set up the developer tools aimed to make integration easier. It ensures the application generates valid requests and can consume valid responses conforming to OpenAPI specifications.

Steps to configure and test an API

Swift provides Postman collections for each API that can be used to test the API in the sandbox environment.

Run the collection

Clicking on the Run in Postman button will open the collection in the Postman web interface.

APIAuthenticationPostman Collection
Payment Pre-validation APIJWT Bearer Grant TypeRun Payment Pre-validation API in Postman
Tracker Frontend APIPassword Grant TypeRun Tracker Frontend API in Postman
Network InteroperabilityJWT Bearer Grant TypeRun Network Interoperability in Postman

Fork the Collection

After clicking on the Run in Postman button, you will be redirected to Postman. Click on the Fork Collection button to create a copy of the collection. Fork Collection

Configure environment variables

Application credentials can be found in the application details page in the Developer Portal.

Set up the required variables for authentication:

  1. Click the imported collection
  2. Replace the values in the collection variables with your actual credentials:
VariableDescription
consumer_keyYour application's Consumer Key
consumer_secretYour application's Consumer Secret

Configure Variables

Get an access token

  1. Open the Setup folder
  2. Click Send Retrieve token
  3. Verify that an HTTP 200 OK response is returned

Make API requests

Access tokens typically expire after a set period (e.g., 30 minutes). If you receive a 401 Unauthorized error, request a new access token.

  1. Select a request from the collection
  2. Update any path parameters or query parameters as needed
  3. Click Send to execute the request
  4. Inspect the response in the lower panel

On this page