curl --request POST \
--url "https://api.stablepay.co/api/v1/fund/account_transfers" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002"
}'
const response = await fetch("https://api.stablepay.co/api/v1/fund/account_transfers", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002"
})
});
console.log(await response.json());
{
"account_transfer_id": "9000000034",
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002",
"status": "completed",
"created": 1718726401
}
全球账户 API
创建账户间划转
创建账户间划转
POST
/
api
/
v1
/
fund
/
account_transfers
curl --request POST \
--url "https://api.stablepay.co/api/v1/fund/account_transfers" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002"
}'
const response = await fetch("https://api.stablepay.co/api/v1/fund/account_transfers", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002"
})
});
console.log(await response.json());
{
"account_transfer_id": "9000000034",
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002",
"status": "completed",
"created": 1718726401
}
完整认证、签名、数据约定与错误响应。每次重试均须重新生成时间戳、nonce 与签名。
POST /fund/account_transfers 同一商户两个同币种账户之间划转,同步执行。
请求头
string
必填
Bearer API Key。
string
必填
Unix 秒,允许与服务端相差最多 5 分钟。
string
必填
每次请求唯一的随机串,16–64 字符。
string
必填
HMAC-SHA256 签名,小写十六进制;签名必须对应实际发送的请求体。
string
幂等键
请求参数
string
10 位数字;商户 App 不传,服务商 App 必传
string
业务参考号
string
必填
币种,两个账户同币种
integer
必填
划转金额
string
必填
转出账户编号
string
必填
转入账户编号
object
自定义元数据
响应
string
必填
划转 ID,10 位数字
string
必填
商户 ID
string
业务参考号
string
必填
币种
integer
必填
划转金额
string
必填
转出账户
string
必填
转入账户
string
必填
completed
integer
必填
创建时间
状态与错误
400 参数不合法;409 余额不足或幂等冲突。curl --request POST \
--url "https://api.stablepay.co/api/v1/fund/account_transfers" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002"
}'
const response = await fetch("https://api.stablepay.co/api/v1/fund/account_transfers", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002"
})
});
console.log(await response.json());
{
"account_transfer_id": "9000000034",
"merchant_id": "2000000001",
"currency": "USDC",
"amount": 500000,
"source_account_no": "00000001",
"target_account_no": "00000002",
"status": "completed",
"created": 1718726401
}
最后修改于 2026年10月29日
此页面对您有帮助吗?
