1.0 Introduction

This document is intended to be a guide for those who wish to integrate their websites to OnePay e-payment platform. The gateway can be accessed via HTTP protocol by submitting values using POST method to OnePayConnect API.

OnePayConnect Gateway can be accessed in various ways:

  • Using HTTP Protocol API and submitting values by POST method
  • Using Web Services

NOTE: This integration document covers Transaction Aggregation for the following Payment Processors:

  • Interswitch Verve
  • Master Card
  • VISA
  • Bitcoin
  • Internet Banking

2.0 Parameters Description

The following items are parameters to be passed to OnePayConnect payment API for transaction processing:

S/N PARAMETERS REMARK
1 merchant_reg_id Merchant unique registration ID on OnePay platform. (Given to the Merchant by Access Solutions).
2 amt_paid Field of the transaction amount to be carried out.
3 merch_trans_id Merchant unique transaction reference id which must be a unique 12 digit code across merchant platform
4 product_desc This is the input field of the product description
5 client_name The input field of the customer name
6 Client_email The Input Field For customer email

3.0 Payment Integration (Using HTTP POST)

Payment using this option will require that you generate a HTML form that contains the required parameters and their values. Once the form is submitted it will redirect to the PAYMENT page. Your HTML form should be in the format shown below. Fill the (value=“”) with the appropriate data as shown in the sample below

Format <form method="POST" id="OnePay_form" name="OnePay_form” action="https://www.onepay.com.ng/api/live/main"> <br><input type="hidden" name=" merchant_reg_id" value=""> <br><input type="hidden" name="amt_paid" value=""> <br><input type="hidden" name="merch_trans_id" value=""> <br><input type="hidden" name="product_desc" value=""><br> <input type="hidden" name="client_email" value=""> <br> <input type="hidden" name="client_name" value=""> <br> <input type="submit" name="submit" value="Pay"> </form>
		<form method="POST" id="OnePay_form" name="OnePay_form" action="https://www.onepay.com.ng/api/live/main">
			<input type="hidden" name=" merchant_reg_id" value="ACC-MCHT00001"> 
            <input type="hidden" name="amt_paid" value="10000">

<input type="hidden" name=" merch_trans_id " value="123456789102">

<input type="hidden" name=" product_desc" value="2 nights superior room for Dele Simon ">
 <input type="hidden" name="client_email" value="buddyTester@yahoo.com">

<input type="hidden" name="client_name" value="Buddy Tester"> 
<input type="submit" name="submit" value="Pay">

        	
        </form>
    

4.0 Displaying Customized Payment Response Page

There is a default payment outcome page that is displayed to the customer after every transaction carried out. This page gives the customer details of the transaction and also contains a link which when clicked, redirects the customer back to the merchant site.

This section of the document is for merchants who wish to display their own payment outcome page to customers after every transaction.
Note: The Merchant developer must be able to load their content into an iframe

5.0 Transaction Flow for Merchant Displaying Their Own Customized Payment Outcome Page

Each transaction processed by OnePay originates from the merchant’s website with a unique Merchant Transation ID (generated by the merchant). OnePay used the unique generated transaction ID from the Merchant for the transaction and forwards the transaction to the payment gateway for processing. After processing, the payment gateway returns a response back to OnePay, which in turn sends a response back to the merchant response URL specified by the merchant during initial Merchant’s registration and setup. This response will include the Merchant Transaction ID and Registration ID in the query string of the Response URL.

Example:
On completion of a successful transaction, OnePay will redirect to the URL below, assuming:
The merchant’s Response URL is: “http://genericmerchant.com/Success.aspx”
The transaction was initiated by the merchant with a MerchantTrans ID of “1234567891012”

http://genericmerchant.com/Success.aspx?MerchantTransactionID=1234567891012

For security reasons OnePay will NOT send the status of the transaction in the response URL along with the transaction reference and merchant trans ID. In order to get the status of a transaction, you can use either the web service (passing in string values representing your merchant ID and the order ID of that transaction) OR the HTTP Get Request (passing in your Merchant Reg ID and the Merchant Trans ID of that transaction).

**IMPORTANT: When getting the transaction status for your payment outcome page you are advised to use the Web Service option.
Web Service URL

https://www.onepay.com.ng/api/ValidateTrans/getTrans.php

Parameters

MerchantRegID, MerchantTransID

Where:

MerchantTransID: The transaction ID sent by the merchant.
MerchantRegID: The Merchant Registration ID generated by OnePay for the merchant.
Response You will receive a response which will contain all the details of the transaction in the format shown below:

{"status":200,"message":"OK","data":{"MerchantTransID":"xxxxxxxx","merchant_reg_ID":"xxxxxx","Amt_paid": xxxxxx,"response_code":" xxxxxx ","payment_gate":" xxxxxx ","date_time":"2017-02-24 16:03:26","payment_ref":null,"response_message":null}}

Where:

merchant_reg_ID: OnePay Merchant Reg ID for the merchant.
MerchantTransID: is the Transaction ID of the transaction sent by the merchant (which must be unique).
payment_gate: is the actual payment gateway that processed the transaction.
status: is the status of the transaction (either successful or failed).
response_code: is the actual response code returned by the payment gateway.
response_description: is the unique reference number generated by OnePay.
date_time: is the date and time of the transaction.
Amt_paid: is the amount of the transaction.
payment_ref: is the unique reference number generated by the processing payment gateway for successful transactions.

A sample response:

{"status":200,"message":"OK","data":{"MerchantTransID":"0702240316371880","merchant_reg_ID":"ACC-VMCHT0702","Amt_paid":106.25,"response_code":"99","payment_gate":"","date_time":"2017-02-24 16:03:26","payment_ref":null,"response_message":null}}

Find below the status description:

Status

Status Code

Successful (Approved By the Payment Gateway)

0

Pending

99

Failed

Any Other Codes

6.0 Displaying your payment outcome Page

After a successful web service call, format the returned results and display on your own payment outcome page. The payment outcome page must display the following information to the customer:

  • Transaction ID (e.g 1234567891012)
  • Merchant Name (e.g ABCD Nig. Ltd)
  • Transaction status

(Please Note that Successful Transaction Notification should be BLUE while other transactions should be displayed in RED) Contact details of the merchant (Address/Email Address, Phone Number)

Live Demo




By clicking Pay Now you agree to our terms and Conditions