When creating an account with pawaPay, you will first receive access to our sandbox environment. The sandbox environment is completely isolated from our production environment.

You can safely test your integration with pawaPay without real mobile money wallets and real money involved immediately after creating your pawaPay account.

Access to your production account, where live payments can be made, will be granted after completing the onboarding on your sandbox account.

Now that you have an account in our sandbox, let’s look at how to start integrating.

Where is the API?

The base URL for the pawaPay Merchant API is different between our sandbox and production environments.

EnvironmentBase URL
Sandboxhttps://api.sandbox.pawapay.io/
Productionhttps://api.pawapay.io/

The specific operation can be called by appending the endpoint to the base URL.

Example: https://api.sandbox.pawapay.io/v2/payouts

The base URLs are different between sandbox and production accounts. Please store them in your application’s environment-specific configuration.

Where is the pawaPay Dashboard?

From the pawaPay Dashboard you can:

  • Set up callback URLs
  • Generate an API token
  • See all accepted payments
  • See financial statements
  • Invite users
  • Control access levels
  • And much more

As our sandbox environment is completely isolated from our production environment, the URLs to access the pawaPay dashboard are different.

EnvironmentDashboard URL
Sandboxhttps://dashboard.sandbox.pawapay.io/
Productionhttps://dashboard.pawapay.io/

How to authenticate calls to the Merchant API

The pawaPay Merchant API uses a bearer token for authentication. An authorization header is required for all calls to the pawaPay Merchant API.

The token can be generated from the pawaPay Dashboard. Instructions on how to do that can be found in the pawaPay Dashboard Docs.

Below is an example payout request with curl:

curl -i -X POST \
https://api.sandbox.pawapay.io/payouts \
-H 'Authorization: Bearer <YOUR_API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"payoutId": "33f30946-881d-40bc-8ca2-94aa4cd467ac",
"amount": "15",
"currency": "ZMW",
"recipient": {
    "type": "MMO",
    "accountDetails": {
        "phoneNumber": "260763456789",
        "provider": "MTN_MOMO_ZMB"
        }
    }
}'

The API tokens are different between sandbox and production accounts.

When moving from sandbox to production a new API token must be generated from the production pawaPay Dashboard.

Please store the API token in your application’s environment specific secure storage.

If you are looking to add a second layer of security, you can implement Signatures to ensure security even if your API token should leak.

Setting up callbacks

As the pawaPay API is asynchronous, we recommend implementing a callback handler in your application to find out about the final status of your payments as soon as they are processed.

You can read more about how to do that from the pawaPay Dashboard docs.

When configured, we will send you a callback with the final status of a payment to your configured callback URL. Read more about callbacks.

Starting to build the integration

Now you are all set to integrate with the pawaPay Merchant API.

Play in Postman

Test and get a feel for the API using our Postman collection.

Testing the integration

You can test the pawaPay Merchant API and Dashboard with your sandbox account right after signing up. You do not need to go through the onboarding process for that since no real money is involved.

There are special phone numbers available to simulate successful and different failure cases.

It is not possible to see the authorization flows (i.e. entering the PIN prompt) in sandbox.

Here’s a few helpful resources to get everything you need to start integrating and testing.