Skip to main content

Payin SDK

Overview

The eLipa Payin SDK provides a simple way to integrate payment collection features into your Nigerian web application. This SDK supports initiating payments, receiving client-side transaction callbacks, and verifying payments from your backend.

✅ Key Capabilities

  • Accept NGN payments from customers in Nigeria.
  • Use a secure JavaScript interface for payment initiation.
  • Handle real-time callback responses after payment.
  • Verify completed transactions from your backend.

📘 Versioning

eLipa uses versioning to manage improvements and non-backward-compatible changes.

info

Currently, there’s no rate limit on incoming requests from your vetted Vendor ID.

Important versioning notes:

  • Adding new fields won’t be considered a breaking change.
  • Removing or altering existing non-optional fields will be treated as an incompatible change.
  • Your system should gracefully handle unexpected additional fields in responses.

🤝 Contributing

We welcome suggestions and feedback!

🆘 Need Support?

If you need help or have any questions:


🔗 Script URLs

Embed the SDK script in your HTML depending on your environment:

<!-- Live -->
<script src="https://sdk.elipa.global/js/elipa-prod-sdk-v2.js"></script>

<!-- Sandbox -->
<script src="https://test.ipayafrica.com/js/elipa-prod-sdk-v2.js"></script>

🧪 Sandbox Testing Guide

Use these credentials to simulate test transactions:

  • MERCHANT_ID: demo
  • vid: demo
  • hashKey: ipaykey
  • Base URL: https://apis.staging.elipa.global

These must not be used in production environments.


🔐 Authentication

All backend interactions require a secure hash. The hash must be generated using HMAC SHA256:

  1. Sort all fields alphabetically by key.
  2. Convert them into a URL-encoded string.
  3. Sign the string using your hashKey.
  4. Include the resulting hash as part of your payload.
Do NOT expose your hashKey in frontend code.

Always compute hashes server-side to protect your credentials.


⚙️ Integration Steps

1. Load the SDK

Include the SDK <script> tag in your <head> section.

2. Prepare and Initiate Payment


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>eLipa Payment</title>
<script src="https://sdk.elipa.global/js/elipa-prod-sdk-v2.js"></script>
</head>
<body>
<button onclick="startElipaPayment()">Pay Now</button>

<script>
function startElipaPayment() {
if (typeof ELIPA === "undefined") {
console.error("Error: eLipa SDK not loaded!");
alert("eLipa SDK failed to load. Check your network.");
return;
}

let paydata = {
MERCHANT_ID: "",// enter your vendor id
vid: "", // enter your vendor id
amount: "10",
order_id: "",
email: "[email protected]",
currency: "NGN",
country: "NG",
callback: function (response) {
if (response.response_code === 200) {
alert("Payment Successful!");
window.location.href = "callback.php";
} else {
alert("Payment Failed: " + response.response_text);
window.location.href = "error.php";
}
}
};
try {
let elipa = new ELIPA(paydata);
console.log("eLipa Object Created:", elipa);
elipa.start(paydata);
} catch (error) {
console.error("eLipa Error:", error.message);
alert("eLipa SDK Error: " + error.message);
}
}
</script>
</body>
</html>


🔑 Required Parameters

ParameterDescriptionRequired
MERCHANT_IDMerchant ID from your eLipa dashboard
amountAmount to be paid (in NGN)
currencyCurrency code — use NGN
countryCountry code — use ng
emailPayer's email address
order_idUnique order reference
callbackJavaScript function for handling result
phoneOptional phone number of payer

🧑‍💻 Steps for the Customer

Step 1: Select Payment Method

After redirect, the customer sees the payment selection screen:

eLipa Payment Screen 1

Click BANK TRANSFER to proceed.

Step 2: Complete Bank Transfer

eLipa Payment Screen 2

Then, instruct your customer to:

  1. Open their banking app.
  2. Select the bank name
  3. Enter the account number
  4. Confirm the account name
  5. Enter the exact amount
  6. Enter their PIN and authorize the transfer.
  7. Wait for the SMS confirmation.
Important

Each account is unique and expires in 24 hours. Do not reuse.


📬 Webhook Notification

When a payment is completed, a webhook is sent to your registered Webhook URL which is configure in your merchant dashboard under settings.

