API Reference
Zoranga API Workflow

To successfully integrate our API, it is important to understand these 2 steps

  1. Send Airtime Data to Zoranga via API and save the reference returned
  2. Provide an callback that will be called after validation of your trasaction. Validation time takes less than 2 mins

Optionally, you can make a status request call to check the validity status of your transaction

API Reference

API Reference

The Zoranga API is organized around REST and only one endpoint is used in accessing it. Our API is predictable and requests are made using POST method. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). JSON is returned by all API responses, including errors.

To make the API as explorable as possible, we've designed it in a way that it accepts and processes POST requests with data in form-format and will also return errors and responses as JSON. This will allow anybody with Simple HTML knowledge to work with the API.

API Endpoint: https://zoranga.com/api/v1/

Required parameters for the API request

API KEY

(REQUIRED FOR ALL CALLS)

Authenticate your account when using the API by including your secret API key in the request. You can view your API key by clicking on Developer Central after logging in to your Zoranga account. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such GitHub, client-side code, and so forth.

Here's a sample of a valid API key.     apiKey: zoR1_live_yT7P800BnkiI2HlWgH47ti3V

Merchant ID

(REQUIRED FOR ALL CALLS)

The Merchant ID is a ten-digit unique number assigned to every merchant. It's also available through the Developer Central link and must be sent along every API request for identification.

Here's a sample of a valid Merchant ID.     merchantId: 0123456789

OBJECT

(REQUIRED FOR ALL CALLS)

The object is required for all calls an defines what request you are making to the api at any point. Below are the 3 availabe objects.

  • Object for deposits made with airtime pin : pinDeposit
  • Object for deposits made with already loaded airtime : airtimeTransfer
  • Object to determine the status of a deposit : statusRequest
  • Object to withdraw using Ego : getEgo

NETWORK

(REQUIRED FOR DEPOSIT CALLS)

The network specified the telco service provider you will use when depositing through the API. Below is all the available networks and their values

  • Ego Deposits : 1
  • MTN PIN Deposits : 2
  • GLO PIN Deposits : 3
  • MTN SHARE AND SELL : 4
  • ETISALAT PIN Deposits : 5
  • AIRTEL PIN Deposits : 6
  • ETISALAT AIRTIME TRANSFER : 7

Depositor's Mobile Number

(REQUIRED FOR DEPOSIT AND WITHDRAWAL CALLS)

The depositor's mobile number should be that of the person making the airtime deposit or the mobilenumber that will authorize an airtime transfer. It must be a valid Nigerian mobile number. For a list of valid Nigerian mobile numbers please view Telephone numbers in Nigeria. The API will return an error if an invalid mobile number is sent. The depositor's mobile number must not have a prefix like +234. It should start with 0. The mobile number must be exactly 11 digits.

Here's a sample of a valid Nigerian mobile number.     depositors_mobile_number: 08031234567

Airtime PIN

(REQUIRED FOR PIN DEPOSIT CALLS)

The string length of airtime PIN is the 10 (Zorapin), 15 (GLO and ETISALAT) or 16/17 (MTN and AIRTEL) digit number used to top up your mobile phone. The API will return an error if the string length of the airtime PIN is not within the expected range. Warn your customers against entering invalid or used airtime PINS.

Here's a sample of a valid airtime PIN.     airtime_pin: 0000111122223333

Amount

(REQUIRED FOR DEPOSIT AND WITHDRAWAL CALLS)

The amount is a positive integer representing the monetary value of the PIN. The minimum amount is ₦100.

Here's a sample of a valid amount.     amount: 100

Reference

(REQUIRED FOR STATUS REQUEST CALLS ONLY)

The reference is a 8 digit number that serves as a unique identifier of the transaction. The reference must be that received from a deposit call.

Here's a sample of a valid reference.     100000091

Description

(optional, default is null)

An arbitrary string which you can be attached to the arguments in an API call. It is displayed when in the web interface alongside the charge. Note that if you use Zoranga to send automatic SMS receipts to your customers, your receipt emails will include the description of the charge(s) that they are describing. This will be unset if you POST an empty value. This can be unset by updating the value to null and then saving.

Here's a sample of a valid description.     description: Payment for data recharge