跳转到主要内容
POST
/
v1
/
pay
/
fixedaddress
/
save
创建静态收款地址
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"
  }
}

请求头

X-GatePay-Certificate-ClientId
string
必填

商户客户端ID,在 GatePay 平台申请获得

示例:

"4186d0c6-6a35-55a9-8dc6-5312769dbff8"

X-GatePay-Signature
string
必填

HMAC-SHA256签名,用于验证请求合法性

示例:

"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"

X-GatePay-Timestamp
string
必填

时间戳(毫秒),与服务器时间差不能超过5分钟

示例:

"1672905655498"

X-GatePay-Nonce
string
必填

随机数,用于防止重放攻击

示例:

"3525756760"

请求体

application/json
channelId
string
必填

客户名称,只支持字母、数字、下划线和破折号,长度不超过 50 字节

chain
string
必填

网络名称

currencies
string
必填

要在该静态地址上营收的币种,多币种逗号分隔,例如 USDT,BTC

callbackUrl
string
必填

该渠道到账回调地址,长度不超过 128 字节

响应

200 - application/json

成功响应

status
enum<string>

响应状态

可用选项:
SUCCESS,
FAIL
示例:

"SUCCESS"

code
string

响应码

示例:

"000000"

errorMessage
string

错误信息

示例:

""

data
object