U-Money Gate API Documentation

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

Welcome to the U-Money Gate API. This API allows you to programmatically perform a variety of actions:
  • Transfer money
  • Top up phone credit
  • Top up data
  • * All for Unitel (Laos) numbers
This document provides detailed information on how to use the available endpoints, which use both GET and POST methods.

Base URL

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
Data Format

This API uses the JSON format for all request and response bodies.

Standard Response Structure

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.

Required Authentication Parameter
Parameter Name Type Description
token String Your secret access token.
Sample URL Structure
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.

Check Server Status (Ping)

Checks if the API server is up and running. No authentication required.

GET /ping

Success Response - 200 OK

Returns a plain text string.

pong
Check Token Balance

Check the current account balance for your token.

GET /api/v1/balance

Query Parameters
Name Required Description
token Yes Your access token.
Success Response - 200 OK
{
  "code": 200,
  "message": "Success!",
  "data": [
    {
      "balance": 12345.67
    }
  ]
}
Get a List of Packages

Retrieves a paginated list of all active and supported packages.

GET /api/v1/packages

Query Parameters
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.
Success Response - 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
  }
}
Create Transaction

Creates a new transaction order for top-up or data packages.

POST /api/v1/create_transaction

Query Parameters
Name Required Description
token Yes Your access token.
Request Body (JSON)
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.
Success Response - 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
    }
  ]
}
Check Transaction Status

Checks the status of a specific transaction.

POST /api/v1/check_transaction

Query Parameters
Name Required Description
token Yes Your access token.
Request Body (JSON)
Name Type Required Description
transaction_id String Yes The Transaction ID from the /create_transaction response.
Success 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 Codes Explained
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.
Get Transaction History

Retrieves a paginated transaction history associated with your API token.

GET /api/v1/history

Query Parameters
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).
Success Response - 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.

  • User Responsibility: The user is solely responsible for their use of the API. We disclaim all liability for any use of the API for illegal purposes, fraud, or activities that violate applicable laws.
  • Intended Use: This API is not designed to exploit security vulnerabilities or abuse any promotional programs from service providers. Any such abuse will be considered a violation of terms and may result in the immediate termination of API access without prior notice.

By using this API, you agree to these terms.

Processing...

Processing...