Developers

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

  1. Get an API key from the dashboard (test or live).
  2. Create a payment intent with an Idempotency-Key.
  3. Redirect the customer to the returned checkoutUrl, or let STK push prompt them.
  4. 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

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.