Parameter NameDescription
amountThe monetary value of the transaction
channelThe channel of payment used to make the transaction
channeltypeThe type of channel used for the transaction
codeThe code identifying the transaction
commissionThe commission charged for the transaction
currencyThe currency used in the transaction
countryThe country associated with the transaction
datetimeThe date and time the transaction was made (YYYY-MM-DD 00:00:00)
elipa_referenceA reference number sent by elipa
phoneThe phone number involved in the transaction
referenceA user generated reference number for the transaction
statusThe current status of the transaction
vatThe Value Added Tax (VAT) applied to the transaction
vidThe merchant description. Vendor ID (a.k.a Merchant ID)

Endpoint

 Search_URL [POST]: https://apis.elipa.global/payments/v2/transaction/search/ng

Parameters and Required Fields

Parameter NameDatatypeDescription
oidalphanumeric(30)Your unique system generated Order ID
vidalphanumeric(12)Your vendor ID. Use 'demo' on staging.
hashalphanumeric(64)HMAC-SHA256 hash of oid + vid using your secret hashKey

Sample Integration


<?php
$oid = ''; // from your system
$vid = ''; //your actual vid
$hashKey = 'ipaykey'; //your system generated hash key
$apiUrl = 'https://apis.elipa.global/payments/v2/transaction/search/ng';

$dataString = $oid . $vid;
$hash = hash_hmac('sha256', $dataString, $hashKey);

$payload = [
'oid' => $oid,
'vid' => $vid,
'hash' => $hash
];

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
]);

$response = curl_exec($ch);
$error = curl_error($ch);
curl_close($ch);

if ($error) {
echo "❌ cURL Error: $error
";
} else {
echo "✅ Request Sent to: $apiUrl
";
echo "🔐 Hash Used: $hash
";
echo "📤 Payload: " . json_encode($payload, JSON_PRETTY_PRINT) . "

";
$decoded = json_decode($response, true);
echo "📥 API Response:
" . json_encode($decoded, JSON_PRETTY_PRINT) . "
";
}
?>

Expected Response


{
"header_status": 200,
"status": 1,
"text": "payment record found",
"data": {
"vid": "demo",
"sid": "mw58demo317071742995052205024694",
"oid": "67e3fe69b0225",
"transaction_amount": "1.00",
"transaction_code": "REF20250326S65864037",
"telephone": "",
"firstname": "First name",
"lastname": "Last name",
"paid_at": "2025-03-26 16:19:44",
"payment_mode": "BANK TRANSFER"
},
"hash": "a23b609d7b7192551a91c6cefec8b25427200d3a4b110ccd243fef1c94218f8b",
"reasonCode": "SUCCESS",
"message": "Transaction has been processed successfully"
}

✅ Transaction Verify

Endpoint

Verify_URL [POST]: https://apis.elipa.global/payments/v2/session/v4/transaction/search/ng

Parameters and Required Fields

Parameter NameDatatypeDescription
codealphanumeric(30)Transaction code received in the webhook
vidalphanumeric(12)Your vendor ID. Use demo on sn sandbox
hashalphanumeric(64)HMAC-SHA256 hash of sorted fields using your hashKey

Sample Integration


<?php

$fields = [
'code' => '', //The param code that you get on the webhook
'vid' => '', // Your vendor ID
];
ksort($fields);
$data_string = http_build_query($fields);
$hashKey = ''; //your system generated hash key

$fields['hash'] = hash_hmac('sha256', $data_string, $hashKey);

$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://apis.elipa.global/payments/v2/session/v4/transaction/search/ng',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode($fields),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
),
));
$response = curl_exec($curl);

curl_close($curl);

echo $response;

Expected Response


{
"header_status": 200,
"status": "SUCCESS",
"text": "payment record found",
"data": {
"paid_at": "2025-07-11 09:33:41",
"firstname": "First name",
"lastname": "Last name",
"telephone": "",
"payment_mode": "BANKTRANSFERNGH",
"curr": "NGN",
"amount": "100.00",
"tid": "JF5191093000E54",
"commission": "1.00",
"oid": "13g85uos"
},
"hash": "eae9e240ba51d54591f29154107ecf19bd828651810dd8634d9bdc182622b295"
}

⚠️ Errors & Status Codes

CodeMeaningSuggested Action
200OKProceed as normal. The request was successful
⚠️ 400Bad RequestDouble check your request payload. Check that all required fields are present and are correctly formatted.
401UnauthorizedVerify API credentials such as vid and hashkey. Also, ensure the hash is correctly computed.
404Not FoundEnsure transaction identifiers (like oid) are valid. Confirm test data exists if sandboxing. Check for typos or deleted records.
💥 500 - 5xxServer ErrorPlease contact support with logs or payload used when you encounter this.