UNIX Gaming Reseller API

Sell Mobile Legends diamonds on your own website. Your site sends the order to UNIX Gaming, we deliver the diamonds to the player automatically, and you see the result in seconds.

Getting started

  1. Get an account and API key from UNIX Gaming: apply to become a reseller. Your key starts with uxr_.
  2. Add balance in Smile Coins. Pay UNIX Gaming and we add Smile Coins to your reseller balance. Every price and balance in this API is in Smile Coins, and each order is paid from this balance.
  3. Connect your website with the requests below. Base URL: https://unixtopup.com

Flow for each customer order: your customer pays you on your site → your server calls POST /api/v1/orders → we charge your balance and send the diamonds → you check GET /api/v1/orders/{order_id} (or receive a notification) until the status is success.

API key

Send your key with every request:

Authorization: Bearer uxr_your_key_here

Every response has the same shape:

{ "success": true,  "message": "OK", "data": { ... } }
{ "success": false, "message": "Not enough balance: ...", "error": { "code": "insufficient_balance" } }

GET/api/v1/products

All packages you can sell and their price in Smile Coins, the same for every reseller. Use product_id when you order. Prices can change, so read them again regularly (for example every hour).

{ "success": true, "message": "OK", "data": { "products": [
  { "product_id": "mobilelegends-2", "game": "MLBB Diamonds (Nepal Region)", "name": "86 Diamonds",
    "category": "Diamonds", "price": 71.3, "currency": "SMILE_COIN", "available": true, "requires": ["player_id", "server_id"] }
] } }

One product: GET /api/v1/products/{product_id}

GET/api/v1/players/check?player_id=…&server_id=…

Optional. Shows the player's in-game name so your customer can confirm the account before paying. Free.

{ "success": true, "message": "Player found", "data": { "player_id": "123456789", "server_id": "1234", "player_name": "Luffy" } }

POST/api/v1/orders

FieldRequiredWhat it is
product_idyesFrom /api/v1/products
player_idyesMLBB User ID, 5–12 digits
server_idyesMLBB Server (Zone) ID, 2–6 digits
client_referenceyesYour own order ID, unique per order (1–64 characters: letters, digits, . _ : -)
POST /api/v1/orders
Content-Type: application/json

{ "product_id": "mobilelegends-2", "player_id": "123456789", "server_id": "1234", "client_reference": "SHOP-10045" }

Reply 201:

{ "success": true, "message": "Order created. The top-up is being sent.", "data": {
  "order_id": "UG-7KQ2MZ4P", "client_reference": "SHOP-10045", "status": "processing",
  "product_id": "mobilelegends-2", "product_name": "86 Diamonds", "game": "MLBB Diamonds (Nepal Region)",
  "player_id": "123456789", "server_id": "1234", "player_name": "Luffy",
  "price": 71.3, "currency": "SMILE_COIN", "created_at": "2026-11-23T10:15:02Z", "completed_at": null, "refunded_at": null } }

GET/api/v1/orders/{order_id}

Also: GET /api/v1/orders?client_reference=SHOP-10045, and the list GET /api/v1/orders?limit=50&status=success&before=UG-… (newest first; pass next_before from the reply to get the next page).

statusMeaningWhat to do
processingBeing sent to the game. Usually takes a few seconds.Check again in 5–10 seconds.
successDiamonds delivered.Mark your customer's order complete.
refundedDelivery failed and nothing was sent. The coins are back in your balance.Refund or retry your customer with a new client_reference.
pending_verificationThe game provider didn't confirm in time. Your money is held while UNIX Gaming checks it by hand.Wait. It becomes success or refunded. Don't create a new order for the same customer, or they could get diamonds twice.
failedFailed; a refund is on its way (becomes refunded within seconds).Wait for refunded.
cancelledCancelled by UNIX Gaming.Contact us.

GET/api/v1/balance

{ "success": true, "message": "OK", "data": { "balance": 1528.7, "currency": "SMILE_COIN", "account_status": "active", "ordering_open": true } }

ordering_open: false means UNIX Gaming has paused orders for a while; new orders are refused with ordering_paused and nothing is charged.

Notifications (optional)

Give UNIX Gaming an https URL on your server. When an order changes to success, refunded, failed, pending_verification or cancelled, we send a POST:

X-Unix-Event-Id: evt_5f1c...
X-Unix-Signature: t=1763892902,v1=9a3c...

{ "event_id": "evt_5f1c...", "type": "order.success", "created_at": "2026-11-23T10:15:06Z", "data": { ...same as the order status reply... } }

Errors

