This document describes how an authorized reseller can:
Every request must be authenticated using a valid API Key assigned to the reseller account.
Send the key in the request headers as follows:
X-API-Key: YOUR_API_KEY
Content-Type: application/json
The request body must be sent as JSON with the following structure:
{
"customer_ref": {
"type": "id",
"value": "USER_ID"
},
"amount": 1000,
"currency": "SDG",
"txn_id": "UNIQUE_TXN_ID"
}
| Field | Type | Required | Description |
|---|---|---|---|
customer_ref.type |
string | Yes | Reference type. For wallet top-up, use "id". |
customer_ref.value |
string | Yes | The customer ID or wallet ID inside the Elyonko Online system. |
amount |
number | Yes | The amount to top up in SDG (Sudanese Pound). |
currency |
string | Yes | Currency code. For this endpoint, always use "SDG". |
txn_id |
string | Yes |
Unique transaction identifier generated by the reseller.
It must not be reused. Any duplicate
txn_id will be rejected.
|
txn_id must be unique per reseller.
Use your own order ID, invoice ID, or a unique reference to prevent duplicates.
curl -X POST "https://elyonko.online/wp-json/elyonko-gw/v1/wallet/topup" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY_HERE" \
-d '{
"customer_ref": { "type": "id", "value": "133221" },
"amount": 2500,
"currency": "SDG",
"txn_id": "EL-REQ-2025-001"
}'
{
"status": "success",
"code": "topup_completed",
"message": "Topup processed successfully via gateway.",
"data": {
"amount": 2500,
"currency": "SDG",
"txn_id": "EL-REQ-2025-001",
"core_txn_id": "CORE-001"
}
}
Before performing a wallet top-up, resellers can verify a user by sending a User Search request. This endpoint allows you to confirm that the user exists and optionally retrieve basic information.
The request body must be sent as JSON with the following structure:
{
"customer_ref": {
"type": "id",
"value": "USER_ID"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
customer_ref.type |
string | Yes | Reference type. For user search, use "id". |
customer_ref.value |
string | Yes | The customer ID inside the Elyonko Online system. |
curl -X POST "https://elyonko.online/wp-json/elyonko-gw/v1/user/search" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_RESELLER_KEY" \
-d "{ \"customer_ref\": { \"type\": \"id\", \"value\": \"2\" } }"
{
"status": "success",
"code": "user_found",
"message": "User information retrieved successfully.",
"data": {
"user_id": 2,
"name": "Example User",
"phone": "0923000000",
"wallet_balance": 15000,
"status": "active"
}
}
Note: The exact structure of the data object
may vary depending on your Elyonko Online configuration. Only use the fields that are
documented and officially supported in your environment.
{
"status": "failed",
"code": "duplicate_txn",
"message": "This transaction has already been processed.",
"data": {
"txn_id": "EL-REQ-2025-001"
}
}
{
"status": "failed",
"code": "insufficient_balance",
"message": "Your wallet balance is not enough."
}
{
"status": "failed",
"code": "invalid_api_key",
"message": "API key is invalid or disabled."
}
{
"status": "failed",
"code": "forbidden_ip",
"message": "IP not allowed"
}
{
"status": "failed",
"code": "user_not_found",
"message": "No user found with the provided ID."
}
/user/search before large top-ups to verify the user.status = "success" from the Elyonko API.txn_id without checking if the transaction was processed.
POST https://elyonko.online/wp-json/elyonko-gw/v1/wallet/topup
Headers:
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Body:
{
"customer_ref": { "type": "id", "value": "USER_ID" },
"amount": 1000,
"currency": "SDG",
"txn_id": "UNIQUE_TXN_ID"
}
POST https://elyonko.online/wp-json/elyonko-gw/v1/user/search
Headers:
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Body:
{
"customer_ref": { "type": "id", "value": "USER_ID" }
}