Refresh AceDataCloud Platform Order Status
Proactively query the latest status of the order from the upstream payment platform and synchronize it locally, commonly used for refreshing when payment is completed but the frontend has not received a callback.
Under normal circumstances, the platform will automatically receive callbacks from third-party payments (such as Alipay, Stripe, etc.) via Webhook and update the order status, without the need to actively call this interface. Only when:
- The user closes the third-party payment page without triggering a callback;
- Network fluctuations cause the callback to be lost;
- You want to know immediately whether a
Pendingorder has expired;
is it necessary to actively call this interface.
ℹ️ This interface belongs to the AceDataCloud Platform Management API, with a unified prefix of
https://platform.acedata.cloud/api/v1/.
¶ Interface Overview
| Item | Content |
|---|---|
| Method | POST |
| URL | https://platform.acedata.cloud/api/v1/orders/{order_id}/refresh/ |
| Authentication | ✅ Requires account token |
| Body | None / {} |
¶ Authentication Instructions (How to Obtain Account Token)
Request Header:
Authorization: Bearer platform-v1-92eb****629c
For obtaining the token, see Manage AceDataCloud Platform Account Token.
¶ Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id |
UUID | ✅ | Order ID |
¶ Request Example
¶ cURL
curl -X POST 'https://platform.acedata.cloud/api/v1/orders/fa927d12-3b04-4f51-bf2e-ec3a5a7d9b2c/refresh/' \
-H 'accept: application/json' \
-H 'authorization: Bearer platform-v1-92eb****629c'
¶ Python
import requests
import time
order_id = "fa927d12-3b04-4f51-bf2e-ec3a5a7d9b2c"
# Poll until the order is effective or confirmation fails
for _ in range(30):
resp = requests.post(
f"https://platform.acedata.cloud/api/v1/orders/{order_id}/refresh/",
headers={"authorization": "Bearer platform-v1-92eb****629c"},
timeout=10,
)
order = resp.json()
if order["state"] == "Paid":
print(f"✅ Payment successful, paid_at={order['paid_at']}")
break
if order["state"] in ("Cancelled", "Failed", "Refunded"):
print(f"❌ Final order state: {order['state']}")
break
time.sleep(2)
¶ Node.js
const orderId = 'fa927d12-3b04-4f51-bf2e-ec3a5a7d9b2c'
const r = await fetch(
`https://platform.acedata.cloud/api/v1/orders/${orderId}/refresh/`,
{
method: 'POST',
headers: { authorization: 'Bearer platform-v1-92eb****629c' },
}
)
console.log(await r.json())
¶ Response Example (HTTP 200)
Returns the complete object of the refreshed order, structured the same as Order Details:
{
"id": "fa927d12-3b04-4f51-bf2e-ec3a5a7d9b2c",
"state": "Paid",
"paid_at": "2026-04-26T08:01:23Z",
"...": "..."
}
¶ Error Handling
| HTTP | Code | Meaning |
|---|---|---|
| 401 | not_authenticated |
Missing account token |
| 403 | permission_denied |
The order does not belong to you |
| 404 | not_found |
Order does not exist |
¶ Practical Tips
- Do not poll too frequently: This interface will actually query the payment platform once, and too high a frequency may lead to rate limiting. It is recommended to wait at least 2 seconds between requests, with a total attempt count ≤ 30.
- Prefer Webhook: In production environments, it is strongly recommended to configure Webhook to receive platform events on your own service (configured through the console under "Developer → Event Subscription"), rather than relying on polling.
state=Pendingwill automatically change toCancelledafter 24 hours: Timeout order refresh will show asCancelled.
