Quickstart
Make your first authenticated call in five minutes.
1. Get a sandbox key
Create a test secret key (sk_test_…) in your dashboard. Test keys only work
on the sandbox; live keys (sk_live_…) only work in production.
2. Authenticate
Every request carries your secret key as a bearer token:
curl https://api-sandbox.starpay.example/api/v1/ping \
-H "Authorization: Bearer sk_test_your_key"
Successful responses use the standard envelope:
{ "status": true, "message": "pong", "data": { "pong": true, "livemode": false } }
Errors use the same envelope with status: false and a stable error.code —
see the Errors reference.
3. Make your first charge
The collections API (
POST /charges) ships in the next milestone. The shape below is what you'll send; until then, explore the live endpoints in the API Reference.
curl -X POST https://api-sandbox.starpay.example/api/v1/charges \
-H "Authorization: Bearer sk_test_your_key" \
-H "Idempotency-Key: 3f9a2b7c-1e8d-4a05-9b2c-7c1e8d4a0599" \
-H "Content-Type: application/json" \
-d '{ "amount": 250000, "currency": "GHS", "channel": "momo", "msisdn": "0240000000" }'
Amounts are integer minor units (pesewas) — 250000 means GHS 2,500.00.
Next steps
- Authentication — bearer keys and HMAC signing
- Idempotency — safe retries on money-moving requests
- Webhooks — receive and verify event notifications
- Sandbox & test values — magic numbers that drive outcomes