收款(Pay-In · USDT)
USDT地区 收款(Pay-in) 接口(USDT)。
Request
POST/v2.0/transaction/digital-pay-in
Request Path:
sandbox: https://sandbox-gateway.smilepayz.com/v2.0/transaction/digital-pay-in
production: https://gateway.smilepayz.com/v2.0/transaction/digital-pay-in
| Field | Required | Type | Description |
|---|
Content-Type | M | String | application/json 请求体。 |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
X-SIGNATURE | M | String | 请求体签名(见产品文档 签名生成)。 |
X-PARTNER-ID | M | String | Your merchantID |
Body Parameters
| Field | Required | Type | Description |
|---|
orderNo | M | String(32) | 商户唯一订单号 |
purpose | M | String(64) | 展示用摘要 |
merchant | M | Object | 含 merchantId 及可选子商户字段。 |
merchantId | M | String | Smilepayz merchantId。 |
merchantName | O | String | 商户展示名。 |
subMerchantId | O | String | 可选子商户编号。 |
subMerchantName | O | String | subMerchantId 的名称。 |
money | M | Object | currency 与 amount 金额对象。 |
currency | M | String | 固定为 USDT。 |
amount | M | Number | 金额 |
payer | O | Object | 付款人对象(见 Payer 模型)。 |
name | O | String | 付款人姓名。 |
phone | O | String | 付款人电话。 |
email | O | String | 付款人邮箱。 |
productDetail | O | String(128) | 产品或服务描述。 |
paymentMethod | O | String | 通道编码(见 支付方式)。 |
expiryPeriod | O | Number | ExpiryPeriod,默认 3600。 |
redirectUrl | O | String(256) | 支付后 HTTPS 回跳,最长 256。 |
callbackUrl | O | String(256) | 异步通知 HTTPS,最长 256。 |
Example Body – Transaction Request:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001
{
"merchant": {
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store"
},
"payer": {
"phone": "+66812345678",
"email": "[email protected]"
},
"money": {
"amount": 100,
"currency": "USDT"
},
"orderNo": "20001usdtwallet98b010db244c99d",
"paymentMethod": "USDT_TRC20",
"purpose": "Crypto checkout — demo invoice",
"redirectUrl": "https://docs.smilepayz.com/en/"
}
Responses
HTTP Request
| Field | Required | Type | Description |
|---|
Content-Type | M | String | application/json 请求体。 |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
Body Parameters
| Field | Required | Type | Description |
|---|
code | M | String | 00 成功,其余失败。 |
message | M | String | UTF-8 结果说明。 |
orderNo | M | String | 商户唯一订单号 |
tradeNo | O | String | 平台 tradeNo。 |
merchant | M | Object | 含 merchantId 及可选子商户字段。 |
merchantId | M | String | Smilepayz merchantId。 |
merchantName | O | String | 商户展示名。 |
money | M | Object | currency 与 amount 金额对象。 |
currency | M | String | 固定为 USDT。 |
amount | M | Number | 金额 |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss±HH:mm |
channel | M | Object | 通道数据(paymentUrl、钱包地址等)。 |
paymentMethod | O | String | 通道编码(见 支付方式)。 |
paymentUrl | O | String | 收银台跳转 URL。 |
status | O | String | 订单或支付状态枚举值。 |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"channel": {
"paymentMethod": "USDT_TRC20",
"paymentUrl": "https://gateway-test.smilepayz.com/cashier/#/loading?tradeNo=3012003025112812141312194",
"cardData": {
"payeeBankCard": "TS8taf44vwibX7z4vE7aqrA7xVQjzzGKoZ",
"payAmount": 100.0,
"network": "TRC20"
}
},
"merchant": {
"accountNo": "11120001202406101410",
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store"
},
"money": {
"amount": 100,
"currency": "USDT"
},
"orderNo": "20001usdtwallet98b010db244c99d",
"tradeNo": "3012003025112812141312194",
"status": "PROCESSING",
"transactionTime": "2024-11-19T12:51:47+07:00",
"code": "00",
"message": "Successful"
}
Notification/Callback
HTTP Request
| Field | Required | Type | Description |
|---|
Content-Type | M | String | application/json 请求体。 |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
X-SIGNATURE | M | String | 回调体签名(见 回调验签 文档)。 |
Body Parameters
| Field | Required | Type | Description |
|---|
orderNo | M | String | 商户唯一订单号 |
tradeNo | M | String | 平台 tradeNo。 |
merchantId | M | String | Smilepayz merchantId。 |
merchantName | M | String | 商户展示名。 |
subMerchantId | O | String | 可选子商户编号。 |
subMerchantName | O | String | subMerchantId 的名称。 |
paymentMethod | M | String | 通道编码(见 支付方式)。 |
transactionTime | M | String | Format: yyyy-MM-ddTHH:mm:ss |
status | M | String | 订单或支付状态枚举值。 |
money | M | Object | currency 与 amount 金额对象。 |
currency | M | String | 固定为 USDT。 |
amount | M | Number | 金额 |
payer | O | Object | 付款人信息(若返回)。 |
Return
Important
Respond with the string SUCCESS only.
{
"orderNo": "20001usdtwallet98b010db244c99d",
"tradeNo": "3012003025112812141312194",
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store",
"subMerchantId": "",
"subMerchantName": "",
"paymentMethod": "USDT_TRC20",
"transactionTime": "2024-11-19T12:51:47+07:00",
"status": "SUCCESS",
"money": {
"currency": "USDT",
"amount": 100
},
"payer": {
"name": "Demo Payer",
"email": "[email protected]"
}
}