Create a wallet app

Number of APIs: 5

Introduction

The Wallet collection, is a group of Paystack APIs that are needed to create a simple wallet application. You can learn more about building wallets in our Paystack for Wallets guide here.

Prerequisites

  1. Sign up on Paystack and retrieve your test Secret API Key. (see guide for more)
  2. Setup your API key as a collection variable on Qodex
  3. Checkout our Developer Docs and API Reference for detailed explanations

Getting Started

We’re going to assume you’ve already setup your Paystack account. Here's a guide on creating a Paystack account.

APIs in this collection

For the wallets use case, we have the following APIs:

  1. Customers API → You’ll use these APIs to create and validate a customer. This is required for Dedicated Virtual Accounts.
  2. Transfers API → You’ll use these APIs to move money to a customer’s bank account or mobile money accounts. In this use case, Transfers are used when the customer wants to change the wallet amount to real cash.
  3. Dedicated Virtual Account → A unique collection channel for businesses in Nigeria that helps merchants collect payments via bank transfers. This feature is currently enabled for businesses in Nigeria.
    Whenever a customer makes a transfer to that account (from their existing bank account), webhook events will be sent to your servers for you to top up their wallet balance. This feature is currently available for registered businesses in Nigeria.

Please checkout our Developer docs and API References for a deeper understanding of these APIs and their usage.

Adding the collection to your Qodex

Go to [Paystack’s public workspace] on Qodex and fork the collection you’re interested in testing.

Creating%20a%20fork

Give your collection a memorable label to differentiate it from the original collection and add it to your preferred workspace. Checking the “Watch original collection” option allows your collection to get updated as we update the collection.

labelling%20the%20forked%20collection

After importing it, you should see it in your collections sidebar with the label you provided.

forked%20use%20case%20on%20the%20sidebar

Importing collections from Github

If you’d like to use a different API testing tool, you can clone or fork the Paystack Open API repository from Github and use the files in the use_cases folder.

Setting up your API keys

Once you’ve setup your Paystack account, get your test secret key and add it as a [collection variable] on the Variables tab on Qodex.

Adding%20test%20secret%20key%20to%20collection

Switch to the Authorization tab and clear the Token field and use two curly braces and enter the variable name you setup.

The value of secret_key should appear when you hover your mouse on the variable as shown below.

setting%20the%20secret%20key%20variable

If everything looks good, save your changes and you’re ready to explore the collection!

Using the collection

Each endpoint in the collection has example request data and responses. The responses show you how the API responds for different scenarios.

  1. Create Dedicated Account POST {{baseUrl}}/dedicated_account

  2. Create Transfer Recipient POST {{baseUrl}}/transferrecipient

  3. Initiate Transfer POST {{baseUrl}}/transfer

  4. customer - Create Customer POST {{baseUrl}}/customer

  5. customer - Validate Customer POST {{baseUrl}}/customer/:code/identification