# Introduction

QOOPay is a simple page that can be called from any website seeking to offer visitors the facility to pay for goods or services using their QOOP Wallet.

![](/files/-LmPcMUxAEJyjCCwibCX)

### Recommendations

1. You must have the QOOP logo on your site to differentiate our payment services from the other ones you might have.
2. The customer must be aware of the total amount he/she will be debited before loading the payment page. Always inform the customer duly.
3. You must communicate user’s transaction reference numbers to them before they make payment so that they will have a reference value in case they have issues with their transactions. The recommended ways of communicating these details are Email, SMS or Display it boldly on the website and ask them to take note of it.
4. Confirm that the amount displayed on the payment page is the same amount that was displayed to the customer before redirecting to the payment page.
5. After a transaction had been processed, certain information needs to be displayed to the customer. They include the following:\
   a. The transaction status in a very friendly way. For example, *“Your transaction was not successful. Reason: Insufficient Funds”.* This is more descriptive. \
   b. The transaction reference number which you sent to QOOP for that transaction. \
   c. The payment reference which is generated and returned by QOOP.
6. There are various response codes that can be returned by QOOP along with their different descriptions. The objective here is to ensure that the customer gets the same description as sent by QOOP. The website should NEVER customize QOOP responses displayed to the customer.
7. After a transaction has been completed successfully, you should send a mail containing the transaction details to the customer.
8. You must have a table that logs ALL transaction attempts on your website (both Successful and Failed) as this would enable you to update transactions with responses received and ensure you can track pending transactions as well as provide customer service to your customers. Find below our recommendations on the fields that must be captured to provide optimum support: \
   a. Transaction Date and Time \
   b. Transaction Reference Number \
   c. Approved Amount \
   d. Response Description \
   e. Response Code \
   f. Transaction amount (what is to be approved. This could be optional) \
   g. Customer name and ID (Optional)


# Registration

### Register With Us

