订单状态
返回一个订单或最多 100 个订单的当前状态。Webhook 可减少轮询,但投递为带重试的尽力而为模式,因此请使用此 status action 核对重要状态。
POST
https://notpanel.com/api/v3action=status需要 API key受速率限制(共享账户 + IP + action)请求体:
application/x-www-form-urlencoded参数
| 名称 | 类型 | 描述 |
|---|---|---|
| key必需 | string | 你的 API key。 |
| action必需 | string | 必须是字面字符串 “status”。 |
| order | string | 单个订单的数字 ID。如果同时发送 order 和 orders,则以 orders 为准。 |
| orders | string (CSV) | 最多 100 个以逗号分隔的数字订单 ID。如果同时发送 order 和 orders,则以 orders 为准。 |
请求示例
将 YOUR_API_KEY 替换为在你仪表盘 API 页面下生成的 key。
curl -X POST https://notpanel.com/api/v3 \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=YOUR_API_KEY&action=status&order=7001"const res = await fetch("https://notpanel.com/api/v3", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
key: "YOUR_API_KEY",
action: "status",
order: "7001",
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://notpanel.com/api/v3",
data={
"key": "YOUR_API_KEY",
"action": "status",
"order": "7001",
},
)
print(res.json())<?php
$body = http_build_query([
'key' => 'YOUR_API_KEY',
'action' => 'status',
'order' => '7001',
]);
$response = file_get_contents('https://notpanel.com/api/v3', false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
'content' => $body,
'ignore_errors' => true,
],
]));
print_r(json_decode($response, true));
响应示例
{
"status": "In progress",
"status_key": "in_progress",
"charge": "0.50",
"refund": "0.00",
"refund_pending": 0,
"refund_pending_amount": "0.00",
"start_count": "1234",
"remains": "650",
"currency": "USD",
"cancel_available": false,
"cancel_before": "2026-08-25T10:30:15.000Z",
"refund_guaranteed_at": "2026-09-01T10:30:00.000Z",
"refund_policy": "full_if_unresolved_after_7_days"
}常见错误
| 状态 | 响应体 | 原因 |
|---|---|---|
| 400 | {"error":"Missing parameter: order"} | 未提供 order 或 orders。 |
| 400 | {"error":"Order not found"} | 该单个订单 ID 不存在或不属于你的账户。 |
| 400 | {"error":"Maximum 100 orders per request"} | orders CSV 中包含超过 100 个 ID。请拆分为多个批次。 |