Skip to main content
With this API your app can offer “airtime for cash”. The user links their MTN line once, then each sale moves airtime from their line to your connected MTN SIM. You pay the user only after OnePanel confirms the airtime arrived.
Only start a session after the user has agreed to let your business move airtime from their line. Send consent: true and keep your own record of the consent (pass its ID as consent_ref).

Before you start

  1. Connect an MTN SIM in My SIM Cards. This is the SIM that receives the airtime.
  2. Open Airtime Cash in the dashboard and set your spending limits.
  3. Register a webhook if you want push notifications (see Webhooks).

The flow

1. Start a session

The user receives an SMS code from MTN. The response contains a session_id.

2. Verify the code

The session is now active. Store the session_id against this user. OnePanel keeps their MTN login (encrypted) so the next sale needs no OTP.

3. Transfer airtime

  • pin is the user’s 4-digit MTN airtime-transfer PIN. Ask for it on every sale. OnePanel never stores it, and you should not either.
  • reference is your own unique ID. Sending the same reference again returns the original result and never transfers twice, so it is safe to retry after a network error.

4. Credit the user

Credit the user only when status is success.

Sessions that need a new OTP

If a user’s MTN login can no longer be renewed, or the session has been unused for longer than your inactivity limit, the transfer returns 409 with session_status of reauth_required or expired. Nothing is sent. Start a new session for that number (steps 1 and 2) and use the new session_id. To stop a user’s session yourself, call DELETE /airtime-cash/sessions/{id}. The stored MTN login is erased immediately.

Limits

You set these in the dashboard or with PUT /airtime-cash/settings. Transfers that would break a limit are refused with 422 before anything is sent. The minimum transfer is ₦50. Daily limits reset at midnight Nigerian time. Pending and unconfirmed transfers count toward them.
After 3 failed transfers on one session within an hour, further transfers on it return 429 for a while. This protects the user’s PIN from being locked by MTN.

Webhooks

If you have a webhook endpoint, OnePanel posts these events, signed like every other OnePanel webhook. Failed deliveries are retried automatically.

Good to know

  • OnePanel never gives you the user’s MTN token. You only ever hold a session_id.
  • Airtime transfers cannot be reversed. Only pay out on success.
  • Every OTP, transfer and revocation is recorded in an audit trail on our side.