收款(Pay-In · 泰国)
泰国地区 收款(Pay-in) 接口(THB)。详见 支付方式。
Request
POST/v2.0/transaction/pay-in
Request Path:
sandbox: https://sandbox-gateway.smilepayz.com/v2.0/transaction/pay-in
production: https://gateway.smilepayz.com/v2.0/transaction/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 | 固定为 THB。 |
amount | M | Number | 金额 |
payer | M | Object | 付款人对象(见 Payer 模型)。 |
name | M | String | 收款人全名(UTF-8)。 |
accountNo | M | String | 结算 accountNo(若返回)。 |
bankName | M | String | Bank code (e.g. KBANK, BBL, SCB); 见 支付方式 文档。 |
paymentMethod | M | 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
{
"orderNo": "20011b5baff0ed8ac4f0c873920e",
"purpose": "Bill payment — Bangkok",
"merchant": {
"merchantId": "20011"
},
"money": {
"currency": "THB",
"amount": 50000
},
"payer": {
"name": "Somchai Saetan",
"accountNo": "1234567890",
"bankName": "KBANK"
},
"paymentMethod": "BANK",
"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 | 商户展示名。 |
subMerchantId | O | String | 可选子商户编号。 |
subMerchantName | O | String | subMerchantId 的名称。 |
money | M | Object | currency 与 amount 金额对象。 |
currency | M | String | 固定为 THB。 |
amount | M | Number | 金额 |
payAmount | O | Number | Settled amount after fees (decimal THB). |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss±HH:mm |
channel | M | Object | 通道数据(paymentUrl、qrString 等)。 |
paymentMethod | O | String | 通道编码(见 支付方式 文档)。 |
paymentUrl | M | String | 收银台跳转 URL。 |
qrString | O | String | 通道返回的复制串(若有)。 |
receiverBankName | O | String | Bank code when channel is bank transfer. |
vaNumber | O | String | VA / reference when returned. |
status | O | String | 订单或支付状态枚举值。 |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"code": "00",
"message": "Successful",
"orderNo": "878d95fe75ef4c49b11d266afa8dd849",
"tradeNo": "111200012411191251468673",
"merchant": {
"merchantId": "20001",
"merchantName": "Smilepayz Demo Store",
"accountNo": "11120001202406101410"
},
"money": {
"currency": "THB",
"amount": 300,
"payAmount": 299.98
},
"transactionTime": "2024-11-19T12:51:47+07:00",
"channel": {
"paymentMethod": "QRPAY",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=111200012411191251468673",
"qrString": "00020101021229370016A0000006770101110113006680870163353037645406299.985802TH63048436"
},
"status": "PROCESSING"
}
{
"code": "00",
"message": "Successful",
"orderNo": "20011b5baff0ed8ac4f0c873920e",
"tradeNo": "1112001125042408363186433",
"merchant": {
"merchantId": "20011",
"merchantName": "Smilepayz Demo Store",
"accountNo": "11120011202402290943"
},
"money": {
"currency": "THB",
"amount": 50000,
"payAmount": 49999.99
},
"transactionTime": "2025-04-24T08:36:32+07:00",
"channel": {
"paymentMethod": "BANK",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=1112001125042408363186433",
"receiverBankName": "KBANK",
"vaNumber": "2053617290"
},
"status": "PROCESSING"
}
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 | 固定为 THB。 |
amount | M | Number | 金额 |
payAmount | O | Number | Net amount when returned. |
payer | O | Object | 付款人对象(见 Payer 模型)。 |
Return
Important
Respond with the string SUCCESS only.
{
"orderNo": "20011b5baff0ed8ac4f0c873920e",
"tradeNo": "1112001125042408363186433",
"merchantId": "20011",
"merchantName": "Smilepayz Demo Store",
"subMerchantId": "",
"subMerchantName": "",
"paymentMethod": "BANK",
"transactionTime": "2025-04-24T08:36:32+07:00",
"status": "SUCCESS",
"money": {
"currency": "THB",
"amount": 50000
},
"payer": {
"name": "Somchai Saetan",
"accountNo": "*****67890"
}
}