curl --request POST \
--url https://openplatform.gateapi.io/v1/pay/fixedaddress/save \
--header 'Content-Type: application/json' \
--header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
--header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
--header 'X-GatePay-Signature: <x-gatepay-signature>' \
--header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
--data '
{
"channelId": "smart_shop",
"chain": "ETH",
"currencies": "DAI,USDT",
"callbackUrl": "https://www.abc.com/callback"
}
'{
"status": "SUCCESS",
"code": "000000",
"errorMessage": "",
"data": {
"channelId": "smart_shop",
"chain": "ETH",
"address": "0x2EBa11a702F1d53c6e2F08278819e26E6e4a63ae",
"currencies": [
"DAI",
"USDT"
],
"callbackUrl": "https://www.abc.com/callback",
"desc": "",
"ChainShowEn": "ETH /ERC20"
}
}按照指定币种和网络,生成静态收款地址
注意: 若 channelId + chain 已经存在静态收款地址,则会将请求中的 currencies 和 callbackUrl 更新到已绑定信息中
curl --request POST \
--url https://openplatform.gateapi.io/v1/pay/fixedaddress/save \
--header 'Content-Type: application/json' \
--header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
--header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
--header 'X-GatePay-Signature: <x-gatepay-signature>' \
--header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
--data '
{
"channelId": "smart_shop",
"chain": "ETH",
"currencies": "DAI,USDT",
"callbackUrl": "https://www.abc.com/callback"
}
'{
"status": "SUCCESS",
"code": "000000",
"errorMessage": "",
"data": {
"channelId": "smart_shop",
"chain": "ETH",
"address": "0x2EBa11a702F1d53c6e2F08278819e26E6e4a63ae",
"currencies": [
"DAI",
"USDT"
],
"callbackUrl": "https://www.abc.com/callback",
"desc": "",
"ChainShowEn": "ETH /ERC20"
}
}商户客户端ID,在 GatePay 平台申请获得
"4186d0c6-6a35-55a9-8dc6-5312769dbff8"
HMAC-SHA256签名,用于验证请求合法性
"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"
时间戳(毫秒),与服务器时间差不能超过5分钟
"1672905655498"
随机数,用于防止重放攻击
"3525756760"