Introducing the Paystack Postman workspace

Test drive the Paystack API and build new payments experiences faster than ever

Article Feature Image

As a developer, it’s valuable to test an API, and to understand its behavior and payloads firsthand. That’s why we’re excited to share our new Postman workspace with you today!

Postman is a platform where developers document, test, and explore APIs. While we’ve always had a Postman collection, our new Postman workspace provides features that allow us improve the API exploration experience for you. These features include:

  • A comprehensive repository: The workspace allows us to group related APIs and collections easily. This allows you to explore the general Paystack collection and other specific use cases in a single space.
  • Version control: With the ability to create forks and pull requests (PRs), you can quickly access the latest collections and APIs.
  • Collaboration: As a developer, you can contribute to the workspace by making a pull request with a modification you made.

The collections in our Postman workspace are generated directly from Paystack’s open-source OpenAPI specification. This makes it easier for us to keep the collection up to date with changes on the Paystack API, which means that you can contribute to the Postman collection by opening PRs on the OpenAPI spec!

Start building in the new Paystack Postman workspace

Test drive the Paystack API and build new payments experiences faster than ever

Explore the Paystack Postman workspace

How to get started

To get started with the Paystack Postman workspace, navigate to the workspace URL in your browser.

Image

If you’re using the Postman desktop app, you can search for Paystack within the search box in the top bar, then select Paystack API from Paystack Developers from the list of results.

Image

The leftmost section of the workspace contains the navigation bar for accessing the various sections of the workspace. Select Collections from the nav bar, which should reveal a list of the collections in the workspace. There’s a general collection for all Paystack APIs and collections for common use cases. The main section of the overview page describes how to use the workspace and its collections.

Once you’ve familiarized yourself with the workspace, you’ll need to set your Paystack test secret key as an environment variable, to test the APIs. You can retrieve your test secret key by visiting your Paystack dashboard. The workspace comes with a default environment called Paystack Test Mode, which in turn has the paystack_secret_key variable. You need to set the value of this variable to your Paystack test secret key by clicking on Environment > Paystack Test Mode and replacing the value. You should also make sure to set the active environment to Paystack Test Mode in the top-right corner.

Image

Explore the Paystack APIs

The Paystack API is a collection of different endpoints to help developers accept and send payments in Africa. To get started, navigate to the Paystack collection, select the Transaction folder and click the Initialize Transaction endpoint. The main pane displays the URL you’ll be calling and the request payload you’ll be passing on the API call. Update the values in the payload using your preferred test values, then hit the send button to make the API call.

Image

At Paystack we use HTTP codes for our responses. We have three categories of response codes. A 2xx response code means your request is successful. A 4xx error means your request parameters aren’t correct - you should confirm that you’re passing the correct parameters. A 5xx error means we couldn't process your request. You should try again or check our status page to ensure that all our APIs are up and running.

Collections for common use cases

Image

On Paystack’s Developer Relations team, we spend a lot of our time supporting developers who are integrating Paystack’s APIs. This gives us the opportunity to learn a lot about the types of applications developers are building.

We’ve realized that there are some common use cases for Paystack’s APIs and that we could better support developers by creating collections for those specific use cases. So far, we’ve created collections for:

  • Lending
  • Savings
  • Memberships
  • Wallets
  • Betting
  • Online marketplaces

If you’d like to add wallet functionality to your application, the “Create a wallet app” collection contains all the Paystack endpoints you need to achieve your goal. If you can’t find your use case, no worries! We’ll update this list of use cases consistently.

Would you like to contribute to the workspace?

Developers are building amazing products and powering their payments with Paystack. As you interact with the Paystack Postman workspace, we invite you to help us improve the experience in the following ways:

  • Create more collections - the collections in the workspace are generated from our open-source OpenAPI specification. If you’re familiar with YAML and OpenAPI, you can create a collection and create a pull request. Once merged, it’ll be made available on the workspace.
  • Report an issue - If you observe any errors (incomplete parameters, typos, or you’d just like to request a collection for your use case) you can help other developers by opening an issue on the OpenAPI repo. This puts the issue on our radar for a resolution.

We look forward to all the amazing payments tools you'll build 💙

Make a contribution to the Paystack Postman workspace

Is there a use case you’d like to see in our Postman workspace?

Share it with us here
Introducing the Paystack Postman workspace - The Paystack Blog Introducing the Paystack Postman workspace - The Paystack Blog