Create AceDataCloud Platform Recharge Order
Create a recharge order—renewing for a specific Application (Usage / Subscription) or recharging the global balance pool of the account (Wallet). The order will be in Pending status after creation and requires further invocation of Pay Order to effect the payment.
ℹ️ This interface belongs to the AceDataCloud Platform Management API, with a unified prefix of
https://platform.acedata.cloud/api/v1/. For the complete interface index, see Get AceDataCloud Platform Document List.
¶ Interface Overview
| Item | Content |
|---|---|
| Method | POST |
| URL | https://platform.acedata.cloud/api/v1/orders/ |
| Authentication | ✅ Requires account token |
| Content-Type | application/json |
¶ Authentication Instructions (How to Obtain Account Token)
Request Header:
Authorization: Bearer platform-v1-92eb****629c
Ways to obtain the account token:
- One-click creation in the console (recommended): Log in to AceDataCloud Platform → Account Token Console → Click the "Create" button.
- API Creation: See Manage AceDataCloud Platform Account Tokens.
¶ Request Body
| Field | Type | Required | Description |
|---|---|---|---|
application_id |
UUID | ✅ | The Application ID to be recharged. First call Create Application to create it. |
package_id |
UUID | ✅ | The package ID to be purchased. Can be obtained from the packages field in the service details. |
payment_method |
string | ✅ | Payment method: AliPay / WeChat / Stripe / Paypal / Crypto / X402 |
currency |
string | No | Currency code. Default inferred based on payment_method: AliPay/WeChat → CNY, Stripe → USD, X402 → USDC. |
tags |
array | No | User-defined tags |
metadata |
object | No | User-defined metadata |
¶ Request Example
¶ cURL
curl -X POST 'https://platform.acedata.cloud/api/v1/orders/' \
-H 'accept: application/json' \
-H 'authorization: Bearer platform-v1-92eb****629c' \
-H 'content-type: application/json' \
-d '{
"application_id": "82f57141-2323-4453-8730-60f7d833a2da",
"package_id": "4add61f2-61db-4d1c-85b6-d4876ac122f0",
"payment_method": "AliPay"
}'
¶ Python
import requests
PLATFORM_TOKEN = "platform-v1-92eb****629c"
resp = requests.post(
"https://platform.acedata.cloud/api/v1/orders/",
headers={
"accept": "application/json",
"authorization": f"Bearer {PLATFORM_TOKEN}",
"content-type": "application/json",
},
json={
"application_id": "82f57141-2323-4453-8730-60f7d833a2da",
"package_id": "4add61f2-61db-4d1c-85b6-d4876ac122f0",
"payment_method": "AliPay",
},
timeout=10,
)
order = resp.json()
print(f"Order created: ID={order['id']}, Price ¥{order['final_price']}, state={order['state']}")
¶ Node.js
const r = await fetch('https://platform.acedata.cloud/api/v1/orders/', {
method: 'POST',
headers: {
authorization: 'Bearer platform-v1-92eb****629c',
'content-type': 'application/json',
},
body: JSON.stringify({
application_id: '82f57141-2323-4453-8730-60f7d833a2da',
package_id: '4add61f2-61db-4d1c-85b6-d4876ac122f0',
payment_method: 'AliPay',
}),
})
const order = await r.json()
console.log('Order ID:', order.id, 'Price:', order.final_price)
¶ Response Example (HTTP 201)
{
"id": "fa927d12-3b04-4f51-bf2e-ec3a5a7d9b2c",
"user_id": "89518d07-5560-4b05-92c1-667f3ddf6a4b",
"application_id": "82f57141-2323-4453-8730-60f7d833a2da",
"service_id": "38ecf158-36f2-42f2-8e7f-6786cdfc2452",
"package_id": "4add61f2-61db-4d1c-85b6-d4876ac122f0",
"type": "Usage",
"state": "Pending",
"price": 63.2,
"amount": 530.0,
"currency": "CNY",
"payment_method": "AliPay",
"discount_rate": 1.0,
"discount_amount": 0.0,
"final_price": 63.2,
"metadata": null,
"tags": null,
"paid_at": null,
"expired_at": null,
"refunded_at": null,
"created_at": "2026-04-26T08:00:00Z",
"updated_at": "2026-04-26T08:00:00Z"
}
The order state is Pending, and it is necessary to continue calling Pay Order to obtain the payment link / QR code.
¶ Response Field Description
Field definitions are the same as Order List.
¶ Error Handling
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid |
Missing or invalid application_id / package_id / payment_method |
| 400 | package_mismatch |
package_id does not belong to the service corresponding to application_id |
| 401 | not_authenticated |
Missing account token |
| 403 | permission_denied |
application_id does not belong to you |
| 404 | not_found |
Application or Package does not exist |
¶ Practical Tips
final_priceincludes the discount: If you hold $ACE tokens or meet certain promotional conditions,discount_amountwill be greater than 0, and the final charge will be based onfinal_price.- Creating is just a placeholder, no actual charge will be made: Charges will only be deducted after the payment order is completed, and the balance will be credited.
Pendingorders will be automaticallyCancelledafter 24 hours: You can actively check by refreshing the order status.Crypto/X402payment: This is an on-chain payment based on stablecoins (USDC), which allows direct deduction via wallet signature without the need for third-party platform redirection. See Pay AceDataCloud platform orders for details.- Bulk recharge: This interface can be called in a loop to create orders for multiple Applications simultaneously, paying one by one.
¶ Related Interfaces
- Get AceDataCloud platform service list — See the purchasable packages for each service
- Create AceDataCloud platform service application — Create one if there is no Application
- Get AceDataCloud platform order details
- Pay AceDataCloud platform orders
- Query AceDataCloud platform $ACE token holdings and discounts — See how much discount you can enjoy
