创建转账订单
POST
/api/v1/transfer/command/createHMAC发起钱包间转账。订单异步处理,返回 PENDING 状态。
请求头
| Name | Type | Required | Description |
|---|---|---|---|
X-Api-Key | string | Yes | API 密钥标识符 |
X-Signature | string | Yes | HMAC-SHA256 签名 |
X-Timestamp | string | Yes | Unix 时间戳(秒) |
X-Nonce | string | Yes | 唯一请求标识符(UUID) |
请求体
| Name | Type | Required | Description |
|---|---|---|---|
idempotentKey | string | Yes | 客户端提供的幂等键,每次转账唯一 |
fromWalletId | string | Yes | 来源钱包业务 ID |
toWalletId | string | Yes | 目标钱包业务 ID |
currency | string | Yes | ISO 币种代码 |
amount | number | Yes | 交易金额(主币种单位) |
remark | string | Yes | 转账的备注或附言(可选) |
请求示例
curl -X POST https://api.slaunchx.cc/api/v1/transfer/command/create \
-H "X-Api-Key: sk_live_xxx" \
-H "X-Signature: <computed_signature>" \
-H "X-Timestamp: 1709337600" \
-H "X-Nonce: 550e8400-e29b-41d4-a716-446655440000" \
-H "Content-Type: application/json" \
-d '{
"idempotentKey": "txn_20260302_001",
"fromWalletId": "wlt_sender_001",
"toWalletId": "wlt_receiver_002",
"currency": "USD",
"amount": 100.5,
"remark": "Monthly payment"
}'响应
已创建201
{
"version": "1.3.0",
"success": true,
"code": "2001",
"message": "CREATED",
"data": {
"bizId": "txn_ghi789",
"fromWalletId": "wlt_sender_001",
"toWalletId": "wlt_receiver_002",
"currency": "USD",
"amount": 100.5,
"feeAmount": 0.5,
"totalAmount": 101,
"status": 10060101,
"statusName": "PENDING",
"failureReason": null,
"remark": "Monthly payment",
"createdAt": "2026-03-02T11:20:00Z",
"completedAt": null
}
}