Order Status

Check the current status of a single order by reference ID.

Query the current status of a specific order using your ref_id. Use this as a fallback when your webhook callback was missed or if you did not configure one.

Replaces POST /check-status

This GET endpoint replaces the deprecated POST /api/v1/check-status. No request body needed, just pass ref_id as a query parameter.

Endpoint

GET/api/v1/order-status?ref_id=R-12345

Request Headers

Headers

ParameterTypeRequiredDescription
X-Api-KeyStringYesYour API Key.
X-TimestampStringYesCurrent Unix timestamp in ms.
X-SignatureStringYesHMAC-SHA256 signature. For GET requests, sign the timestamp only: HMAC(timestamp, apiSecret).

Query Parameters

Query Params

ParameterTypeRequiredDescription
ref_idStringYesYour unique transaction reference ID (max 100 characters).

Response (Success)

200OK
json
{
"success": true,
"data": {
  "order_id": "AG2026100648291057",
  "ref_id": "R-12345",
  "product_code": "ALGAN-MLBB-86",
  "product_name": "Mobile Legends 86 Diamonds",
  "target_id": "12345678",
  "zone_id": "1234",
  "price": 25000,
  "status": "success",
  "serial_number": "ALG-A1B2C3D4EF",
  "created_at": "2026-05-14T10:30:00.000Z",
  "completed_at": "2026-05-14T10:30:05.123Z",
  "failure_code": null,
  "failure_reason": null,
  "refunded_amount": null,
  "quantity": 1,
  "units": [],
  "deliver_at": null
}
}

Response (Failed Order)

A failed order now tells you why. status and message are unchanged; failure_code and failure_reason were added beside them.

200OK
json
{
"success": true,
"data": {
  "order_id": "b4c5d6e7-...",
  "ref_id": "R-12346",
  "product_code": "ALGAN-MLBB-86",
  "product_name": "Mobile Legends 86 Diamonds",
  "target_id": "12345678",
  "zone_id": "1234",
  "price": 25000,
  "status": "failed",
  "serial_number": null,
  "created_at": "2026-05-14T10:30:00.000Z",
  "completed_at": "2026-05-14T10:30:04.881Z",
  "failure_code": "PRODUCT_UNAVAILABLE",
  "failure_reason": "The order was rejected: product not found",
  "refunded_amount": 25000,
  "quantity": 1,
  "units": [],
  "deliver_at": null
}
}

Failure Codes

failure_code values

ParameterRequiredDescription
NO_SUPPLIER_AVAILABLENoWe could not source this product at the time of the order. Usually temporary, retry later.
PRODUCT_UNAVAILABLENoThe product is delisted or out of stock upstream. Stop offering it until GET /products reports it active again.
SUPPLIER_MAINTENANCENoThe game or publisher is in maintenance. Retry later.
SUPPLIER_UNREACHABLENoA network or upstream transport failure (timeout, 5xx, rate limit). Retry later.
SUPPLIER_REJECTEDNoRejected for a reason we have not classified. failure_reason carries the upstream wording.
INVALID_IDNoThe ID checker explicitly confirmed this account does not exist. Re-check the User ID and Zone ID with POST /validation before retrying.
REGION_LOCKNoThe account's verified region cannot receive this product. Re-check the account region with POST /validation before retrying with a different product.
PURCHASE_LIMITNoThe account already used its purchase allowance for this limit-gated product (a first top-up tier or a weekly/monthly pass). Not retryable for the same account.
WDP_LIMIT_LIKELYNoA Weekly Diamond Pass order failed for a valid account in a matching region. The most probable cause is the in-game WDP stack limit (max 10 active), which no upstream exposes; the player can confirm the remaining limit in the in-game Diamond shop. LIKELY is deliberate: this is a classified inference, not an upstream confirmation.

Treat failure_code as an open set

New codes are added whenever we can name a failure more precisely. Switch on the codes you handle and fall back to displaying failure_reason for anything you do not recognise; do not reject unknown codes.

