Build with the NunuaPay API
A versioned REST API with idempotent payment creation, server-side verification and signed outbound webhooks. Use scoped API keys, model businesses and branches, and integrate once.
Quickstart
- Get an API key from the dashboard (test or live).
- Create a payment intent with an
Idempotency-Key. - Redirect the customer to the returned
checkoutUrl, or let STK push prompt them. - Verify the outcome server-side and handle the signed webhook.
curl -X POST https://pay.nunuanow.com/v1/payment-intents \
-H "Authorization: Bearer nup_test_<lookup>_<secret>" \
-H "Idempotency-Key: order-1001" \
-H "Content-Type: application/json" \
-d '{ "businessId": "<businessId>", "method": "mobile_money",
"amount": 100, "currency": "KES", "phone": "+254712345678" }'Authentication
Integration endpoints use a scoped API key: Authorization: Bearer nup_test_… or nup_live_…. Dashboard/management endpoints use a Bearer JWT from /v1/auth/login. Some read endpoints accept either credential.
Resources
API documentation
Endpoints, identifiers, idempotency, errors and money handling.
Webhooks guide
Signature verification, replay protection and safe retries.
Payment API overview
How routing, methods and providers fit together.
Paystack
Hosted checkout, webhooks and refunds.
Payment API integration guide
Create a payment, verify it and fulfil an order end to end.
Paystack integration guide
Configure Paystack and accept card, bank and mobile money payments.
Handling real-world payment states
Payments are not always instant. NunuaPay models requires_action, processing, pending, succeeded, failed, cancelled and expired. Treat only succeeded as paid, and verify before fulfilling. See webhooks for the event flow.