Query
Query current order status and payment results. The essential tool for reconciliation and exception handling.
API Information
- Endpoint: POST
https://api.aimt-horizon.com/upay/v2/query - Signature: Uses terminal_sn + terminal_key
Request Parameters
Response Key Fields
When to call Query
- 1. Post-push confirmation: After pushing an order, query to confirm payment result.
- 2. Unknown payment status: Network timeout or exception — query to determine the true state.
- 3. Post-refund confirmation: Verify refund result after calling the refund API.
- 4. Prevent single-sided transactions: Provide a manual query button for operators.
Query by Merchant Order ID
Prefer sn instead of client_sn once available. Use a valid caller under the original merchant. Wrong ownership, no payment order yet or permission errors can all cause a missing result; none authorizes another collection.
Example: Query Succeeded and Payment Succeeded
A successful query may also return pending or failed transaction states. Follow the four-layer rules. Add the original refund_request_no to query a specific refund and expect type=REFUND, not PAYMENT.
