AI Pay

Developers

Merchant API

One API for Malam, OpenLibrary, OpenJob, KadRoot and Arewa. Authenticate with Authorization: Bearer ahp_test_… or a live key. Keys are stored as hashes and shown once. Live keys require a verified business on Business or above, and production unlocked.

Endpoints

GET  /api/v1/balance
GET  /api/v1/transactions
GET  /api/v1/payments/{reference}
POST /api/v1/payments
POST /api/v1/invoices

POST /api/v1/payments
Idempotency-Key: malam-order-1042
{
  "amount": "5000.00",
  "description": "Course enrolment",
  "customer": { "name": "Ada", "email": "ada@school.ng" },
  "sourceApp": "malam"
}

Amounts under ₦100 are refused because that is the documented minimum for a temporary cNGN virtual account. If the provider is not connected, the payment is created as pending with no account number. Do not treat that as paid.

Your webhooks

We POST JSON and sign the raw body with HMAC-SHA256. Compare it to the header X-AIHub-Signature: sha256=… using the secret shown once when you add the endpoint. Events: payment.paid, payment.failed.

cNGN webhooks we accept

Point cNGN at /api/webhooks/cngn. We reject bodies that fail X-cNGN-Signature. Bridge callbacks at /api/webhooks/bridge are unsigned hints and never credit a merchant. Network IDs come from Get Networks, not from the table below.

Published contract addresses

Reference only, from the cNGN contract-address guide. Displaying an address does not enable a withdrawal.

Bantu · Stellar-basedGAE7E56N3XIC6JGJI54SD3VN4EDY3OZVFA7CLHXAMMTHLU4LIFYJMFSI

Asset Chain · EVM0x35000B21746daA9B63a362aBfB2ebb5ab216d686

BNB Chain · EVM0x9538F41EE9f9d5B5A9f3154f355B88f4B1372E89

Ethereum · EVM0xAE83084c1411abdEF714ce407d94EC2B43c64A00

Polygon · EVM0xC1509620ED2f119CDCe5C0Ea0B2BD4ff45adb21D

Base · EVM0xb2AA139FF5314e92eF4bb79FfBDB2c09d2C53BAE

Solana · SPLHfJWS8vJHvxKn5xW3uLXkTmEy4jny3G45QnS1Eab5sg

Celo · EVM0x25ee8dCcDcF1b028FDC68dcFa89333c51A5C5335

Monad · EVM0xae950739118Ca31fEc74517Ffd8dFE11B64985bA

Arc · EVM0xecC44d16a3eC43E5c1F423eb53DB608eE7591266

ADI · EVM0x3f515E6c9B90D47c828301DD2Bb5ea08200E2FA4

STELLAR · StellarGBHN3ODJZO6M5IEFHQLWL57GOHSDVEZAKNW2W3PWTKSGKU3NNVU5QY43

Operational rules