Api Payin
About 2 min
Request
The term refers to an application programming interface (API) that facilitates "pay-in" transactions.
This can include a variety of payment methods sources such as
QRPAY
bank transfer
Request Path:
sandbox:
https://sandbox-gateway.smilepayz.com/v2.0/transaction/pay-in
production:https://gateway.smilepayz.com/v2.0/transaction/pay-in
Header Parameters
Field | Attribute | Type | Description |
---|---|---|---|
Content-Type | M | String | application/json |
X-TIMESTAMP | M | String | yyyy-MM-ddTHH:mm:ss[zoneOffset] eg: 2020-12-17T10:55:00+07:00 |
X-SIGNATURE | M | String | Focus:How to signature |
X-PARTNER-ID | M | String | merchant ID |
Body Parameters
Field | Attribute | Type | Description |
---|---|---|---|
orderNo | M | String(32) | unique no. Focus OrderNumber Rule |
purpose | M | String(64) | purpose |
merchant | M | Object | Model Object Merchant |
money | M | Object | Model Object Money |
payer | M | Object | Model Object Payer |
area | M | Number | Fixed Value: 11 |
paymentMethod | O | String | Model Object PaymentMethod |
productDetail | O | String(128) | production description |
expiryPeriod | O | Number | expiryPeriod (second); default:3600 |
redirectUrl | O | String(256) | Redirect to customer url |
callbackUrl | O | String(256) | notify address |
- If paymentMethod not pass. smilepayz will return a transaction page
- If paymentMethod is not null. you can pass the payer name, payer account number and the payer bank name
- Bank name redirect to Payment Method List.
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
{
"payer": {
"name": "test",
"accountNo": "123456789009",
"bankName": "KBANk"
},
"area": 11,
"merchant": {
"merchantId": "20001"
},
"money": {
"amount": 10000,
"currency": "THB"
},
"orderNo": "20001e9d98b010db244c99d457c",// Attention! format
"paymentMethod": "QRPAY",
"purpose": "Purpose For Transaction from Java SDK",
"redirectUrl": "https://docs.smilepayz.com/en/"
}
Response
HTTP Request
Field | Attribute | Type | Description |
---|---|---|---|
Content-Type | M | String | application/json |
X-TIMESTAMP | M | String | yyyy-MM-ddTHH:mm:ss[zoneOffset] eg: 2020-12-17T10:55:00+07:00 |
Body Parameters
Field | Attribute | Type | Description |
---|---|---|---|
code | M | String | success = "00" |
message | M | String | response message |
orderNo | M | String | transaction unique no |
merchant | M | Object | Model Object Merchant |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss+07:00 eg: 2020-12-17T10:55:00+07:00 |
money | M | Object | Model Object Money |
channel | M | Object | channel information Channel |
tradeNo | O | String | smilepayz orderNo |
status | O | String | Model Object Status |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"channel": {
"additionalInfo": {},
"paymentMethod": "QRPAY",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=111200572411191251468673",
"qrString": "00020101021229370016A0000006770101110113006680870163353037645406299.985802TH63048436"
},
"merchant": {
"accountNo": "11120001202406101410",
"merchantId": "20001",
"merchantName": "test"
},
"money": {
"amount": 300,
"currency": "THB"
},
"orderNo": "878d95fe75ef4c49b11d266afa8dd849",
"status": "PROCESSING",
"tradeNo": "111200012411191251468673",
"transactionTime": "2024-11-19T12:51:47+07:00"
}
{
"channel": {
"additionalInfo": {},
"paymentMethod": "BANK",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=1112001125042408363186433", //smilepayz checkout page
"receiverBankName": "KBANK", //the receiver bank name
"vaNumber": "2053617290" //the receiver bank account number
},
"code": "00",
"merchant": {
"accountNo": "11120011202402290943",
"merchantId": "20011",
"merchantName": "bradytest123www"
},
"message": "Successful",
"money": {
"amount": 100,
"currency": "THB"
},
"orderNo": "20011b5baff0ed8ac4f0c873920e",
"status": "PROCESSING",
"tradeNo": "1112001125042408363186433",
"transactionTime": "2025-04-24T08:36:32+07:00"
}
Notification
HTTP Request
Field | Attribute | Type | Description |
---|---|---|---|
Content-Type | M | String | application/json |
X-TIMESTAMP | M | String | yyyy-MM-ddTHH:mm:ss[zoneOffset] eg: 2020-12-17T10:55:00+07:00 |
X-SIGNATURE | M | String | how to check this value |
Body Parameters
Field | Attribute | Type | Description |
---|---|---|---|
orderNo | M | String | merchant transaction unique no |
tradeNo | M | String | smilepayz trade no. |
merchantId | M | String | merchant id |
merchantName | M | String | merchant name |
subMerchantId | O | String | sub merchant id |
subMerchantName | O | String | sub merchant name |
paymentMethod | M | String | payment method. eg:SPEI |
transactionTime | M | String | yyyy-MM-ddTHH:mm:ss |
status | M | String | Model Object Status |
money | M | Object | Model Object Money |
payer | M | String | Model Object Payer |
Return
Important
Notification please return only string SUCCESS
{
"merchantId": "20001",
"merchantName": "test",
"money": {
"amount": 150,
"currency": "THB"
},
"orderNo": "20001f7d65167e8b1419896f2dfb",
"payer": {
"name": "payerName",
"accountNo": "*****25432"
},
"paymentMethod": "QRPAY",
"status": "SUCCESS",
"tradeNo": "111200012412151710505955",
"transactionTime": "2024-12-15T17:10:51"
}
SUCCESS