API การทำรายการจ่ายออก (Pay-Out)
ประมาณ 2 นาที
API Pay-out ภูมิภาค USDT (USDT). ดู Payment methods。
Request
Pay-Out API เปิดให้ร้านค้าสามารถเริ่มต้นธุรกรรมการจ่ายเงินออกไปยังผู้รับหลายประเภท เช่น พนักงาน ลูกค้า ผู้ขาย และพาร์ตเนอร์ API นี้รองรับวิธีการชำระเงินด้วยคริปโทเคอร์เรนซีหลายรูปแบบ เพื่อให้การโอนสินทรัพย์ดิจิทัลมีความปลอดภัยและมีประสิทธิภาพ
Request Path:
sandbox:
https://sandbox-gateway.smilepayz.com/v2.0/disbursement/pay-out
production:https://gateway.smilepayz.com/v2.0/disbursement/pay-out
Header Parameters
| Field | Required | Type | Description |
|---|---|---|---|
| Content-Type | M | String | application/json request body. |
| X-TIMESTAMP | M | String | Datetime with zone offset, 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 |
| paymentMethod | M | String(6) | See Payment methods doc. |
| cashAccount | M | String(32) | Beneficiary bank account number. |
| network | M | String(32) | เครือข่ายบล็อกเชนที่ใช้ในการประมวลผลธุรกรรม รูปแบบ: รหัสเครือข่ายที่กำหนดไว้ล่วงหน้า ตัวอย่าง: BEP20, TRC20 ใช้ระบุเครือข่ายที่ธุรกรรมจะถูกส่งผ่าน |
| callbackUrl | O | String(256) | HTTPS async status URL, max 256 chars. |
Example Body – Disbursement Request:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
X-SIGNATURE: 7MHd9v5/m9JeqmDZVwWBZUZ5J5...7120QnFEny7Qm7uQR1G0TWCh10fsU6nVxiRoeoQ==
X-PARTNER-ID: 20001
{
"orderNo": "2000102900000000000001",
"paymentMethod": "USDT",
"purpose": "Treasury transfer — TRC20 wallet",
"cashAccount": "TS8taf44vwibX7z4vE7aqrA7xVQjzzGKoZ",
"network": "TRC20",
"merchant": {
"merchantId": "20001"
},
"money": {
"amount": 100,
"currency": "USDT"
}
}
Response
HTTP Response
| Field | Required | Type | Description |
|---|---|---|---|
| Content-Type | M | String | application/json response or callback body. |
| X-TIMESTAMP | M | String | Datetime with zone offset, format yyyy-MM-ddTHH:mm:ss±HH:mm |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
| code | M | String | 00 success, other values error. |
| message | M | String | UTF-8 human-readable result line. |
| orderNo | M | String | Merchant-unique id |
| tradeNo | O | String | Smilepayz tradeNo for this order. |
| 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 |
| disbursementTime | M | String | เวลาที่ทำธุรกรรมจ่ายออกเสร็จสิ้น รูปแบบ: yyyy-MM-ddTHH:mm:ss ตัวอย่าง: 2020-12-17T10:55:00+07:00 ใช้สำหรับติดตามเวลาและการตรวจสอบย้อนหลัง (audit) |
| channel | M | Object | Channel payload (paymentUrl, qrString, …). |
| status | O | String | Order or payment status enum value. |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"code": "00",
"message": "successful",
"orderNo": "2000102900000000000001",
"tradeNo": "20001032432400001",
"merchant": {
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store",
"accountNo": "2000124234782342"
},
"money": {
"currency": "USDT",
"amount": 100
},
"disbursementTime": "2024-12-17T10:55:00+07:00",
"channel": {
"paymentMethod": "USDT",
"cashAccount": "TS8taf44vwibX7z4vE7aqrA7xVQjzzGKoZ",
"accountName": "Demo Beneficiary"
},
"status": "PROCESSING"
}
Notification
HTTP Request
| Field | Required | Type | Description |
|---|---|---|---|
| Content-Type | M | String | application/json request body. |
| X-TIMESTAMP | M | String | Datetime with zone offset, format yyyy-MM-ddTHH:mm:ss±HH:mm |
| X-SIGNATURE | M | String | Callback body signature (see Callback signature guide). |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
| orderNo | M | String | Merchant-unique id |
| tradeNo | M | String | Smilepayz tradeNo for this order. |
| merchantId | M | String | Smilepayz merchantId for this call. |
| merchantName | M | String | Optional Merchant display name. |
| subMerchantId | O | String | Sub-merchant ID. |
| subMerchantName | O | String | Name for subMerchantId. |
| paymentMethod | M | String | See Payment methods doc. |
| transactionTime | M | String | Transaction completion timestamp Format: yyyy-MM-ddTHH:mm:ss Example: 2024-12-17T10:55:00 Used for transaction timing and audit |
| status | M | String | Order or payment status enum value. |
| money | M | Object | Currency plus amount for this transaction. |
| currency | M | String | Fixed to USDT. |
| amount | M | Number | Amount |
Return
การตอบกลับที่สำคัญ
Notification Response: โปรดตอบกลับด้วยสตริง
SUCCESSเพียงอย่างเดียว เพื่อยืนยันว่าระบบของคุณได้รับการแจ้งเตือนแล้ว
{
"orderNo": "2000102900000000000001",
"tradeNo": "20001032432400001",
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store",
"subMerchantId": "",
"subMerchantName": "",
"paymentMethod": "USDT",
"transactionTime": "2024-12-17T10:55:00+07:00",
"money": {
"currency": "USDT",
"amount": 100
},
"status": "SUCCESS"
}
SUCCESS
:::