Both fields can be null on a failed order

Some upstream failures reach us as a bare “failed” with no explanation. We report failure_code: null rather than inventing a reason. Orders that failed before this field shipped are also null.

Response (Not Found)

404Not Found
json
{
"success": false,
"error": "PRODUCT_NOT_FOUND",
"message": "Order not found",
"request_id": "a1b2c3d4-e5f6-..."
}

Serial Number Format

The serial_number is always branded with an ALG- prefix. What follows depends on the product type:

serial_number by Type

ParameterTypeRequiredDescription
instant / directALG-XXXXXXXXXXNoA branded reference token only (e.g. ALG-A1B2C3D4EF). There is no code to redeem; the top-up has already been delivered to the target account. Use it as your proof-of-fulfillment reference.
voucherALG-XXXXXXXXXX/CODENoThe real redeemable voucher code is appended after the slash, e.g. ALG-A1B2C3D4EF/STEAMPH-9XQ2-K7MP-44TZ. Give the customer everything after the "/" to redeem.

Parsing voucher codes

For type: "voucher" products, split serial_number on the first /. The left side is our branded reference; everything to the right is the code your customer redeems. Keep it whole: a two-part credential (a PIN and a password) contains its own /. For instant/direct products there is no /; the whole value is just a reference token.

200Voucher Example
json
{
"success": true,
"data": {
  "order_id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "ref_id": "R-99001",
  "product_code": "ALGAN-STEAM-PHP-500",
  "product_name": "Steam Voucher PHP 500",
  "target_id": "[email protected]",
  "zone_id": null,
  "price": 135000,
  "status": "success",
  "serial_number": "ALG-A1B2C3D4EF/STEAMPH-9XQ2-K7MP-44TZ",
  "created_at": "2026-05-14T10:30:00.000Z",
  "completed_at": "2026-05-14T10:30:05.123Z",
  "failure_code": null,
  "failure_reason": null,
  "refunded_amount": null,
  "quantity": 1,
  "units": [],
  "deliver_at": null
}
}

Combo Orders: quantity and units

Some products are combos: one product code that delivers several items (for example a diamonds bundle made of three top-ups). A combo is ordered, priced and charged exactly like any other product, as one order with one ref_id and one price. Each item is delivered on its own, and units shows each item’s progress.

  • quantity is the number of items in the order: 1 for every ordinary product, and the item count for a combo.
  • units lists the items in delivery order. It is [] for every ordinary product.
  • No new status values. The order keeps the statuses below. A combo goes success when at least one item was delivered, and failed (fully refunded) only when every item failed.
  • Partial delivery reads as status: "success" with refunded_amount greater than 0 and at least one unit failed. failure_code stays null on a success. The refund for each failed item is its share of the price you paid, weighted by your tier price for that item, in whole rupiah, and is credited to your balance automatically.
200OK (combo, partly delivered)
json
{
"success": true,
"data": {
  "order_id": "0b6e2f40-6c1d-4e8a-9a51-2f7d3c9e1a22",
  "ref_id": "R-20001",
  "product_code": "ALGAN-MLBB-COMBO-849",
  "product_name": "Mobile Legends 849 Diamonds (combo)",
  "target_id": "12345678",
  "zone_id": "1234",
  "price": 210000,
  "status": "success",
  "serial_number": "ALG-K2M4P6R8T1, ALG-Q3W5E7R9T2",
  "created_at": "2026-10-04T08:00:00.000Z",
  "completed_at": "2026-10-04T08:00:41.512Z",
  "failure_code": null,
  "failure_reason": null,
  "refunded_amount": 14000,
  "quantity": 3,
  "units": [
    { "unit_no": 1, "product_code": "ALGAN-MLBB-570", "product_name": "Mobile Legends 570 Diamonds", "status": "success", "serial_number": "ALG-K2M4P6R8T1", "refund_amount": null },
    { "unit_no": 2, "product_code": "ALGAN-MLBB-223", "product_name": "Mobile Legends 223 Diamonds", "status": "success", "serial_number": "ALG-Q3W5E7R9T2", "refund_amount": null },
    { "unit_no": 3, "product_code": "ALGAN-MLBB-56", "product_name": "Mobile Legends 56 Diamonds", "status": "failed", "serial_number": null, "refund_amount": 14000 }
  ],
  "deliver_at": null
}
}

