Query Pay-in Order Status

Queries pay-in order details by platform order number, returning the current status and key timestamps.

GET/openapi/payin/orders/{orderNo}

Request Headers

FieldTypeRequiredDescription
x-api-keystringYesMerchant API Key. Use the value beginning with mch_ from the merchant API settings page.
x-merchant-uidstringYesMerchant UID.
x-timestampstringYes13-digit millisecond timestamp. The default allowed clock drift is 5 minutes.
x-noncestringYesUnique random string for each request, up to 128 characters. Reuse is rejected.
x-signaturestringYesHex signature generated with HMAC-SHA256. The payload contains Merchant UID, timestamp, nonce, method, path, canonical query, and canonical body.

Request Parameters

FieldTypeRequiredDescription
orderNostringYesPath parameter. The platform order number returned when creating the pay-in order.

Request Example

GET /openapi/payin/orders/PI1776193200123ABCD1234

Response Fields

FieldTypeRequiredDescription
orderNostringYesPlatform order number.
merchantOrderNostring | nullYesMerchant order number.
bindKeystring | nullYesBinding key for member recharge. Usually empty for shared pay-in orders.
chainCodestring | nullYesThe network for this order.
tokenSymbolstring | nullYesThe token for this order.
txHashstring | nullYesMatched transaction hash; null before detection.
amountstring | nullYesOrder amount.
paidAmountstring | nullYesPaid amount.
addressstring | nullYesReceiving address.
cashierUrlstring | nullYesCheckout URL containing a random access token. Signed queries can retrieve secure links for historical orders.
paymentUristring | nullYesWallet payment URI.
expireAtstring | nullYesOrder expiration time.
createdAtstring | nullYesCreated time.
detectedAtstring | nullYesPayment detected time.
confirmedAtstring | nullYesConfirmation time.
completedAtstring | nullYesCompletion time.
statusstringYesOrder status.

Response Example

{
  "orderNo": "PI1776193200123ABCD1234",
  "merchantOrderNo": "M202604150001",
  "bindKey": null,
  "amount": "100.000000",
  "paidAmount": "100.000000",
  "address": "TXYZ3x9nJ5J4xP2gh6mQW7rT31jB8Y2pA9",
  "cashierUrl": "https://open.uugate.com/SK/PI1776193200123ABCD1234#ct=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "paymentUri": "TRON:TXYZ3x9nJ5J4xP2gh6mQW7rT31jB8Y2pA9?token=USDT&amount=100.000000",
  "expireAt": "2026-04-18T06:30:00.000Z",
  "createdAt": "2026-04-18T06:00:00.000Z",
  "detectedAt": "2026-04-18T06:08:15.000Z",
  "confirmedAt": "2026-04-18T06:09:02.000Z",
  "completedAt": "2026-04-18T06:09:02.000Z",
  "status": "completed",
  "chainCode": "TRON",
  "tokenSymbol": "USDT",
  "txHash": "f7f17891f52c35d0c93170f0d12bb347ac16ab34853b4bc8dcf7fd0a8c9aa321"
}

Code Examples

Run: save Java as UUGateExample.java (UUGateCallback.java for callbacks) and use java filename; PHP: php example.php; Go: go run example.go; Node.js: node example.mjs. Callback verifiers read the raw body from standard input.

import { createHmac, randomBytes } from 'node:crypto';

function required(name) {
  const value = process.env[name]?.trim();
  if (!value) throw new Error(name + ' is required');
  return value;
}
const uid = required("UUGATE_MERCHANT_UID"), key = required("UUGATE_API_KEY");
const timestamp = String(Date.now()), nonce = randomBytes(16).toString("hex");
const method = 'GET', path = '/openapi/payin/orders/PI1776193200123ABCD1234';
const canonicalQuery = '', canonicalBody = "";
const payload = [uid, timestamp, nonce, method, path, canonicalQuery, canonicalBody].join('\n');
const signature = createHmac('sha256', key).update(payload, 'utf8').digest('hex');
const base = (process.env.UUGATE_BASE_URL || 'https://api.uugate.com').replace(/\/+$/, '');
const response = await fetch(base + path, {
  method, redirect: 'error', signal: AbortSignal.timeout(30000),
  headers: { 'Content-Type': 'application/json', 'x-api-key': key, 'x-merchant-uid': uid,
    'x-timestamp': timestamp, 'x-nonce': nonce, 'x-signature': signature },
  ...(canonicalBody ? { body: canonicalBody } : {}),
});
const raw = await response.text();
if (!response.ok) throw new Error('HTTP ' + response.status + ': ' + (raw || 'empty response body'));
JSON.parse(raw);
console.log(raw);

Notes

  • For final business success, use status=completed.
  • All four languages use the same endpoint paths, parameters and response contract. Credentials come from UUGATE_MERCHANT_UID and UUGATE_API_KEY; UUGATE_BASE_URL defaults to https://api.uugate.com.
  • canonicalBody is compact JSON with sorted field names. After changing parameters, sort object keys recursively, preserve array order and use UTF-8 without extra slash or Unicode escaping. Amounts are strings; booleans are true / false.
  • Successful responses return the business object directly, without a code / data wrapper. Check HTTP status before processing the body. Business errors return code, message, data and requestId; security denials may only return HTTP 401 / 403 with an empty body.
  • After a timeout or HTTP 5xx, query the order before retrying creation or submission. Generate a new timestamp, nonce and signature for every new request.