A comprehensive guide to using the U-Money Gate API for transfers, top-ups, and data packages.
Version: 1.1.0 (Revised)
Last Updated: 2025-06-24
GET
and POST
methods.
All API calls should be made to the following base URL. All endpoints are prefixed with /api/v1/
unless otherwise specified.
https://api.yourdomain.com
This API uses the JSON
format for all request and response bodies.
All responses from the API, for both success and errors, follow a standard structure with the keys
code
, data
, and message
.
code
: The HTTP status code of the response.data
: The requested data. This will be an object or an array for
successful requests, and an empty array []
for errors.
message
: A descriptive message.All requests to the API (except /ping
) must be authenticated using an API
Token.
You must send the token
as a query parameter in the URL of every
request.
Parameter Name | Type | Description |
---|---|---|
token |
String | Your secret access token. |
https://api.yourdomain.com/api/v1/{endpoint}?token=YOUR_API_TOKEN&...
If authentication fails (missing or incorrect token
), the API will return a
401 Unauthorized
error.
Checks if the API server is up and running. No authentication required.
GET /ping
200 OK
Returns a plain text string.
pong
Check the current account balance for your token.
GET /api/v1/balance
Name | Required | Description |
---|---|---|
token |
Yes | Your access token. |
200 OK
{
"code": 200,
"message": "Success!",
"data": [
{
"balance": 12345.67
}
]
}
Retrieves a paginated list of all active and supported packages.
GET /api/v1/packages
Name | Required | Default | Description |
---|---|---|---|
token |
Yes | N/A | Your access token. |
page |
No | 1 | The page number to retrieve. |
per_page |
No | 10 | The number of items per page. |
200 OK
{
"code": 200,
"message": "Success",
"data": [
{
"activated": true,
"description": "60GB/1month Free domestic call 150minutes unlimited Youtube+Facebook+ LAOTV4K",
"is_dynamic": false,
"max_price": "0.00",
"min_price": "150000.00",
"package": "5G150",
"rate": "1.00",
"service": "Data",
"update_at": "22-06-2025 17:17:16",
"use_for": "209,0209"
}
],
"pagination": {
"total_items": 25,
"total_pages": 3,
"current_page": 1,
"per_page": 10,
"has_next": true,
"has_prev": false
}
}
Creates a new transaction order for top-up or data packages.
POST /api/v1/create_transaction
Name | Required | Description |
---|---|---|
token |
Yes | Your access token. |
Name | Type | Required | Description |
---|---|---|---|
package |
String | Yes | The package code from the /packages endpoint. |
service |
String | Yes | The service type from the /packages endpoint. |
receiver |
String | Yes | Recipient's phone number. Must start with a prefix from the package's
use_for field.
|
amount |
Integer | If package is dynamic | Transaction amount. Required if is_dynamic is true. Must be between
min_price and max_price .
|
content |
String | No | Optional transaction description. |
Pricing Formula: The actual cost deducted from your account is calculated as follows:
cost = amount * (1 - discount / 100)
Where discount
is the combined discount from your token and the package.
Refund Policy: In the event of a failed transaction for any reason, the full cost
deducted will be automatically refunded to your account balance. If you encounter any issues, please contact your token provider for support.
200 OK
{
"code": 200,
"message": "Success!",
"data": [
{
"amount": "1000.00",
"content": "abc",
"created_at": 1750679842.461925,
"discount": "9.00",
"expire_at": 1750679871.962908,
"package": "209",
"receiver": "0209xxxxxxx",
"service": "Topup",
"state": 0,
"status": "Pending",
"transaction_id": "fe4eca0d-9eb6-4e90-a862-2ceca6b11475",
"update_at": 1750679842.461925
}
]
}
Checks the status of a specific transaction.
POST /api/v1/check_transaction
Name | Required | Description |
---|---|---|
token |
Yes | Your access token. |
Name | Type | Required | Description |
---|---|---|---|
transaction_id |
String | Yes | The Transaction ID from the /create_transaction response. |
200 OK
{
"code": 200,
"message": "Success!",
"data": [
{
"amount": "5000.00",
"content": "abc",
"created_at": 1750676450.038312,
"discount": "9.00",
"expire_at": 1750676479.686785,
"package": "209",
"receiver": "0209xxxxxxx",
"service": "Topup",
"state": 0,
"status": "Pending",
"transaction_id": "aa4fabba-165d-44d0-bf91-d7ded05fdb9e",
"update_at": 1750676450.135122
}
]
}
state |
status |
Description |
---|---|---|
0 | Pending | The transaction is waiting. |
1 | Processing | The transaction is in progress. |
2 | Success | The transaction was successful. |
99 | Server Error | A server-side failure occurred. |
404 | Not Found | The transaction does not exist. |
Retrieves a paginated transaction history associated with your API token.
GET /api/v1/history
Name | Required | Default | Description |
---|---|---|---|
token |
Yes | N/A | Your access token. |
page |
No | 1 | The page number to retrieve. |
per_page |
No | 10 | The number of items per page. |
month |
No | Current month | Filter transactions by month (1-12). |
200 OK
{
"code": 200,
"message": "Success",
"data": [
{
"amount": "1000.00",
"content": "abc",
"created_at": 1750679723.602639,
"discount": "9.00",
"expire_at": 1750679753.1074,
"package": "209",
"receiver": "0209xxxxxxx",
"service": "Topup",
"state": 2,
"status": "Topup - 209 to 0209xxxxxxx with 1000.00",
"transaction_id": "f81dd418-6a04-426f-ba39-3d448c459dd3",
"update_at": 1750679752.469642
},
],
"pagination": {
"total_items": 150,
"total_pages": 15,
"current_page": 1,
"per_page": 10,
"has_next": true,
"has_prev": false
}
}
This API gateway is provided for the primary purpose of simplifying and automating valid transactions in a convenient and fast manner.
By using this API, you agree to these terms.
Processing...