Skip to main content
The sandbox at https://sandbox-api.kwugwo.africa behaves like live, but every PSP runs in its own test mode, so no real money moves.

Set up sandbox

1

Switch the dashboard to sandbox

Sandbox has its own workspace, keys, checkouts and webhooks. Nothing is shared with live.
2

Connect a PSP with its test credentials

Use the test (sandbox) API credentials from your PSP’s dashboard, not the live ones.
3

Create a checkout

Enable the mediums you want to test (for example bank transfer and USSD) and route them to that PSP.
4

Generate a sandbox secret key and register a webhook

Use a tunnel such as ngrok or cloudflared so Kwugwo can reach your local server.
Sandbox IDs end in _t (ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwH_t), so test data is easy to spot in logs. See IDs and prefixes.

Simulating a payment

Kwugwo doesn’t hold or move money. Each payment is processed by your PSP, so how a sandbox payment completes depends on the PSP:
  • Completed automatically. For some PSPs, Kwugwo simulates the customer’s payment in sandbox: the activity moves to successful on its own shortly after you create it, and the webhooks fire as they would in live.
  • Completed with the PSP’s test tools. For others, you complete the payment yourself, for example by “paying” a test virtual account or approving a test charge from the PSP’s dashboard or test API. Use the psp_external_id on the activity to find the transaction there.
Check your PSP’s documentation for how to simulate payments in test mode, and which test bank accounts, USSD codes, OTPs and PINs it accepts.
If a sandbox activity stays in requires_action, the PSP is waiting for that simulated customer step.

What to test

Use your PSP’s test tools to cover declines and short payments where it supports them.

Going live

  • Connect your PSP with live credentials in the live dashboard, and recreate your checkouts.
  • Generate a live secret key and public key; store them separately from the sandbox ones.
  • Register your production webhook URL and set a signing secret.
  • Change the base URL to https://api.kwugwo.africa.
  • Allowlist 176.97.192.227 if your webhook endpoint is behind a firewall.
  • Make sure fulfilment runs only through the validate and fulfil checks.