Unit fields

ParameterRequiredDescription
unit_noNoPosition of the item in the order, starting at 1.
product_code / product_nameNoThe item being delivered.
statusNopending (not sent yet), processing, success or failed.
serial_numberNoThe branded serial for this item, only when its status is "success"; null otherwise.
refund_amountNoThe amount refunded for this item: set only when the item failed AND the whole order has finished with the refund credited. Null otherwise, including while other items are still in progress.

Important Notes

Field Behavior

ParameterRequiredDescription
order_idNoThe order id, always a string. Orders placed from the 2026-10 switch-on get a short order number: AG + order date (YYYYMMDD, Asia/Jakarta) + 8 digits, e.g. AG2026100648291057. Orders placed before keep their UUID forever. Treat it as opaque text of up to 36 characters; never validate it as a UUID.
serial_numberNoOnly returned when status is "success". Null for all other statuses. Format depends on product type; see Serial Number Format above.
completed_atNoOnly set for terminal statuses (success, failed, refunded). Null while processing. It is now stamped once, at the moment the order reached its final state, and never moves afterwards; callback delivery and retries no longer shift it. Orders completed before this change carry an approximate value.
zone_idNoNull if the game does not require a Zone ID.
failure_codeNoNEW: stable failure category, or null. See Failure Codes above.
failure_reasonNoNEW: a human-readable sentence you can show your customer, or null. Never names our upstream provider.
refunded_amountNoMoney returned to your balance for this order: the whole price on a full refund, the failed items' share on a partly delivered combo or bundle. Null when nothing was refunded.
quantityNoNEW: number of items in the order. Always 1 for an ordinary product; the item count for a combo.
unitsNoNEW: per-item progress of a combo, in delivery order. Always [] for an ordinary product. See Combo Orders above.
deliver_atNoNEW: for a pre-order you placed from your reseller dashboard, the promised delivery time (ISO 8601). The order reads status "processing" until it is delivered on that date. Null for every other order. The API itself never lists or accepts pre-order products. Also returned by GET /api/v1/orders.

Status Enum

The status field can return one of the following values:

processingThe order is currently being asynchronously processed by us.
successThe order was successfully completed. serial_number is available.
failedThe order failed (e.g., incorrect target ID). Balance has been automatically refunded.
refundedThe order was cancelled and the balance has been refunded manually by an admin.

Example cURL

API_KEY="algan_live_..."
API_SECRET="sk_live_..."
TIMESTAMP=$(python3 -c "import time; print(int(time.time() * 1000))")
SIGNATURE=$(echo -n "${TIMESTAMP}" | \
  openssl dgst -sha256 -hmac "${API_SECRET}" | awk '{print $2}')

curl -s "https://algan.id/api/v1/order-status?ref_id=R-12345" \
  -H "X-Api-Key: ${API_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Signature: ${SIGNATURE}"

Example (Node.js)

const crypto = require('crypto');

const API_KEY = 'algan_live_...';
const API_SECRET = 'sk_live_...';
const timestamp = Date.now().toString();
const refId = 'R-12345';

// GET request → sign timestamp only
const signature = crypto
  .createHmac('sha256', API_SECRET)
  .update(timestamp)
  .digest('hex');

const response = await fetch(
  `https://algan.id/api/v1/order-status?ref_id=${refId}`,
  {
    headers: {
      'X-Api-Key': API_KEY,
      'X-Timestamp': timestamp,
      'X-Signature': signature,
    },
  }
);

const result = await response.json();
console.log(result.data.status); // "success" | "processing" | ...
PreviousCreate OrderNextOrder History