Introduction

The Ekhoni Digital Payment Gateway enables merchants to securely receive payments from their customers. Our PCI-compliant flow ensures that you can accept payments with minimal effort while maintaining the highest level of security.

You can use our RESTful APIs to integrate into any environment (PHP, Node, Python, etc.) or use our pre-built plugins for popular platforms like WordPress.

API Endpoints

Base URL: https://paypay.ekhonidigital.com/api/

POST payment/create
POST payment/verify

Request Parameters

Required Fields

FieldDescriptionConstraint
API-KEYYour unique brand API key from dashboardRequired
amountPayment amount in decimal (e.g. 10.00)Required
success_urlThe URL we redirect to after successRequired
cancel_urlThe URL we redirect to after cancellationRequired

Metadata Fields

You can send custom metadata to track customer information. This will be returned in the response.

FieldDescription
emailCustomer's email address
phoneCustomer's mobile number
order_idYour internal order reference ID

Create Payment

Initiate a new payment request and receive a secure payment link.

<?php
$curl = curl_init();
curl_setopt_array($curl, [
 CURLOPT_URL => 'https://paypay.ekhonidigital.com/api/payment/create',
 CURLOPT_RETURNTRANSFER => true,
 CURLOPT_CUSTOMREQUEST => 'POST',
 CURLOPT_POSTFIELDS => json_encode([
 'success_url' => 'https://site.com/success',
 'cancel_url' => 'https://site.com/cancel',
 'amount' => '100'
 ]),
 CURLOPT_HTTPHEADER => [
 'API-KEY: YOUR_KEY',
 'Content-Type: application/json'
 ],
]);
$res = curl_exec($curl);
curl_close($curl);
echo $res;
?>
<?php
$client = new \GuzzleHttp\Client();
$res = $client->post('https://paypay.ekhonidigital.com/api/payment/create', [
 'headers' => [
 'API-KEY' => 'YOUR_KEY',
 'Content-Type' => 'application/json',
 ],
 'json' => [
 'success_url' => 'https://site.com/success',
 'cancel_url' => 'https://site.com/cancel',
 'amount' => '100',
 ]
]);
echo $res->getBody();
?>
const axios = require('axios');
const data = {
 success_url: 'https://site.com/success',
 cancel_url: 'https://site.com/cancel',
 amount: 100
};
axios.post('https://paypay.ekhonidigital.com/api/payment/create', data, {
 headers: {
 'API-KEY': 'YOUR_KEY',
 'Content-Type': 'application/json'
 }
}).then(res => console.log(res.data));
import requests
import json

url = "https://paypay.ekhonidigital.com/api/payment/create"
payload = json.dumps({
 "success_url": "https://site.com/success",
 "cancel_url": "https://site.com/cancel",
 "amount": 100
})
headers = {
 "API-KEY": "YOUR_KEY",
 "Content-Type": "application/json"
}
res = requests.post(url, headers=headers, data=payload)
print(res.text)
package main

import (
 "fmt"
 "strings"
 "net/http"
 "io/ioutil"
)

func main() {
 url := "https://paypay.ekhonidigital.com/api/payment/create"
 payload := strings.NewReader(`{
 "success_url": "https://site.com/success",
 "cancel_url": "https://site.com/cancel",
 "amount": "100"
 }`)

 req, _ := http.NewRequest("POST", url, payload)
 req.Header.Add("API-KEY", "YOUR_KEY")
 req.Header.Add("Content-Type", "application/json")

 res, _ := http.DefaultClient.Do(req)
 defer res.Body.Close()

 body, _ := ioutil.ReadAll(res.Body)
 fmt.Println(string(body))
}

Verify Payment

Verify the status of a transaction using the transaction ID returned to your success URL.

<?php
$curl = curl_init();
curl_setopt_array($curl, [
 CURLOPT_URL => 'https://paypay.ekhonidigital.com/api/payment/verify',
 CURLOPT_RETURNTRANSFER => true,
 CURLOPT_CUSTOMREQUEST => 'POST',
 CURLOPT_POSTFIELDS => '{"transaction_id":"T123"}',
 CURLOPT_HTTPHEADER => [
 'API-KEY: YOUR_KEY',
 'Content-Type: application/json'
 ],
]);
$res = curl_exec($curl);
curl_close($curl);
echo $res;
?>
<?php
$client = new \GuzzleHttp\Client();
$res = $client->post('https://paypay.ekhonidigital.com/api/payment/verify', [
 'headers' => [
 'API-KEY' => 'YOUR_KEY',
 'Content-Type' => 'application/json',
 ],
 'json' => [
 'transaction_id' => 'T123'
 ]
]);
echo $res->getBody();
?>
const axios = require('axios');
axios.post('https://paypay.ekhonidigital.com/api/payment/verify', {
 transaction_id: 'T123'
}, {
 headers: {
 'API-KEY': 'YOUR_KEY',
 'Content-Type': 'application/json'
 }
}).then(res => console.log(res.data));
import requests
import json

url = "https://paypay.ekhonidigital.com/api/payment/verify"
payload = json.dumps({"transaction_id": "T123"})
headers = {
 "API-KEY": "YOUR_KEY",
 "Content-Type": "application/json"
}
res = requests.post(url, headers=headers, data=payload)
print(res.text)
package main

import (
 "fmt"
 "strings"
 "net/http"
 "io/ioutil"
)

func main() {
 url := "https://paypay.ekhonidigital.com/api/payment/verify"
 payload := strings.NewReader(`{"transaction_id":"T123"}`)

 req, _ := http.NewRequest("POST", url, payload)
 req.Header.Add("API-KEY", "YOUR_KEY")
 req.Header.Add("Content-Type", "application/json")

 res, _ := http.DefaultClient.Do(req)
 defer res.Body.Close()

 body, _ := ioutil.ReadAll(res.Body)
 fmt.Println(string(body))
}

Downloads & Modules

Get started quickly with our pre-built plugins and SDKs.

WordPress Plugin
v1.2.0 • WooCommerce
WHMCS Module
v2.0.1 • Automation
SMM Panel Script
v3.5.0 • Perfect Panel
Mobile App
v1.0.5 • SDK Included

Welcome Back

Sign in to your Ekhoni Digital account
Continue with Google
or sign in with email
Forgot Password?