Build payment and transaction experiences with ScanPay.
One API across collection, verification, escrow and billing. One webhook contract. One transaction reference that stays the same no matter which service touched it.
// 1. Prompt the customer to pay
await scanpay.stkPush({
amount: 4500,
phone: "2547XXXXXXXX",
reference: "ORDER-4821",
callback: "https://yourapp.co/webhooks/scanpay"
});
// 2. Act when the transaction is verified
scanpay.webhooks.on("transaction.verified", (e) => {
orders.release(e.reference);
});
// 3. Or check it yourself, any time
const tx = await scanpay.transactions.get("SPV-8F2A41C9");
// -> { amount: 4500, method: "M-PESA", status: "verified" }
What you can call.
Each service is an endpoint on the same API, authenticated the same way.
Endpoint names shown for orientation. The current reference lives in the ScanPay documentation
Webhooks over polling.
Subscribe once and let ScanPay tell your system when something actually changed.
Register your endpoint
Give ScanPay a callback URL for your environment when your account is set up.
Receive transaction events
Each event carries the reference, the amount, the method, the source service and the new status.
Act idempotently
Events carry the transaction reference, so a repeated delivery can be recognised and ignored safely.
{
"event": "transaction.verified",
"reference": "SPV-8F2A41C9",
"source": "gateway",
"amount": 24500,
"method": "M-PESA",
"status": "verified",
"metadata": { "orderId": "ORDER-4821" }
}
Common integrations.
Checkout
Create the payment, prompt the customer, release the order on the verified event.
Release gate
Call verification at the exact point your code decides whether to hand something over.
Billing run
Generate invoices on a schedule and reconcile against verified payment events.
Two-party flow
Open an escrow transaction and drive your own UI from its status changes.
Developer FAQs.
Yes. A REST API covers initiating payments, requesting payment verification, creating escrow transactions, billing, and querying transaction status.
Yes. Webhooks push transaction events to your endpoint as statuses change, so your system does not have to poll.
API reference and integration guides are available in the ScanPay merchant portal at my.scanpay.africa.
Contact the ScanPay team to set up an account and receive credentials for your environment.
Yes. Gateway, verification, escrow and billing all write to the same transaction record, so one reference follows the transaction end to end.
Continue exploring
Related ScanPay services that connect to this one.
Start building.
Get credentials, wire up one endpoint, and see a verified transaction land in your own system.