Testing
The sandbox lets you exercise your whole integration — creating transactions, completing payments, and receiving callbacks — without moving real money.
| Sandbox | Production | |
|---|---|---|
| Base URL | api.test.sandbox.pesepay.com/payments-engine | api.pesepay.com/api/payments-engine |
| Money moved | None | Real |
| Keys | Test keys from the Merchant Control Panel’s home page | Live keys from each application |
The two base URLs differ in shape: production has /api before
/payments-engine and the sandbox doesn’t, so swap the whole base URL
rather than just the host.
The REST API examples use the sandbox URL, and the server libraries for Node.js, Python, PHP and Java each have a sandbox switch (the Ruby library calls production only). Embedded checkout is the exception: it is tested with small live payments on production keys, because the sandbox runs neither 3-D Secure nor the card providers’ forms. Swap in your production base URL and keys for the REST calls once you’ve worked through the go-live checklist.
What the sandbox supports
Section titled “What the sandbox supports”The sandbox is deliberately smaller than production. Plan your test matrix around what’s actually there:
| Sandbox | Production | |
|---|---|---|
| Currencies | USD only | USD and ZiG |
| Payment methods | EcoCash PZW211, Visa PZW204, Mastercard PZW205 | All methods |
| Amount limits | Different from production — Visa in particular is capped far lower | See the overview |
Because sandbox limits differ from production, an amount that passes here can be rejected live, and the EcoCash multi-part behaviour can’t be reproduced in the sandbox. Read the live limits from Get Payment Methods by Currency, a production endpoint, rather than assuming the sandbox’s match.
Test credentials
Section titled “Test credentials”Use these in the sandbox to deliberately trigger success and failure, so you can verify your integration handles both.
Mobile money
Section titled “Mobile money”| Brand | Number | CVV | Expiry | Result |
|---|---|---|---|---|
| Visa | 4867 9600 0000 5461 | 608 | Any future date | ✅ Successful transaction |
| Visa | 4867 9650 0500 5002 | 994 | Any future date | ❌ Failed transaction |
| CABS | 4054 0540 5405 4430 | 708 | Any future date | ✅ Successful transaction |
| CABS | 7047 0570 5705 5730 | 454 | Any future date | ❌ Failed transaction |
The CABS cards are locally issued test cards. The sandbox doesn’t offer Zimswitch, so they don’t exercise it; test Zimswitch with a small production payment.
Simulating failures
Section titled “Simulating failures”Beyond the happy path, exercise these before going live:
- A failed payment for every method you support. Use a failing test number or card and confirm your UI shows a clear message and lets the customer retry. Failures produce a result callback just like successes do, with a different status — that path is where integrations most often break.
- An amount over the method’s ceiling. Every method except EcoCash rejects these outright.
- The customer abandons the flow. Start a transaction, then close the tab before completing it. Confirm your reconciliation eventually resolves it to a terminal, non-paid status instead of leaving it pending forever.
- A lost callback. Stop your listener, run a payment, and confirm your reconciliation job still settles the order — callbacks are never retried.
- The same result twice. Your callback handler and your reconciliation job can both see the same payment. Send the same result to your handler twice and confirm it doesn’t fulfil the order twice.
- Network failure mid-request. Kill your connection after sending an
initiate or make-payment request but before reading the response.
Confirm you can recover using the
referenceNumber(if you have it) or by checking status before retrying, rather than blindly creating a second transaction.
Per-method failure modes
Section titled “Per-method failure modes”What a failure actually looks like differs by method — the message for a bad mobile-money number comes from the provider, while a bad card number is rejected by Pesepay’s own validation before it reaches anyone. Each method page lists its own: