ZonmPay API v2

Customer & Checkout API

Verify a number, or collect through a hosted payment link.

CUSTOMER · GET / LINK · POSTConfirm who you are about to charge, or send them a hosted checkout link.
HomeDocumentationCustomer & Links

Authentication

Every request is authenticated with your secret key in the apiToken header. There is one base URL and one key: your account behaves as a sandbox until go-live is approved, on the same URL. Keep the key server-side only, and note that rotating it expires the previous one immediately.

Required Headers

apiToken

sp_sk_prod_XXXXXXXXXXXX

Content-Type

application/json

Overview

Verify a phone number and the wallet behind it before you charge or pay it, and create shareable checkout links when you do not want to build a payment UI yourself.

POST

Verify Number (Account Holder Name)

Returns the registered account holder name and mobile network for any Tanzanian mobile money number. Call it from your own website or app before you pay anyone, and show the name back to your user for confirmation. Our provider credentials stay on our servers — you only ever send your API key.

POST https://zonmpay.com/api/v1/verify-number

Use zonmpay.com specifically (without www the request is redirected and some HTTP clients drop the POST body — which causes a server error).

Request Body (JSON)

ParameterTypeRequiredDescription
phonestringYes0773273617, 255773273617 or +255773273617 — all normalised for you.example: 255773273617
bash
curl -X POST https://zonmpay.com/api/v1/verify-number \
  -H "apiToken: SPP_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone":"255773273617"}'

Note: Requires the collection:read scope. Payout also accepts expected_name (rejects the payout when it does not match the verified holder) and require_verified_name.

GET

Verify a Customer by Phone Number

Confirm a phone number and the wallet behind it before you charge or pay it. This reduces failed transactions caused by a mistyped number and lets you show the recipient's name back to the payer.

GET https://zonmpay.com/api/v1/customer/verify/{phone}

Use zonmpay.com specifically (without www the request is redirected and some HTTP clients drop the POST body — which causes a server error).

Query Parameters

ParameterTypeRequiredDescription
phonestringYes0712345678, 255712345678 or +255712345678 — all are normalised for you.example: 255712345678
bash
curl https://zonmpay.com/api/v1/customer/verify/255712345678 \
  -H "apiToken: SPP_live_YOUR_API_KEY"

Note: Recognised networks: Vodacom (M-Pesa), Mixx by YAS, Airtel Money, Halotel and TTCL Pesa.