v1.0.9 ยท 2026-06-21
Vietnam Payment API Documentation | ucake API Docs
Vietnam payment system standard APIs covering payout, payout query, virtual account creation, virtual account closing, virtual account query, company balance query, dynamic QR creation and asynchronous notifications.
Base path: /vnpay/api/v1
API endpoints
Payout API
POST /vnpay/api/v1/payment
Use this API to send funds to a user bank account.
Required fields
amount - integer - Required - Payout amount. Range: 50,000 to 50,000,000.orderNo - string - Required - Merchant order number. Must be unique for each request.accountName - string - Required - User namephoneNo - string - Optional - User phone numberaccountNo - string - Required - User account numberaccountType - integer - Required - Account type: 0 account number, 1 card number.bankCode - string - Required - Bank codemessage - string - Required - Payout notereturnURL - string - Required - Callback notification URLcompanyID - string - Required - Company ID assigned by the backend.merchantID - string - Required - Merchant ID assigned by the backend.timestamp - number - Required - Timestampsign - string - Required - Signature
Response fields
amount - integer - Transaction amountorderNo - string - Merchant order number from the request.tradeNo - string - Transaction serial numbercreateTime - string - Transaction creation time. Format: yyyy-MM-dd HH:mm:ss.updateTime - string - Last transaction update time.bankCode - string - Bank codephoneNo - string - Phone numberaccountName - string - User nameaccountNo - string - User account numberaccountType - integer - Account typemessage - String - Note
Payout result query API
GET /vnpay/api/v1/paymentResult
When a payout is processing, wait for notification or query the result manually.
Required fields
orderNo - string - Required - Order number submitted to the payout API.tradeNo - string - Required - Transaction serial number returned by the payout API.companyID - string - Required - Company ID assigned by the backend.merchantID - string - Required - Merchant ID assigned by the backend.sign - string - Required - Signaturetimestamp - number - Required - Timestamp
Response fields
amount - integer - Transaction amountorderNo - string - Merchant order numbertradeNo - string - Transaction serial numbercreateTime - string - Transaction creation timeupdateTime - string - Last transaction update time.bankCode - string - Bank codephoneNo - string - Phone numberaccountName - string - User nameaccountNo - string - User account numberaccountType - integer - Account typemessage - string - Note
Create virtual account
POST /vnpay/api/v1/createVirtualCard
Create a virtual account and return account number, QRCode string and VietQR image URL.
Required fields
orderNo - string - Required - Transaction order numberaccountName - string - Optional - Virtual account namephoneNo - string - Optional - User phone numberbankCode - string - Optional - Bank used to apply for the virtual account.companyID - string - Required - Company ID assigned by the backend.merchantID - string - Required - Merchant ID assigned by the backend.timestamp - string - Required - Timestampsign - string - Required - SignaturetotalFee - Long - Optional - Collection amount
Response fields
orderNo - string - Transaction order numberbankCode - string - Bank codeaccountName - string - Account nameaccountNo - string - Account numberaccountStatus - integer - Status: 0 closed, 1 active.createdTime - string - Created timeexpireTime - string - Expiration timecloseTime - string - Close timeQRCode - String - QR code string dataQRImgUrl - String - VietQR image URL
Close virtual account
POST /vnpay/api/v1/closeVirtualCard
Close the specified virtual account and return its status after closing.
Required fields
accountNo - string - Optional - Bank account number returned when created.bankCode - string - Optional - Bank codecompanyID - string - Optional - Company ID assigned by the backend.merchantID - string - Optional - Merchant ID assigned by the backend.timestamp - integer - Optional - Timestampsign - string - Optional - Signature
Response fields
bankCode - string - Bank codeaccountName - string - Account nameaccountNo - string - Account numberaccountStatus - integer - Status: 0 closed, 1 active.createdTime - string - Created timeexpireTime - string - Expiration timecloseTime - string - Close time
Query virtual account
GET /vnpay/api/v1/queryVirtualCard
Query virtual account status by bankCode, accountName and accountNo.
Required fields
bankCode - string - Yes - Bank codeaccountName - string - Yes - Account nameaccountNo - string - Yes - Account numbercompanyID - string - Yes - Company ID assigned by the backend.merchantID - string - Yes - Merchant ID assigned by the backend.sign - string - Yes - Signaturetimestamp - string - Yes - Timestamp
Response fields
bankCode - string - Bank codeaccountName - string - Account nameaccountNo - string - Account numberaccountStatus - integer - Status: 0 closed, 1 active.createdTime - string - Created timeexpireTime - string - Expiration timecloseTime - string - Close time
Query company balance
POST /vnpay/api/v1/queryBalance
Query the current company account balance.
Required fields
companyID - string - Required - Company ID assigned by the backend.merchantID - string - Required - Merchant ID assigned by the backend.sign - string - Required - Signaturetimestamp - integer - Required - Timestamp
Response fields
companyID - string - Company ID assigned by the backend.merchantID - string - Merchant ID assigned by the backend.balance - string - Current company balance
Create dynamic QR
POST /vnpay/api/v1/createDynamicQr
Create a dynamic QR for a specified amount and return the QR string and expiration time.
Required fields
merchantID - string - Required - Merchant ID assigned by the backend.companyID - string - Required - Company ID assigned by the backend.orderNo - string - Required - Transaction order numberamount - Long - Required - Collection amountmessage - string - Optional - Notetimestamp - string - Required - Timestampsign - string - Required - Signature
Response fields
orderNo - string - Transaction order numberamount - Long - Collection amountexpiresAt - string - Dynamic QR expiration timeqrCode - String - QR code string data
Callbacks
Payout result notification
URL submitted in the payout API.
When a processing payout has a final result, the URL submitted to the payout API is called for notification.
companyID - string - Company IDmerchantID - string - Merchant IDorderNo - string - Merchant order numbertradeNo - string - Transaction serial numberbankCode - string - Bank codeaccountNo - string - Account numberamount - number - Transaction amountmessage - string - Payout noteresult - String - Failure reason when the transaction fails.updateTime - String - Transaction update timestatus - number - Transaction status: 0 success, 3 failed, 4 canceled.sign - string - Signature
Collection result notification
Notification URL configured in the merchant backend.
After a virtual account receives funds, collection information is sent to the partner.
companyID - string - Company IDmerchantID - string - Merchant IDorderNo - string - Merchant order numbertradeNo - string - Transaction serial numberbankCode - string - Bank codeaccountNo - string - Virtual account numberamount - number - Collection amountmessage - string - Transaction message returned by the payment system.senderName - string - PayersenderAccount - string - Payer accountsenderBankCode - string - Payer bank codesign - string - Signature
Refund notification
Refund notification URL configured in the merchant backend.
After an order refund succeeds, refund information is sent to the partner.
companyID - string - Company IDmerchantID - string - Merchant IDorderNo - string - Merchant order numbertradeNo - string - Transaction serial numberbankCode - string - Bank codeaccountNo - string - Bank account numberamount - number - Transaction amountupdateTime - string - Update timestatus - string - Status: 5 refunded.sign - string - Signature