Quickstart
Make your first test payment in five minutes.
You need a test API key (np_test_sk_…). During the pilot, NuruPay issues keys to you directly; the merchant dashboard is coming soon. Test mode never moves real money.
1. Check your key
export NURUPAY_KEY=np_test_sk_...
curl https://api.nurupay.danfordchris.dev/v1/whoami \
-H "Authorization: Bearer $NURUPAY_KEY"{"key_id":"key_…","merchant_id":"mer_…","mode":"test","object":"principal"}2. Create a collection
0754123789 is a test number that always succeeds.
curl https://api.nurupay.danfordchris.dev/v1/collections \
-H "Authorization: Bearer $NURUPAY_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"amount": 1000, "phone": "0754123789", "reference": "quickstart-1"}'The response is 202 Accepted with "status": "created". Copy the id (col_…).
Every POST needs an Idempotency-Key. If your request times out, retry with the same key: you get the original response instead of a duplicate charge. See Idempotency.
3. Watch it succeed
In test mode the payment completes in about 10–20 seconds.
curl https://api.nurupay.danfordchris.dev/v1/collections/col_... \
-H "Authorization: Bearer $NURUPAY_KEY"{"id":"col_…","object":"collection","status":"succeeded","amount":1000,"fee":0, "...": "..."}4. Next steps
- Receive results by webhook instead of polling.
- Try the failure numbers so your app handles declines and timeouts.
- Check going live when you are ready for real payments.