Quickstart
Zero to your first sandbox payment in about five minutes, with copy-paste code in Node.js, Python, PHP and Java.
Pesepay API Sandbox request
EcoCash, InnBucks, O'mari, Zimswitch, PayGo and cards — one encrypted API, one integration.
curl -X POST https://api.test.sandbox.pesepay.com/payments-engine/v1/payments/initiate \ -H "authorization: YOUR_INTEGRATION_KEY" \ -H "content-type: application/json" \ -d '{"payload": "ENCRYPTED_BASE64_STRING"}'const body = { amountDetails: { amount: 10.0, currencyCode: 'USD' }, reasonForPayment: 'Order #1042', resultUrl: 'https://example.com/payments/result', returnUrl: 'https://example.com/payments/return',};
const res = await fetch(ENDPOINT, { method: 'POST', headers: { authorization: KEY, 'content-type': 'application/json' }, body: JSON.stringify({ payload: encrypt(body, ENCRYPTION_KEY) }),});
const { redirectUrl, referenceNumber } = decrypt( (await res.json()).payload, ENCRYPTION_KEY);body = { "amountDetails": {"amount": 10.00, "currencyCode": "USD"}, "reasonForPayment": "Order #1042", "resultUrl": "https://example.com/payments/result", "returnUrl": "https://example.com/payments/return",}
res = requests.post( ENDPOINT, headers={"authorization": KEY, "content-type": "application/json"}, json={"payload": encrypt(body, ENCRYPTION_KEY)},)
transaction = decrypt(res.json()["payload"], ENCRYPTION_KEY){ "referenceNumber": "20260901103214123-A1B2C3D4", "redirectUrl": "https://checkout.pesepay.com/...", "pollUrl": "https://api.test.sandbox.pesepay.com/payments-engine/v1/payments/check-payment?referenceNumber=20260901103214123-A1B2C3D4"}Start building
Four places to start, depending on how you like to learn.
Zero to your first sandbox payment in about five minutes, with copy-paste code in Node.js, Python, PHP and Java.
One page per channel, each with its required fields, currencies and test credentials.
Every endpoint, every field, with request and response examples you can copy straight into your codebase.
Get notified the moment a payment completes, instead of polling for status.
Integration styles
All three return a reference number you can track, and all three notify your server when the payment ends.
Send your customer to the Pesepay-hosted payment page and get notified when they are done. The fastest way to launch, with no payment UI to build.
Mount Pesepay Elements on your own page and the customer pays there, cards and 3-D Secure included. Card details never touch your servers.
Collect the details in your own UI and charge from your server. For places with no browser: USSD, WhatsApp bots, POS terminals and kiosks.
Coverage
Supported in US dollars and ZiG (Zimbabwe Gold). One integration covers all of them.
Libraries
Native clients that handle encryption, request signing and response decryption for you.
npm install pesepay pip install pesepay composer require codevirtus/pesepay com.pesepay:pesepay Tools
Machine-readable docs for AI coding tools, and a spec you can generate clients from.
Point Cursor, Copilot or Claude at machine-readable versions of this site, and use a prompt that stops them inventing Pesepay endpoints and fields.
An OpenAPI 3.1 description of every endpoint, plus a ready-made Postman collection for trying the API by hand.