การรับชำระเงิน (Pay-In · ไทย)รับชำระเงินในประเทศไทย (THB ): QRPAY , KBANK , เส้นทางแคชเชียร์แบบธนาคาร
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-TypeM String application/json X-TIMESTAMPM String Format: yyyy-MM-ddTHH:mm:ss±HH:mm X-SIGNATUREM String Request signature; Signature Generation . X-PARTNER-IDM String merchantID (alphanumeric).
Body Parameters Field Required Type Description orderNoM String(32) 6–32 alphanumeric; unique per merchant. purposeM String(64) UTF-8; length 1–64. merchantM Object Merchant routing and settlement. merchantId M String Platform merchant ID. merchantName O String UTF-8 display name (cashier / records). subMerchantId O String Sub-merchant ID (multi-level). subMerchantName O String Sub-merchant name (UTF-8). moneyM Object Amount and currency. currency M String THB only. amount M Number Integer minor units (e.g. 200 = THB 200.00). payerM Object Customer verification (name, account, bank). name M String Payer full name (UTF-8). accountNo M String Payer bank account number (numeric string). bankName M String Bank code (e.g. KBANK , BBL , SCB ); Payment methods . paymentMethodM String QRPAY or KBANK ; Payment methods .expiryPeriodO Number Session TTL (seconds); default 3600. redirectUrlO String(256) Post-pay redirect URL; HTTP(S); max 256. callbackUrlO String(256) Status webhook URL; HTTP(S); max 256.
Example Body – Transaction Request: Header Min Body
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"
} ,
"merchant" : {
"merchantId" : "20001"
} ,
"money" : {
"amount" : 10000 ,
"currency" : "THB"
} ,
"orderNo" : "20001e9d98b010db244c99d457c" ,
"paymentMethod" : "QRPAY" ,
"purpose" : "Purpose For Transaction from Java SDK" ,
"redirectUrl" : "https://docs.smilepayz.com/en/"
}
Responses HTTP Request Field Required Type Description Content-TypeM String application/json X-TIMESTAMPM String Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Body Parameters Field Required Type Description codeM String 00 = success; other codes = error.messageM String Result text (UTF-8). orderNoM String Echo of orderNo . tradeNoO String Platform trade ID. merchantM Object Merchant Model . merchantId M String Merchant ID. merchantName O String Display name. subMerchantId O String Sub-merchant ID. subMerchantName O String Sub-merchant name. moneyM Object Money Model . currency M String THB . amount M Number Integer minors. payAmount O Number Settled amount after fees (decimal THB). transactionTimeM String yyyy-MM-ddTHH:mm:ss±HH:mmchannelM Object Channel Model . paymentMethod O String Channel code (e.g. QRPAY , BANK ). paymentUrl M String Cashier URL. qrString O String QR payload or image URL. receiverBankName O String Bank code when channel is bank transfer. vaNumber O String VA / reference when returned. statusO String Status Model .
Header QRPAY Response Body BANK Response Body
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" : "test" ,
"accountNo" : "11120001202406101410"
} ,
"money" : {
"currency" : "THB" ,
"amount" : 300 ,
"payAmount" : 299.98
} ,
"transactionTime" : "2024-11-19T12:51:47+07:00" ,
"channel" : {
"additionalInfo" : { } ,
"paymentMethod" : "QRPAY" ,
"paymentUrl" : "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=111200572411191251468673" ,
"qrString" : "00020101021229370016A0000006770101110113006680870163353037645406299.985802TH63048436"
} ,
"status" : "PROCESSING"
}
{
"code" : "00" ,
"message" : "Successful" ,
"orderNo" : "20011b5baff0ed8ac4f0c873920e" ,
"tradeNo" : "1112001125042408363186433" ,
"merchant" : {
"merchantId" : "20011" ,
"merchantName" : "bradytest123www" ,
"accountNo" : "11120011202402290943"
} ,
"money" : {
"currency" : "THB" ,
"amount" : 100 ,
"payAmount" : 99.99
} ,
"transactionTime" : "2025-04-24T08:36:32+07:00" ,
"channel" : {
"additionalInfo" : { } ,
"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-TypeM String application/json X-TIMESTAMPM String Format: yyyy-MM-ddTHH:mm:ss±HH:mm X-SIGNATUREM String Callback signature; verify .
Body Parameters Field Required Type Description orderNoM String Same orderNo as pay-in. tradeNoM String Platform tradeNo . merchantIdM String Merchant ID. merchantNameM String Display name. subMerchantIdO String Sub-merchant ID. subMerchantNameO String Sub-merchant name. paymentMethodM String Settled channel (e.g. QRPAY , BANK ). transactionTimeM String Completion time (yyyy-MM-ddTHH:mm:ss±HH:mm). statusM String Status Model .moneyM Object Final amount; Money Model . currency M String THB . amount M Number Integer minors. payAmount O Number Net amount when returned. payerO Object Payer Model .
Return Important
Respond with the string SUCCESS only.
Request Response
{
"orderNo" : "20001f7d65167e8b1419896f2dfb" ,
"tradeNo" : "111200012412151710505955" ,
"merchantId" : "20001" ,
"merchantName" : "test" ,
"subMerchantId" : "" ,
"subMerchantName" : "" ,
"paymentMethod" : "QRPAY" ,
"transactionTime" : "2024-12-15T17:10:51" ,
"status" : "SUCCESS" ,
"money" : {
"currency" : "THB" ,
"amount" : 150
} ,
"payer" : {
"name" : "payerName" ,
"accountNo" : "*****25432"
}
}
ถัดไป
การโอนจ่าย (Pay-out · ไทย)