Pay-in collection
USDT region pay-in API (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 request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
X-SIGNATURE | M | String | Signature of JSON body (see product Signature doc). |
X-PARTNER-ID | M | String | Your merchantID |
Body Parameters
| Field | Required | Type | Description |
|---|
orderNo | M | String(32) | Merchant-unique id |
purpose | M | String(64) | Memo to payer |
merchant | M | Object | Wraps merchantId and optional sub-merchant fields. |
merchantId | M | String | Smilepayz merchantId for this call. |
merchantName | O | String | Merchant display name. |
subMerchantId | O | String | Sub-merchant ID. |
subMerchantName | O | String | Name for subMerchantId. |
money | M | Object | Currency plus amount for this transaction. |
currency | M | String | Fixed to USDT. |
amount | M | Number | Amount |
payer | O | Object | Payer object (see Payer model). |
name | O | String | Payer full name. |
phone | O | String | Payer phone number. |
email | O | String | Payer email address. |
productDetail | O | String(128) | Product or service description. |
paymentMethod | O | String | See Payment methods doc. |
expiryPeriod | O | Number | ExpiryPeriod, default 3600. |
redirectUrl | O | String(256) | HTTPS post-pay return URL, max 256 chars. |
callbackUrl | O | String(256) | HTTPS async status URL, max 256 chars. |
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 request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
Body Parameters
| Field | Required | Type | Description |
|---|
code | M | String | 00 success; other codes indicate failure. |
message | M | String | UTF-8 result message. |
orderNo | M | String | Merchant-unique id |
tradeNo | O | String | Platform tradeNo. |
merchant | M | Object | Wraps merchantId and optional sub-merchant fields. |
merchantId | M | String | Smilepayz merchantId. |
merchantName | O | String | Merchant display name. |
money | M | Object | Currency plus amount. |
currency | M | String | Fixed to USDT. |
amount | M | Number | Amount |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss±HH:mm |
channel | M | Object | Channel payload (paymentUrl, wallet address, etc.). |
paymentMethod | O | String | See Payment methods. |
paymentUrl | O | String | Cashier redirect URL. |
status | O | String | Order or payment status enum. |
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 request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
X-SIGNATURE | M | String | Callback body signature (see Callback verification). |
Body Parameters
| Field | Required | Type | Description |
|---|
orderNo | M | String | Merchant-unique id |
tradeNo | M | String | Platform tradeNo. |
merchantId | M | String | Smilepayz merchantId. |
merchantName | M | String | Merchant display name. |
subMerchantId | O | String | Sub-merchant ID. |
subMerchantName | O | String | Name for subMerchantId. |
paymentMethod | M | String | See Payment methods. |
transactionTime | M | String | Format: yyyy-MM-ddTHH:mm:ss |
status | M | String | Order or payment status enum. |
money | M | Object | Currency plus amount. |
currency | M | String | Fixed to USDT. |
amount | M | Number | Amount |
payer | O | Object | Payer info when returned. |
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]"
}
}