To own an account with QOOP, visit the [registration page](https://dash.qpaycentre.com.ng/login?action=register) and create an account in one simple step with your choice *username* and *password*.

![](/files/-LmPq8uSwZ_hvw91VaGE)

After registration, you can login to your account, however, you will not have a LIVE API Key to use for processing payments. You will be assigned one, once your documentation and agreement has been received and processed.&#x20;


# Dashboard Interface

When you login to your Dashboard you will see widgets that gives you information about your recent sales, Sales YTD, Payouts for the current year and Cooperative sales.

![](/files/-LmQC9rSR4DQpI-46aTN)

### Transactions Page

The transaction page gives you list of all the transactions that you have received from QOOP Members.

![](/files/-LmPtu1KOO1YMvUlffNE)

### Payouts Page

This pages gives you breakdown of all payouts that have been made to your accounts and the transaction/order that they are attached to.

![](/files/-LmPvPV7I0UEhUvMcnr7)


# Required Documents

Before you can be able to transact via QOOP and get our members to buy from you, you need a LIVE API key. \
The following are required to for us to assign you a LIVE API key:

1. Registered business name
2. Bank account details
3. Logo (recommended dimension 298px by 28px)
4. Supporting Documents (CAC cert or business name and QOOP agreement which will be sent to you by email to sign and execute)

![](/files/-LmPwnamdPapHT4dYi4Y)


# Get LIVE API Key

LIVE API Key is required to perform transaction on QOOP. You will get it from the **"Other"** tab on your profile page.

![](/files/-LmQ6bRChQaZ48D86M5q)


# Payment Flow

Integrating QOOP with an existing website is extremely easy and can be achieved with a few simple steps. At a high level you want to achieve the following:

* POST transaction details to load the **QOOP&#x20;*****PayExpress***
* Calculate a request hash to ensure transaction integrity
* Provide a URL which QOOP would post back the authorization response
* Query the transaction details directly from QOOP *Get Transaction Endpoint* to ensure the actual transaction amount was approved.

<div align="center"><img src="/files/-LmPg3RHtb4LSQPMlyJl" alt=""></div>

**Step 1**\
`POST` is made with Transaction parameters to the QOOP payment endpoint. This is known as the beginning of the **payment leg**.

**Step 2**\
A `RESPONSE` is sent from the payment endpoint.

**Step 3**\
The merchant’s website initiates a `GET` request to the payment confirmation endpoint requesting the status of the concluded transaction. This is the beginning of the *getTransaction* leg.

**Step 4**\
&#x20;A `RESPONSE` is sent from the confirmation endpoint containing the status of the transaction.

The only requirement is to `POST` data to the QOOP server. The next section describes how to create this `POST`.


# Posting Transaction

Create an HTML form wherever you would like your ‘Pay’ button to appear and then set the form’s method to POST and the action attribute to [*https://pay.qoop.ng/payexpress*](https://pay.qoop.ng/payexpress)

Create a submit button in the form and a few hidden fields through which you would assign transaction values you wish to post. See Fields and values for the required fields and a few optional ones.

| Field               | Description                                                                                                                                        | Type    |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| amount              | Transaction amount  E.g., 2500.00 for 2,500.00                                                                                                     | float   |
| site\_redirect\_url | URL of the page on your web site/portal user is to be redirected to after payment. Ensure you it has either http\:// or https\://                  | URL     |
| txn\_ref            | Transaction Reference Number. This Reference Number must be generated by your web site/portal and a unique value must be sent for each transaction | string  |
| hash                | A Hashed value of selected combined parameters.                                                                                                    | string  |
| cust\_name          | Customer's fullname                                                                                                                                |         |
| partner\_id         | This is your username on the QOOP Dashboard                                                                                                        |         |
| live\_api\_key      | This key can be found in your QOOP Dashboard profile.                                                                                              | string  |
| order\_id           | The unique ID for the order/transaction being sent. This must be visible to the customer on the merchant website                                   | integer |

**Sample request**

```markup
<form action="https://pay.qoop.ng/payexpress" method="post" >
	<input type="hidden" name="amount" value="2500.00" />
	<input type="hidden" name="site_redirect_url" value="https://storeurl/wc-api/wc_plugin_qpay_Gateway/" />
	<input type="hidden" name="txn_ref" value="5af4392212b9b" />
	<input type="hidden" name="hash" value="d8f8f0d4d12350a4b52d9716" />
	<input type="hidden" name="cust_name" value="Simon Kolawole" />
	<input type="hidden" name="partner_id" value="hofstede" />
	<input type="hidden" name="live_api_key" value="D2Q0KWkIE332Xx39FyB3bv" />
	<input type="hidden" name="order_id" value="15665" />
</form>   
```

###

## How to process the response

The following are the parameters returned by QOOP for real-time transactions. Note that QOOP will perform a `GET` request to the **site\_redirect\_url** provided in the request to QOOP.

`https://site_redirect_url/?`\
`txnRef=5af4392212b9b`\
`&PaymentReference=238477494594`\
`&Amount=2500.00`\
`&err=false`\
`&ResponseCode=00`\
`&ResponseDescription=Success`

| Param               | Description                                                                                                                  | Type    |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------- |
| txnRef              | The transaction Reference initially generated & sent by the merchant site will be sent back with this variable.              | string  |
| PaymentReference    | A reference number that uniquely identifies all transactions that go through the QOOP payment gateway.                       | string  |
| Amount              | Transaction amount  E.g., 2500.00 for 2,500.00                                                                               | float   |
| err                 | **Default:** false. If the PayExpress experienced error, it will return true                                                 | boolean |
| ResponseCode        | <p>00 = payment successful</p><p>10 = payment failed: insufficient amount in wallet<br>11 = payment failed: other</p><p></p> | string  |
| ResponseDescription | success or fail                                                                                                              | string  |

## How to validate a transaction

## Get Transaction

<mark style="color:blue;">`GET`</mark> `https://pay.qoop.ng/gettransaction`

This endpoint is to validate/get a transaction

#### Query Parameters

| Name           | Type   | Description                                     |
| -------------- | ------ | ----------------------------------------------- |
| live\_api\_key | string | This key can be found in your QOOP Dashboard    |
| order\_id      | string | Order ID initially used to generate transaction |

{% tabs %}
{% tab title="200 Validated Response" %}

```javascript
{
  "ResponseCode": "00",
  "Amount": 20000,
  "ResponseDescription": "Success"
}Other response codes are Other
```

{% endtab %}
{% endtabs %}

Other response codes are:

| Response Code | Response Description                                |
| ------------- | --------------------------------------------------- |
| 02            | More than one transaction with same Order ID #XXXX. |
| 03            | Transaction #XXXX does not exist.                   |
| 04            | Invalid API Key.                                    |
| 05            | Missing API Key.                                    |
| 06            | Order ID unknown.                                   |


# Woocommerce

Click here to [download the Wordpress/Woocommerce](https://pay.qoop.ng/qpaymedia/2019/08/qpaycentre-woocommerce-payment-gateway.zip) Plugin.

**Setting Page on WOOCommerce > Payments**

![](/files/-LmQ9AIrwnZS4fIA5YrU)

![](/files/-LmQ9I7yse3xjIpVW53y)

**QOOP Payment option on Checkout page**

![](/files/-LmQ9VoojHvKaAWW26yo)

User is taken to their QOOP page to login and Pay

![](/files/-LmQAXHHZb35FBhJIcRG)

![](/files/-LmQBJW-8GfwcduDZW4M)

After this, the customer is taken back to your website when the order is confirmed. This order will reflect in your Woocommerce order page as paid and will also reflect in your QOOP Dashboard.

![](/files/-LmQBVMu0NfH9hUSijTc)

![](/files/-LmQD2oG7oJwFiZOI5Lu)


