Lewati ke konten utama

Query Order

Look up the current status of an existing order.

Endpoint​

POST /api/order/query

Authentication​

SHA-512 signature using clientId|orderId|clientSecret (no totalAmount).

Signature Formula​

signature = SHA512( clientId + "|" + orderId + "|" + clientSecret )
PHP
$signature = hash('sha512', "$clientId|$orderId|$clientSecret");
Node.js
const sig = crypto.createHash('sha512')
.update(`${clientId}|${orderId}|${clientSecret}`)
.digest('hex');

Request Body​

FieldTypeRequiredDescription
clientIdstringYesYour legacy_client_id
orderIdstringYesThe merchant order ID used during creation
signaturestringYesSHA-512 signature (clientId|orderId|clientSecret)

Example​

cURL
SIG=$(echo -n "TEST_CLIENT_001|INV-2026-00123|TEST_SECRET_001" | sha512sum | awk '{print $1}')

curl -X POST https://api.flypay.asia/api/order/query \
-H "Content-Type: application/json" \
-d "{
\"clientId\": \"TEST_CLIENT_001\",
\"orderId\": \"INV-2026-00123\",
\"signature\": \"$SIG\"
}"

Response​

HTTP 200 OK

{
"code": 200,
"message": "Success",
"data": {
"refCode": "ORD-260601103045-A1B2",
"transactionTime": "2026-06-01 10:30:45",
"orderId": "INV-2026-00123",
"totalAmount": 50000,
"customerName": "Budi Santoso",
"customerEmail": null,
"customerPhone": null,
"notifyUrl": "https://your-site.com/callbacks/payment",
"returnUrl": null,
"status": "PAID",
"paidAt": "2026-06-01 10:38:12",
"qrString": null
}
}

Status Values​

StatusDescription
PENDINGAwaiting payment
PAIDPayment confirmed
FAILEDExpired, failed, or cancelled

Error Responses​

MessageDescription
Order ID not foundNo order with this orderId for your merchant
Invalid SignatureSignature mismatch
Invalid Client IDclientId not found