Al-Qimah REST-API Documentation
📄 Get Started Here
This documentation explains how to work with the API service of our Payment platform.
The following essential variables are required to integrate with our API services:
- UserName
- Password
- AccountNumber
- API Token
- Request Method:
POST
- Content-Type:
application/json
Generate Login Token
Generate Login Token and access token generation are performed by sending
AccountNumber
, UserName
, and Token
in the request
body fields. Below is the method to generate the Token
field:
Token = md5(UserName + AccountNumber + md5(Password) + APIToken)
Example in PHP
$token = md5($UserName . $AccountNumber . md5($Password) . $ApiToken);
Example in C#
using System;
using System.Security.Cryptography;
using System.Text;
public class Program
{
public static void Main()
{
string UserName = "YourUserName";
string AccountNumber = "YourAccountNumber";
string Password = "YourPassword";
string ApiToken = "YourApiToken";
string token = GenerateToken(UserName, AccountNumber, Password, ApiToken);
Console.WriteLine(token);
}
public static string GenerateToken(string userName, string accountNumber, string password, string apiToken)
{
string innerMd5 = GetMd5Hash(password);
string concatenatedString = userName + accountNumber + innerMd5 + apiToken;
return GetMd5Hash(concatenatedString);
}
private static string GetMd5Hash(string input)
{
using (MD5 md5 = MD5.Create())
{
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hashBytes.Length; i++)
{
sb.Append(hashBytes[i].ToString("x2"));
}
return sb.ToString();
}
}
}
Networks Data
Network Number | Description |
---|
Services Data
Network Number | Service Number | Description |
---|
Endpoints
Login
https://softibs.com/rest-api/login
To obtain the access token, send a login request.
The access_token
received will be used in all subsequent requests.
The response includes an access_token
(for future requests) and token_expires
(token expiration date and time).
Ensure the access token is valid before making requests; otherwise, generate a new one.
Request Body
Field Name | Description | Required |
---|---|---|
AccountNumber |
Your account number on our platform | Yes |
UserName |
Your username on our platform | Yes |
Token |
Generate Login Token | Yes |
Response Type | Response Example |
---|---|
Success Response |
|
Error Response |
|
Global Operations
These operations relate to your account, such as viewing the balance, checking transaction status, and reviewing feed entries.
In these requests, the NetworkNumber
is typically set to 0. The
ServiceNumber
specifies the desired service from network 0.
For example:
- To check account balance:
ServiceNumber = 1
- To check transaction status:
ServiceNumber = 2
- To view feed vouchers:
ServiceNumber = 3
Get Account Balance
https://softibs.com/rest-api/
To retrieve your account balance.
Request Headers
Header Name | Value | Description |
---|---|---|
api-token |
access_token From Login Request |
Access token from Login request |
Request Fields
Field Name | Value | Description |
---|---|---|
NetworkNumber |
0 |
Global Network Number |
ServiceNumber |
1 |
Service Number for balance query |
Response Type | Response Example |
---|---|
Success Response |
|
Error Response |
|
Get Operation Status
https://softibs.com/rest-api/
To check an operation's status, send a request with ServiceNumber = 2
and include your system's TransactionID
.
The response includes:
status
: Overall request statusoperationStatus
: Transaction status (1: Ready, 0: Failed, -1: Pending)mobileNumber
: Phone numberprice
: Transaction pricemessage
: Status messagedetails
: Additional transaction notestransactionID
: Your system's transaction numberreferenceID
: Our system's transaction number
Request Headers
Header Name | Value | Description |
---|---|---|
api-token |
access_token From Login Request |
Access token from Login request |
Request Fields
Field Name | Value | Description |
---|---|---|
NetworkNumber |
0 |
Global Network Number |
ServiceNumber |
2 |
Service Number for status query |
TransactionID |
Transaction ID from your system |
Response Type | Response Example |
---|---|
Operation Success Response |
|
Operation Failed Response |
|
Operation Pending Response |
|
Error Response |
|
Get Feed Clients Balance
https://softibs.com/rest-api/
This request is used to display the feed vouchers that have been added to your
account with us. The response will include an element named data
, which
is an array of objects. Each object contains the following properties:
Date
: The date of the document.Amount
: The amount that was added.Currency
: The name of the currency in which the amount was added.Notes
: Any notes related to the document.
Request Headers
Header Name | Value | Description |
---|---|---|
api-token |
access_token From Login Request |
Access token from Login request |
Request Fields
Field Name | Value | Description |
---|---|---|
NetworkNumber |
0 |
Global Network Number |
ServiceNumber |
3 |
Service Number for clients balance |
Response Type | Response Example |
---|---|
Success Response |
|
Error Response |
|
Get Games and Gift Cards Categories
https://softibs.com/rest-api/
To retrieve a list of available games and gift card categories.
Request Headers
Header Name | Value | Description |
---|---|---|
api-token |
access_token From Login Request |
Access token from Login request |
Request Fields
Field Name | Value | Description |
---|---|---|
NetworkNumber |
0 |
Global Network Number |
ServiceNumber |
4 |
Service Number for categories |
Response Type | Response Example |
---|---|
Success Response |
|
Error Response |
|
Query Operations
https://softibs.com/rest-api/
These requests are used to check the balance, offers, and subscriptions of subscribers of Yemeni telecom companies. Typically, the request data is structured as follows:
-
NetworkNumber
: The network number through which the request will be made. -
ServiceNumber
: The service inquiry number you want to request. -
MobileNumber
: The subscriber's phone number. -
TransactionID
: A unique transaction number for each request. This number must be unique for every request.
Request Headers
Header Name | Value | Description |
---|---|---|
api-token |
access_token From Login Request |
Access token from Login request |
Request Fields
Field Name | Value | Description |
---|---|---|
NetworkNumber |
Example: 1 |
The network number through which the request will be made :
|
ServiceNumber |
101 |
The service inquiry number you want to request :
|
MobileNumber |
7XXXXXXXX - 0XXXXXXX - 10XXXXXX |
Mobile number to query |
TransactionID |
XXXXXXXXX |
A unique transaction number for each request. This number must be unique for every request |
Response Type | Response Example | Description |
---|---|---|
Yemen Mobile Balance Success Response |
|
mobileType : The type of subscriber:
|
Yemen Mobile Loan Success Response |
|
|
Yemen Mobile Offers Success Response |
|
|
ADSL Balance Success Response |
|
|
Landphone Balance Success Response |
|
|
Yemen4G Balance Success Response |
|
|
Error Response |
|
Payment Operations
Optional fields can also be included In All Payment Operations Requests, such as:
WebHookURL
: A URL in your system that our platform will call when the status of the order changes. This allows your system to receive updates without the need to query the transaction status manually.WebHookCode
: An optional code or password for the transaction. It will be sent along with the request to the WebHook URL provided in the request. This code acts as a signature for the transaction and helps prevent conflicts. It is recommended that this code be unique for each transaction.
Payment Balance
https://softibs.com/rest-api/
Request Headers
Header Name | Value | Description |
---|---|---|
api-token |
access_token From Login Request |
Access token from Login request |
Request Fields
Field Name | Value | Description |
---|---|---|
NetworkNumber |
Example: 1 |
The network number you want to use |
ServiceNumber |
Example: 103 |
The service number you wish to request |
MobileNumber |
7XXXXXXXX - 0XXXXXXX - 10XXXXXX |
The subscriber's mobile phone number. |
Amount |
100 |
The payment amount or the amount you wish to charge to the mobile
number. Note that in some networks, this amount represents the number of units to be
charged. For example:
|
TransactionID |
xxx |
A unique transaction ID in your system. Each transaction must have a unique ID, and the same ID cannot be used for multiple transactions. |
WebHookURL (optional ) |
https://your-domain.com/webhook |
A URL in your system that our platform will call when the status of the order changes. This allows your system to receive updates without the need to query the transaction status manually |
WebHookCode (optional ) |
xxxxxxxxx |
An optional code or password for the transaction. It will be sent along with the request to the WebHook URL provided in the request. This code acts as a signature for the transaction and helps prevent conflicts. It is recommended that this code be unique for each transaction. |
Response Type | Response Example | Description |
---|---|---|
Success Response |
|
|
Error Response |
|
Payment Offers
https://softibs.com/rest-api/
For Requesting Payment Offers to Telecom Companies
- Instead of the
Amount
field, use theOfferCode
field. OfferCode
: The code of the offer or package you want to request from our platform.
Request Headers
Header Name | Value | Description |
---|---|---|
api-token |
access_token From Login Request |
Access token from Login request |
Request Fields
Field Name | Value | Description |
---|---|---|
NetworkNumber |
Example: 2 |
The network number through which the request will be made |
ServiceNumber |
Example: 202 |
The service inquiry number you want to request |
MobileNumber |
7XXXXXXXX - 73XXXXX - 71XXXXXX - 70XXXXXX |
The subscriber's mobile phone number. |
OfferCode |
PREWhatsApp |
The Offer Link Code |
TransactionID |
xxx |
A unique transaction ID in your system. Each transaction must have a unique ID, and the same ID cannot be used for multiple transactions. |
WebHookURL (optional ) |
https://your-domain.com/webhook |
A URL in your system that our platform will call when the status of the order changes. This allows your system to receive updates without the need to query the transaction status manually |
WebHookCode (optional ) |
xxxxxxxxx |
An optional code or password for the transaction. It will be sent along with the request to the WebHook URL provided in the request. This code acts as a signature for the transaction and helps prevent conflicts. It is recommended that this code be unique for each transaction. |
Response Type | Response Example | Description |
---|---|---|
Success Response |
|
|
Error Response |
|
Payment Game Services and Gift Cards
https://softibs.com/rest-api/
Request Headers
Header Name | Value | Description |
---|---|---|
api-token |
access_token From Login Request |
Access token from Login request |
Request Fields
Field Name | Value | Description |
---|---|---|
NetworkNumber |
Example: 8 |
The network number through which the request will be made |
ServiceNumber |
Example: 801 |
The service inquiry number you want to request |
MobileNumber |
|
Mobile number to recharge |
LinkCode |
Example: pubg_60 |
The category or service code on our platform for which you want to create an order get is from Get Games and Gift Cards Categories Request |
Fields |
|
field in JSON format. This field contains the necessary information for the requested category, such as the player's ID or email. Example format |
Quantity |
1 |
The quantity field is used in game charging categories that allow free quantities such as the number of coins or gold coins. |
TransactionID |
xxx |
A unique transaction ID in your system. Each transaction must have a unique ID, and the same ID cannot be used for multiple transactions. |
WebHookURL (optional ) |
https://your-domain.com/webhook |
A URL in your system that our platform will call when the status of the order changes. This allows your system to receive updates without the need to query the transaction status manually |
WebHookCode (optional ) |
xxxxxxxxx |
An optional code or password for the transaction. It will be sent along with the request to the WebHook URL provided in the request. This code acts as a signature for the transaction and helps prevent conflicts. It is recommended that this code be unique for each transaction. |
Response Type | Response Example | Description |
---|---|---|
Success Response |
|
|
Error Response |
|
Example Webhook Request
If you set the WebHookURL
to https://your-domain.com/webhook
and the
WebHookCode
to xxxxxxxxx
, our platform will send a request to your system upon updating the operation as
follows:
- Endpoint:
https://your-domain.com/webhook
- Method:
GET
- Parameters:
{
"OperationStatus": 1,
"WebHookCode": "xxxxxxxxx",
"TransactionID": "TransactionID From Your System",
"ReferenceID": 220065,
"price": 507.87,
"message": "Order Sucsses"
}
Parameter Descriptions:
OperationStatus
: The status of the operation. Possible values are:0
: Failed1
: Ready
WebHookCode
: The code provided by you when creating the order to prevent conflicts.TransactionID
: The unique ID of the transaction in your system.ReferenceID
: The reference number or transaction ID on our platform.price
: The cost of the operation that will be charged to your account.message
: Notes or comments regarding the status of the operation.
Note: The parameters will not be in JSON format in the actual request. They are shown here in JSON format for clarity. The parameters will be sent as a query string in the URL.
Example Request:
The request sent to your WebHookURL
will look like this:
curl -G "https://your-domain.com/webhook" \
--data-urlencode "OperationStatus=1" \
--data-urlencode "WebHookCode=xxxxxxxxx" \
--data-urlencode "TransactionID=TXN789" \
--data-urlencode "ReferenceID=220065" \
--data-urlencode "price=507.87" \
--data-urlencode "message=Order received and under process"