Create payment order
Create a deposit order
POST https://<API ENDPOINT>/payment/deposit
To create an order for deposit
Headers
Body
refId*
string
The unique id generate by agent
userId*
string
The userId use for indentify agent's user when receive a callback
amount*
Integer
the amount to deposit
accountName*
string
the account name
accountNo*
string
the account number
bankCode*
string
the bank code (see bank code table*)
timestamp*
ISO timestamp
ISO timestamp
extraParams
Object
Extra parameters will be pass when receive a callback
Response
txn_id
string
Transaction ID (Use this transaction to reconsile with HuskyPay
ref_id
string
Agent unique Reference ID
amount
number (integer)
Desire amount to deposit
fee
number (decimal)
Fee of this transaction
method
string (enum)
"link+qrcode" or "link+transfer" or "link+qrcode+transfer" or "link"
link
string
link can be open as a popup, iframe
qrcode
object
{ qrcode_text: raw qrcode content link: link can be open as a popup, iframe qrcode_date_url: base64 image of qrcode }
transfer
object
{ bank_code: account_number: account_name:
amount: }
expires_in
number
number of seconds that this order will be invalid (default 900 seconds)
created_at
datetime
datetime format YYYY-MM-DD HH:mm:ss ex: 2024-05-20 22:10:00
{
"code": 0,
"data": {
"txn_id": "HKPAY250816145132BB",
"ref_id": "hk9990065717-20250816145131",
"amount": 1000.00,
"fee": 15.00,
"method": "link+qrcode",
"link": "https://<api>/payment/payqr/HKPAY250816145132BB/0f3ebf7ce5ebeb3af43fbdb21c02f31b",
"qrcode": {
"qrcode_text": "00020101021229370016A0000006770106114158555802TH530376454071003.186304FB2B",
"link": "https://<api>/payment/payqr/HKPAY250816145132BB/0f3ebf7ce5ebeb3af43fbdb21c02f31b"
},
"transfer": {
"bank_code": "002",
"bank_name": "ธนาคารกรุงเทพ จำกัด(BBL)",
"account_number": "***-***-****",
"account_name": "สมชาย รักไทย",
"amount": "1000.00"
},
"created_at": "2025-08-16 14:50:24",
"expires_in": 900,
"expires_at": "2025-08-16 15:05:24"
}
}{
"code": 0,
"data": {
"txn_id": "HKPAY250816145132BB",
"ref_id": "hk9990065717-20250816145131",
"amount": 1000.00,
"fee": 15.00,
"method": "link+transfer",
"link": "https://<api>/payment/payqr/HKPAY250816145132BB/0f3ebf7ce5ebeb3af43fbdb21c02f31b",
"qrcode": {
"link": "https://<api>/payment/payqr/HKPAY250816145132BB/0f3ebf7ce5ebeb3af43fbdb21c02f31b"
},
"transfer": {
"bank_name": "ktb",
"bank_code": "006",
"account_number": "0123456789",
"account_name": "บริษัท ทดสอบ จำกัด",
"amount": 1000
},
"created_at": "2025-08-16 14:51:32",
"expires_in": 300,
"expires_at": "2025-08-16 15:06:32"
}
}{
code: 900,
message: 'Signature mismatch',
}Create a withdraw order
POST https://<API ENDPOINT>/payment/withdraw
Request Body
refId*
string
The unique id generate by agent
userId*
string
The userId use for indentify agent's user when receive a callback
amount*
Integer
the amount to deposit
accountName*
string
the account name
accountNo*
string
the account number
bankCode*
string
the bank code (see bank code table*)
timestamp*
ISO timestamp
ISO timestamp
extraParams
Object
Extra parameters will be pass when receive a callback
{
code: 0,
data: {
txnId: 'POXXXXXXXXXXXXX',
refId: 'XXXXX-XXXXX',
amount: 100,
fee: 0,
wallet: {
balance: 100,
},
}
}{
code: 900,
message: 'Signature mismatch',
}{
code: 800,
message: 'Insufficient Balance',
data: {
balance: 0,
}
}Last updated