Pembayaran masuk (Pay-In · Thailand)
smilepayz teamsSekitar 3 menit
API pay-in wilayah Thailand (THB). Lihat Payment methods.
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 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 THB. |
amount | M | Number | Amount |
payer | M | Object | Payer object per region rules (see Payer model). |
name | M | String | Beneficiary full name (UTF-8). |
accountNo | M | String | Settlement accountNo if gateway returns it. |
bankName | M | String | Bank code (e.g. KBANK, BBL, SCB); see Payment methods doc. |
paymentMethod | M | 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
{
"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 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 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 THB. |
amount | M | Number | Amount |
payAmount | O | Number | Settled amount after fees (decimal THB). |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss±HH:mm |
channel | M | Object | Channel payload (paymentUrl, qrString, …). |
paymentMethod | O | String | See Payment methods doc. |
paymentUrl | M | String | Cashier URL to open for the payer. |
qrString | O | String | PIX or channel copy-paste string if returned. |
receiverBankName | O | String | Bank code when channel is bank transfer. |
vaNumber | O | String | VA / reference when returned. |
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": "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 request body. |
X-TIMESTAMP | M | String | 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 | 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 | Format: yyyy-MM-ddTHH:mm:ss |
status | M | String | Order or payment status enum value. |
money | M | Object | Currency plus amount for this transaction. |
currency | M | String | Fixed to THB. |
amount | M | Number | Amount |
payAmount | O | Number | Net amount when returned. |
payer | O | Object | Payer object per region rules (see Payer model). |
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"
}
}