Payment Order Management
The payment system has two layers: business orders carry the payment requests initiated by merchants (in two forms: normal orders and gateway orders), while payment trades carry the actual movement of funds (fund operations such as refunds and allocation are initiated at this layer). Understanding this layering is the foundation for querying and handling orders.
The Three-Layer Order Model
| Layer | Page | What it holds | Typical operations |
|---|---|---|---|
| Business order | Normal Orders | Payment orders initiated by merchants via /unipay/pay (QR, JSAPI, H5, …) | View, close, export |
| Business order | Gateway Orders | Payment orders generated via the unified cashier / aggregate QR (/unipay/gateway/pre-pay) | View, close, export |
| Fund trade | Payment Trades | Records of funds actually exchanged with the channel; one business order may map to multiple trades | View, refund, initiate allocation, sync, close |
Why refunds are initiated here
The Normal Orders and Gateway Orders pages only support view and close. Refund and initiate allocation are in the More menu of the operation column on the Payment Trades page — refunds and allocation act on funds, not on business orders.
Page Entry
| Console | Menu path |
|---|---|
| Admin panel | Trade Orders → Payment Orders → Normal Orders / Gateway Orders; Trade Orders → Payment Trades |
| Merchant panel | Trade Orders → Payment Orders → Normal Orders / Gateway Orders; Trade Orders → Payment Trades |
The admin panel has two extra filters compared with the merchant panel — Merchant and App (cross-merchant view); everything else is the same.
Normal Orders
Query conditions: merchant order number, title, merchant (admin panel), app, business status, payment product, pay capability, creation time, amount range.
List columns: platform order number, merchant order number, title, amount, business status, payment product, pay capability, merchant, creation time.
Operations:
| Operation | Condition | Description |
|---|---|---|
| View | — | Open the detail drawer |
| Close | Pending payment | Manually close an unpaid order (requires order management permission) |
| Export | — | Export the list from the top-right corner |
Detail drawer includes: merchant and order identifiers (platform order number / merchant order number / fund trade number), business status and amount, payment product / capability / channel / method / channel merchant number / channel order number, fund status, store number, payment time group, buyer info, refundable balance, notify and return URLs, error message.
Gateway Orders
Gateway orders are business orders produced via the unified cashier or aggregate QR. Besides the query dimensions of normal orders, they can also be filtered by gateway type (unified cashier / aggregate QR), and their business status includes "paying".
Operations are the same as normal orders (view, close, export), except that the close condition is "pending payment / paying" (a paying gateway order can also be closed); the detail drawer additionally shows fund status, refundable balance, client IP, and more.
See Gateway Payment for how gateway orders are produced and configured.
Payment Trades
A payment trade is a fund-layer record: each successful payment maps to one trade, recording the channel, channel merchant number, credited amount, refundable balance, and allocation status.
Query conditions: fund trade number, channel order number, merchant, app, fund status (initialized / in progress / success / failed / closed / revoked), trade form (normal / gateway), allocation status (none / processing / done / unsupported), channel merchant number, creation time, amount range.
List columns: trade number, trade form, channel order number, amount, credited amount, refundable balance, fund status, allocation status, payment channel, pay provider, channel merchant number, payment time, merchant, creation time.
Operations (in the More dropdown of the operation column, shown dynamically by status):
| Operation | Shown when | Description |
|---|---|---|
| Order details | — | Jump to the corresponding normal / gateway order page by business order number |
| View | — | Detail drawer |
| Refund | Fund status = success and refundable balance > 0 | Initiate a refund; see Refund Management |
| Initiate Allocation | Fund status = success and allocation status = none | Initiate allocation; see Allocation |
| Close | Initialized / in progress | Close an unfinished trade |
| Sync | Non-terminal state | Actively pull the latest status from the channel |
When to use "Sync"
Payment status advances via channel callbacks. If a callback is lost (network issues, unreachable URL), the order stays in an intermediate state — run Sync on that trade and the system will actively query the channel and backfill the status.
Related Sections
- Refund Management, Allocation: fund operations in detail
- Abnormal Orders and Fund Flow: handling abnormal scenarios such as payments arriving after close
- Unified Payment API: the API for business systems to initiate payments