This page is particularly useful for developers and website designers who know what they are doing with HTML, PHP and SQL. If you are not conversant with the code on this page, please draw the attention of your developer to this page to properly integrate the OnlineNaira API into your website. If you would like OnlineNaira to help install this API into your website, please send us an email here.
OnlineNaira provide developers with 2 sets of integration:
Client-side - allows you to manage shopping cart and button integrations; the part that is displayed to the user. The client side is used to send any information from your website to OnlneNaira using simple HTML form.
Server-side or Call back, allows you to receive notifications about processed transactions from OnlineNaira to your website's backend that may help you automate your service deliveries.This part is sent to your website and is in PHP.
PHP API - Client Side.
Below is a description for all fields which you can use. For successful payment process you should use the following parameters:
OnlineNaira Username - this is one parameter that the user cannot change in OnlineNaira. Once set at signup, it remains the same throughout the life of the account. It is unique and it forms the most important identification for members. This parameter must be set for your integration to work.
use "product" if this product is pre-defined
use "donation" if this is a donation
use "subscription" if this product is subscription and repeats
use "payment" if this is a simple payment transaction
Product Description - This could either be the Product Title in a few words or some unique code or some unique identification for the product.
unique transaction identification or some number that uniquely identifies the event - this is optional.
price of product in naira (NGN)
this is currently optional
use "quantity" to define number of products
subscription rebilling period in days
This is an optional local currency setting. Use ISO. OnlineNaira will assume NGN if left blank -
If the currency you need is not lists, please get in touch with us and we would consider adding it.
trial period in days, if any
use this for setup fee, if applicable
tax amount, if applicable
shipping fee, if any
This could be extra product description or notes from the buyer.
This is the url to return the buyer if the payment is unsuccessful.
this is the url to return the buyer after successful payment
This is the url to your website where some payment script or ipn is handled. OnlineNaira will send you an automated email notification after every successful payment, but if you want to have a deeper integration with OnlineNaira, the unotify must be set to a url that will handle call-back parameters.
* these parameters are mandatory.
Notes - All payments in OnlineNaira are in Naira (NGN), but you should display your local currency in your shop while setting the country parameter to the 3 digit ISO code (ISO-4217 ) before parsing to OnlineNaira.
This following callback parameters will be sent to your script. After successful payment process OnlineNaira will forward buyer to your site and some parameters also sent back to your script by the POST method: You can get this parameters by the global POST variable, e.g. $_POST[--VARIABLE-NAME--]...
PHP API - Server Side.
This is the type of transaction and it can only be either product, donation, subscription or payment.
Product Name as received by OnlineNaira from your website
Product id if specified
This is the OnlineNaira Username of the buyer.
This is the total amount paid to your OnlineNaira account.
OnlineNaira's updated exchange rate from NGN to $ usable for this transaction.
OnlineNaira's updated exchange rate from $ to NGN usable for this transaction
This is the quantity of product, if applicable.
This will provide any comments/notes added by the buyer.
system referer URL (https://www.onlinenaira.com)
Looking to take deposits?
Here's an example of the api implementation if you are looking to receive deposits on your website.
If you sell in any currency order than the Nigerian Naira (NGN),
you should set the country parameter. OnlineNaira has in-built features to allow you to sell in any currency, but you will need to set the country parameter to tell OnlineNaira that you are selling in a currency order than the Naira. If you do not set the country parameter, OnlineNaira will treat all your receipts as if you were selling in Naira (NGN).
Checkout Without OnlineNaira
When you install the OnlineNaira API, your buyers would be able to checkout without needing to have an OnlineNaira account. When your buyer reaches checkout, OnlineNaira offers 2 payment options.
Pay from OnlineNaira Balance.
If the buyer already has an OnlineNaira account, they would be able to pay from their balance by entering their username and password to make payment. If they would like to open an OnlineNaira account during the payment process, they also have the opportunity to do so.
Pay with Nigerian Card.
Buyers who hold cards issued in Nigeria would be able to pay with their card without a need to sign-up.
Dollar Account Checkout
This is the checkout to use if wish to receive money directly into your OnlineNaira Dollar account. Do not use this checkout if you do not have a $account with us. Open a dollar account now. The following line of code is the only thing that needs to change in your API - <form method=post action="https://www.onlinenaira.com/dollar/process.htm">
We have provided some buttons below for your use, but you should be able to use just any button that matches the design of your wif you are looking to website.
If you have a need to automate payments from your website, here are the extra lines of code you need to add to the API. Once you have added the extra lines of code, you would be able to add your login details into your code before submitting payment to OnlineNaira.
The real advantage in using automated withdrawals is that you would not need to login manually into OnlineNaira just because you need to make payments to other OnlineNaira users. This could be particularly useful if you have a need to allow your customers to automatically process withdrawals from your website without manual intervention..