Skip to content

Testing

The sandbox lets you exercise your whole integration — creating transactions, completing payments, and receiving callbacks — without moving real money.

SandboxProduction
Base URLapi.test.sandbox.pesepay.com/payments-engineapi.pesepay.com/api/payments-engine
Money movedNoneReal
KeysTest keys from the Merchant Control Panel’s home pageLive 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.

The sandbox is deliberately smaller than production. Plan your test matrix around what’s actually there:

SandboxProduction
CurrenciesUSD onlyUSD and ZiG
Payment methodsEcoCash PZW211, Visa PZW204, Mastercard PZW205All methods
Amount limitsDifferent from production — Visa in particular is capped far lowerSee 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.

Use these in the sandbox to deliberately trigger success and failure, so you can verify your integration handles both.

MethodNumberResult
EcoCash0777777777✅ Successful transaction
EcoCash0770000000❌ Failed transaction
BrandNumberCVVExpiryResult
Visa4867 9600 0000 5461608Any future date✅ Successful transaction
Visa4867 9650 0500 5002994Any future date❌ Failed transaction
CABS4054 0540 5405 4430708Any future date✅ Successful transaction
CABS7047 0570 5705 5730454Any 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.

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.

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: