For developers

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.

InterfaceREST + webhooks
EventsTransaction lifecycle
ReferenceShared across services
quickstart.js
// 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" }
Surface area

What you can call.

Each service is an endpoint on the same API, authenticated the same way.

STK PushPOST /v1/stk-push
VerificationPOST /v1/verify
PaymentsPOST /v1/payments
EscrowPOST /v1/escrow
BillingPOST /v1/billing
TransactionsGET /v1/transactions

Endpoint names shown for orientation. The current reference lives in the ScanPay documentation

Events

Webhooks over polling.

Subscribe once and let ScanPay tell your system when something actually changed.

01

Register your endpoint

Give ScanPay a callback URL for your environment when your account is set up.

02

Receive transaction events

Each event carries the reference, the amount, the method, the source service and the new status.

03

Act idempotently

Events carry the transaction reference, so a repeated delivery can be recognised and ignored safely.

webhook Sample payload
{
  "event": "transaction.verified",
  "reference": "SPV-8F2A41C9",
  "source": "gateway",
  "amount": 24500,
  "method": "M-PESA",
  "status": "verified",
  "metadata": { "orderId": "ORDER-4821" }
}
Build patterns

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.

Questions

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.

Start building.

Get credentials, wire up one endpoint, and see a verified transaction land in your own system.