創建動態流量訂單,返回訂單號用於後續支付。
POST /client/order/addDynamics
| 參數名稱 | 必選 | 類型 | 說明 |
| x-merchant-token | 是 | string | 商戶訪問令牌 |
| x-merchant-code | 是 | string | 商戶編碼 |
| Content-Type | 是 | string | application/json |
| 參數名稱 | 必選 | 類型 | 說明 |
| configPlanId | 是 | Long | 動態套餐設定 ID |
const response = await fetch('/client/order/addDynamics', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-merchant-token': 'your-token-here',
'x-merchant-code': 'your-merchant-code'
},
body: JSON.stringify({
configPlanId: 101
})
})
const result = await response.json()
{
"msg": "下單成功",
"code": 200,
"data": "N2026040100012345678"
}
| 參數名稱 | 類型 | 說明 |
| code | Integer | 業務狀態碼 |
| msg | String | 提示資訊 |
| data | String | 新創建的訂單號,用於跳轉支付或查詢訂單 |
- 本介面只創建待支付訂單並返回訂單號,不涉及支付方式;支付時在 訂單支付 中指定方式(例如餘額支付可傳
BALANCE)。
- 訂單數量固定為 1,流量容量以套餐設定為準。
- 後端會校驗套餐是否可用,並按套餐價格計算訂單金額。
- 下單後需要調用支付介面完成支付。