Orders
Orders created by recharges, deductions, online payments and package purchases; tenants see only their own, admins can see all tenants, and only the remark can be edited.
ordersBillingAuthentication: User (some parameters admin only)4 endpointsList orders
GET
/api/v2/ordersAuthentication: User (some parameters admin only)
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | — | Page number, starting from 1 |
| page_size | integer | — | Items per page |
| sort | string | — | Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id` |
| tenant_id | integer | — | Admin only: filter by tenant. Ignored for tenant credentials, which only see their own tenant's data |
| type | string | — | Filter by order type (recharge/deduct/payment/package, etc.). |
| status | string | — | Filter by status. |
| start | string | — | Order time from (inclusive), RFC 3339. |
| end | string | — | Order time until (exclusive), RFC 3339. |
Order amount statistics
GET
/api/v2/orders/statsAuthentication: User (some parameters admin only)
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| tenant_id | integer | — | Admin only: filter by tenant. Ignored for tenant credentials, which only see their own tenant's data |
| type | string | — | Filter by order type (recharge/deduct/payment/package, etc.). |
| status | string | — | Filter by status. |
| start | string | — | Order time from (inclusive), RFC 3339. |
| end | string | — | Order time until (exclusive), RFC 3339. |
| group_by | string | — | Aggregation granularity, default day. |
| utc_offset_minutes | integer | — | Deprecated and kept only for compatibility with old callers (the range is still validated). Days, months and years are always split in the platform time zone (Asia/Shanghai), the same day boundary as today's traffic; this parameter no longer shifts them. |
Get order
GET
/api/v2/orders/{id}Authentication: User (some parameters admin only)
Update order remark
PUT
/api/v2/orders/{id}Authentication: Admin only
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| des | string | Required | Description |
Orders object
| Field | Type | Required | Description |
|---|---|---|---|
| amount_cents | integer | — | Amount in cents; negative for deductions. |
| archived | boolean | — | Moved into the archive table by the archiving task (read-only). |
| created_at | string | — | Created at |
| data | object | — | Extra data (such as package purchase details). |
| des | string | — | Description |
| group_by | string | — | Aggregation granularity: day, month or year. |
| id | integer | — | Record ID |
| items | OrderStatsItem[] | — | Items on this page |
| ledger_id | integer | — | ID of the linked ledger entry; null if none. |
| mch_order_no | string | — | Merchant order number (the gateway-side order number); null for non-online payments. |
| paid_at | string | — | Payment time; null if unpaid. |
| pay_type | string | — | admin/balance/alipay/wxpay, etc.; empty = unpaid. |
| status | string | — | Order status: unpaid or paid. |
| tenant_id | integer | — | Owner tenant (user) ID |
| transaction_id | string | — | Gateway-side transaction ID; empty if unpaid. |
| type | string | — | recharge (admin recharge) / deduct (admin deduction) / payment (online payment) / package (package purchase), etc. |
| updated_at | string | — | Updated at |