Rate Today - N370/$
Home
How it Works
Search OnlineNaira
Fees
Service Updates
Dollar Account
Loans
InvestOn
My RentAshop
Affiliate Program
Android App
2nd Factor
About Us
Contact Us
website security
MEMBER LOGIN
FORGOT PASSWORD?
SIGNUP NOW
 
OnlineNaira API ReferenceDevelopers API
Introduction
PHP API
Callback Parameters
Currency Settings
Dollar Account Chechout
Buttons
Dollar Checkout
Get eCurrency Rates
Get Base Rate
Get User Status
Get User Balance
Shopping Carts
Sandbox

OnlineNaira Developers API

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.


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:
member* 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.
action* 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 Product Description - This could either be the Product Title in a few words or some unique code or some unique identification for the product.
pid unique transaction identification or some number that uniquely identifies the event - this is optional.
price* price of product in naira (NGN)
apikey this is currently optional
quantity use "quantity" to define number of products
period subscription rebilling period in days
country 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 trial period in days, if any
setup use this for setup fee, if applicable
tax tax amount, if applicable
shipping shipping fee, if any
comments This could be extra product description or notes from the buyer.
ucancel This is the url to return the buyer if the payment is unsuccessful.
ureturn this is the url to return the buyer after successful payment
unotify 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.

Call-Back Parameters

action This is the type of transaction and it can only be either product, donation, subscription or payment.
pname Product Name as received by OnlineNaira from your website
pid Product id if specified
buyer This is the OnlineNaira Username of the buyer.
total This is the total amount paid to your OnlineNaira account.
rtsend OnlineNaira's updated exchange rate from NGN to $ usable for this transaction.
rtreceive OnlineNaira's updated exchange rate from $ to NGN usable for this transaction
quantity This is the quantity of product, if applicable.
comments This will provide any comments/notes added by the buyer.
referer system referer URL (https://www.onlinenaira.com)


Accept Deposits

Here's an example of the api implementation if you are looking to receive deposits on your website.

<form method=post action="https://www.onlinenaira.com/process.htm">
<input type=hidden name=member value="ADESIYAN">
<input type=hidden name=action value="payment">
<input type=hidden name=product value="Deposit for Service">
<input type=text name=price value="">
<input type=hidden name=country value="NGN">
<input type=hidden name=apikey value="adesiyan">
<input type=hidden name=ureturn value="http://www.adesiyan.com/web">
<input type=hidden name=unotify value="http://www.adesiyan.com/web">
<input type=hidden name=ucancel value="http://www.adesiyan.com/web">
<input type=hidden name=comments value="Deposit for Service">
<input type=image src="http://www.onlinenaira.com/images/buttons/Buy-Now-Button-vm-50.png">
</form>


Using Other Currencies

If you prefer to collect money with OnlineNaira in other currencies, pls be sure to set the country parameter.

Example - To display the Ghanaian Currency, GHS, use the following line
<input type="hidden" name="country" value="ghs">


Currency Setting

If you sell in any currency order than the Nigerian Naira (NGN), you should set the country parameter. The OnlineNaira API has built-in 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). Alternatively, if you sell in dollars ($), please set your action


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">


Buttons

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.


Get eCurrency Rate

We have provided all our eCurrency rates in API so you could automate their use in your applications. The rates are updated every 15mins.

URL - https://onlinenaira.com/api/ecurrency-rate.xml

If you would like to update the rates now, click here.


Get OnlineNaira Base Rate

This is the rate we will use if you use our pay4me service. The rates are updated every 15mins.

URL - https://onlinenaira.com/api/dollar-naira.xml

If you would like to update the rates now, click here.


Get User Status

This offers you the status of any OnlineNaira user provided you have a username. This can come in handy for a number of reasons including checking if a user exists on the OnlineNaira system and to know if they are UNVERIFIED, VERIFIED or CERTIFIED. See certification information here to see how best to use this API parameter in your applications. For instance, you may want to offer your service or a premium service level to CERTIFIED OnlineNaira members only.

URL - https://onlinenaira.com/api/get-user-status.php?q=username

Example. To check the status of the user ADESIYAN, use https://onlinenaira.com/api/get-user-status.php?q=adesiyan


Get User Balance

This is offers you the status of any OnlineNaira user provided you have a username.

URL - https://onlinenaira.com/api/get-user-balance.php?q=username

Example. To check the status of the user ADESIYAN, use https://onlinenaira.com/api/get-user-balance.php?q=adesiyan


Shopping Cart Integrations

 


Sandbox

If you are looking to test the OnlineNaira API, thi si the url to use to see if your api inatalltion is working ok.

POST URL - https://www.onlinenaira.com/process-sandbox.htm

Please remember that to use the Sandbox, every other api paranmeters remain the same except the POST url.

Last Update - 01 November 2017 Secure SSL Certificate
SiteLock