Pay-in collection
About 3 min
Vietnam region pay-in API (VND). See Payment methods.
Request
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 | Required | Type | Description |
|---|---|---|---|
Content-Type | M | String | application/json request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm (e.g. Vietnam ICT +07:00). |
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 VND. |
amount | M | Number | Amount (integer only — no decimal point). See Money for decimal places |
paymentMethod | O | String | See Payment methods doc. |
payer | O | Object | Payer object. Payer bank information may be provided for Vietnam bank-transfer scenarios. |
name | O | String | Payer name. |
bankName | O | String | Payer bank name or bank code. |
accountNo | O | String | Payer bank account number. |
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": "20011563d9094aa7d4d9e9b933bb",
"purpose": "E-wallet top-up — HCMC",
"merchant": {
"merchantId": "20011"
},
"money": {
"currency": "VND",
"amount": 1000000
},
"paymentMethod": "W_MOMO",
"redirectUrl": "https://www.example.com/success"
}
{
"orderNo": "20011563d9094aa7d4d9e9b933bb",
"purpose": "Bank transfer top-up",
"merchant": {
"merchantId": "20011"
},
"money": {
"currency": "VND",
"amount": 1000000
},
"paymentMethod": "VIET_QR",
"payer": {
"name": "Nguyen Van A",
"bankName": "VCB",
"accountNo": "0123456789"
},
"redirectUrl": "https://www.example.com/success"
}
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 VND. |
amount | M | Number | Amount (integer only — no decimal point). See Money for decimal places |
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. |
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": "20011563d9094aa7d4d9e9b933bb",
"tradeNo": "1812001125042115424463245",
"merchant": {
"merchantId": "20011",
"merchantName": "Smilepayz Demo Store",
"accountNo": "11820011202403071031"
},
"money": {
"currency": "VND",
"amount": 1000000
},
"transactionTime": "2025-06-19T10:31:33+07:00",
"channel": {
"paymentMethod": "W_MOMO",
"paymentUrl": "https://gateway.smilepayz.com/cashier/#/loading?tradeNo=1812001125042115424463245"
},
"status": "PROCESSING"
}
Notification/Callback
Callback signature ≠ request signature
Do not verify callback X-SIGNATURE with the request-signing formula. See Callback Signature.
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 | See Callback Signature |
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 VND. |
amount | M | Number | Amount (integer only — no decimal point). See Money for decimal places |
Return
Important
Respond with the string SUCCESS only.
{
"orderNo": "20011563d9094aa7d4d9e9b933bb",
"tradeNo": "1812001125042115424463245",
"merchantId": "20011",
"merchantName": "Smilepayz Demo Store",
"subMerchantId": "",
"subMerchantName": "",
"paymentMethod": "W_MOMO",
"transactionTime": "2025-06-19T10:31:33+07:00",
"status": "SUCCESS",
"money": {
"currency": "VND",
"amount": 1000000
}
}
SUCCESS

