Verified 11 September 2026
Pesapal API and Sandbox Test Cards
By David Wachira · Pesapal hub · paybillke is an independent guide and is not affiliated with Pesapal.
Pesapal offers an API to accept payments online, with a sandbox for safe testing. Testing first is important, because you never want to discover an integration bug with real customer money.
The flow
- Get your Pesapal API credentials.
- Connect the API to your site or store, or use a Pesapal plugin.
- Test in the sandbox using Pesapal test cards, which simulate card payments without moving real funds.
- Confirm success and failure cases behave correctly.
- Switch to production and go live.
What test cards are for
Test cards let you run through a full payment in the sandbox, including approvals and declines, so you can be sure your checkout, callbacks and order updates all work before real money is involved.
Good practice
Test both a successful payment and a failed one, verify your callback updates the order, and only move to production keys once every path is handled. Keep your API keys secret.
Frequently asked
Is there a sandbox?
Yes.
What are test cards for?
Simulating payments without real funds.
When do I go live?
After testing passes, switch to production.