提交訂單
在接入鏈路中的位置
提交法幣金額和網路,返回本筆 cryptoAmount 與 payUrl。付款金額以本次 data.cryptoAmount 為準。POST
/api/public/order/apply請求類型:application/json
請求參數
| 字段名稱 | 類型 | 必填 | 簽名 | 示例 | 說明 |
|---|---|---|---|---|---|
appId | string(12-16) | 是 | 是 | k-mch8x2k1p4q9 | APP ID |
merchantOrderNo | string(5-32) | 是 | 是 | ORD-20260822-0001 | 商戶訂單號,商戶側保證唯一 |
network | string | 是 | 是 | TRC | 網路,見 參數查詢 |
asset | string | 是 | 是 | USDT | 收款資產,目前TRC 只支援 USDT,見 參數查詢 |
amount | string | 是 | 是 | 10.99 | 法幣金額 |
currency | string(3) | 是 | 是 | USD | 法幣 ISO 代碼,取值見 參數查詢 |
notifyUrl | string | 是 | 是 | https://merchant.example.com/ucashier/notify | 非同步通知地址,須可公網訪問 |
attach | string | 否 | 否 | — | 自定義資料,Webhook時原樣返回 |
redirectUrl | string | 否 | 否 | https://merchant.example.com/orders/thank-you | 支付成功後的前端跳轉地址 |
signature | string(32) | 是 | 否 | 07BA8514788F143D2437E0D6F4C028D0 | 資料簽名,見簽名算法 |
返回值 data 參數
| 字段名稱 | 類型 | 說明 |
|---|---|---|
appId | string | APP ID |
orderNo | string | 平台訂單號 |
merchantOrderNo | string | 商戶訂單號 |
exchangeRate | string | 介面返回的匯率資訊 |
asset | string | 本單資產,見 參數查詢 |
cryptoAmount | string | 本筆最終應付金額,幣種見 asset,付款以此字段為準 |
status | string | 訂單狀態,見 參數查詢 |
payUrl | string | 收銀台地址 |
請求示例
{
"appId": "k-mch8x2k1p4q9",
"merchantOrderNo": "ORD-20260822-0001",
"network": "TRC",
"asset": "USDT",
"amount": "10.99",
"currency": "USD",
"notifyUrl": "https://merchant.example.com/ucashier/notify",
"redirectUrl": "https://merchant.example.com/orders/thank-you",
"attach": "custom",
"signature": "07BA8514788F143D2437E0D6F4C028D0"
}響應示例
{
"code": "100000",
"message": "Success",
"data": {
"appId": "k-mch8x2k1p4q9",
"orderNo": "U260830162530123456",
"merchantOrderNo": "ORD-20260822-0001",
"exchangeRate": "1.0000",
"asset": "USDT",
"cryptoAmount": "10.99",
"status": "pending",
"payUrl": "https://pay.ucashier.ink/#/payment/order?..."
},
"requestId": "..."
}