HTTPerror.codeMeaning
401missing_api_key, invalid_api_keyNo key, a wrong key, or a revoked key
403account_suspended, ip_not_allowedAccount blocked, or the request came from an IP that isn't allowed
402insufficient_balanceNot enough Smile Coins (error.balance, error.required). Nothing charged.
404product_not_found, order_not_foundUnknown product or order
422invalid_playerThe player ID or server doesn't exist. Nothing charged.
422invalid_player_format, invalid_client_reference, product_unavailableFix the request. Nothing charged.
429rate_limitedToo many requests. Wait a minute.
503ordering_paused, service_unavailableTemporarily unavailable. Nothing charged. Try again later.

Code examples

cURL

curl -X POST https://unixtopup.com/api/v1/orders \
  -H "Authorization: Bearer $UNIX_API_KEY" -H "Content-Type: application/json" \
  -d '{"product_id":"mobilelegends-2","player_id":"123456789","server_id":"1234","client_reference":"SHOP-10045"}'

curl https://unixtopup.com/api/v1/orders/UG-7KQ2MZ4P -H "Authorization: Bearer $UNIX_API_KEY"

PHP

<?php
function unix_api($method, $path, $body = null) {
    $ch = curl_init("https://unixtopup.com" . $path);
    curl_setopt_array($ch, [
        CURLOPT_CUSTOMREQUEST  => $method,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT        => 30,
        CURLOPT_HTTPHEADER     => ["Authorization: Bearer " . getenv("UNIX_API_KEY"), "Content-Type: application/json"],
        CURLOPT_POSTFIELDS     => $body ? json_encode($body) : null,
    ]);
    $res = json_decode(curl_exec($ch), true);
    curl_close($ch);
    return $res;
}

$r = unix_api("POST", "/api/v1/orders", [
    "product_id" => "mobilelegends-2", "player_id" => "123456789", "server_id" => "1234",
    "client_reference" => "SHOP-" . $myOrderId,   // your own order ID: safe to retry
]);
if ($r["success"]) { saveUnixOrderId($myOrderId, $r["data"]["order_id"]); }
else { echo $r["error"]["code"] . ": " . $r["message"]; }

// Notification receiver: verify the signature
$raw = file_get_contents("php://input");
preg_match('/t=(\d+),v1=([a-f0-9]+)/', $_SERVER["HTTP_X_UNIX_SIGNATURE"] ?? "", $m);
$ok = $m && abs(time() - (int)$m[1]) < 300
      && hash_equals(hash_hmac("sha256", $m[1] . "." . $raw, getenv("UNIX_WEBHOOK_SECRET")), $m[2]);
if (!$ok) { http_response_code(401); exit; }
$event = json_decode($raw, true);   // $event["data"]["status"], $event["data"]["client_reference"]
http_response_code(200);

Node.js

const BASE = "https://unixtopup.com";
async function unixApi(method, path, body) {
  const res = await fetch(BASE + path, {
    method,
    headers: { Authorization: `Bearer ${process.env.UNIX_API_KEY}`, "Content-Type": "application/json" },
    body: body ? JSON.stringify(body) : undefined,
  });
  return res.json();
}

const r = await unixApi("POST", "/api/v1/orders", {
  product_id: "mobilelegends-2", player_id: "123456789", server_id: "1234", client_reference: `SHOP-${myOrderId}`,
});
if (!r.success) throw new Error(`${r.error.code}: ${r.message}`);

// Notification receiver (Express, raw body):
import crypto from "node:crypto";
app.post("/unix-webhook", express.raw({ type: "application/json" }), (req, res) => {
  const [, t, v1] = /t=(\d+),v1=([a-f0-9]+)/.exec(req.get("X-Unix-Signature") || "") || [];
  const expected = crypto.createHmac("sha256", process.env.UNIX_WEBHOOK_SECRET).update(`${t}.${req.body}`).digest("hex");
  if (!t || Math.abs(Date.now() / 1000 - t) > 300 || !v1 || !crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))) return res.sendStatus(401);
  const event = JSON.parse(req.body);   // event.data.status, event.data.client_reference
  res.sendStatus(200);
});

Python

import os, requests
BASE = "https://unixtopup.com"
H = {"Authorization": f"Bearer {os.environ['UNIX_API_KEY']}"}

r = requests.post(f"{BASE}/api/v1/orders", headers=H, timeout=30, json={
    "product_id": "mobilelegends-2", "player_id": "123456789", "server_id": "1234", "client_reference": f"SHOP-{my_order_id}",
}).json()
print(r["data"]["status"] if r["success"] else r["error"]["code"])

Questions? Contact UNIX Gaming on WhatsApp.