Quickstart
Zero to your first sandbox payment in about five minutes, with copy-paste code in five languages.
Pesepay API Live sandbox
EcoCash, InnBucks, Omari, 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: $PESEPAY_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": "PP-8F2A41C9", "transactionStatus": "INITIATED", "redirectRequired": true, "redirectUrl": "https://checkout.pesepay.com/..."}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 five languages.
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
Both return a reference number you can track, and both can notify your server automatically.
Initiate a transaction, send your customer to the Pesepay-hosted payment page, and get notified when they are done. The fastest way to start — and no PCI scope on your servers.
Collect the payment method and its required fields in your own UI and submit them straight to Pesepay. Full control over the customer experience, more UI to build.
Coverage
Supported in US dollars and Zimbabwe dollars. 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 poking at the API by hand.