Skip to main content

Update VA

API VA Flow

Path

  • URL: /cb-core/api/v1/va/update
  • Method: POST
  • Description: This API allows updating a virtual account in the system.

Request

Request Table

ParamsData Type + LengthRequiredDescription
request_idstring(50)YesUnique request ID, suggested format: MerchantCode+YYYYMMDDHHMMSS+UniqueId
request_timestring(19)YesRequest time in format: YYYY-MM-DD HH:MM:SS
merchant_codestring(20)YesIf the Seller is under your sub-merchant, fill your sub merchant code provided by Baokim.
If Seller is under you, fill your Merchant_code provided by Baokim as above
seller_idstring(50)NoSeller ID matching the Onboarding Sellers API (optional if you want to update Seller)
midstring(50)NoOn-platform MID of the Seller (optional, only for On-platform merchants)
reference_codestring(100)YesThe reference code of VA managed in your system
acc_namestring(63)NoUpdated name of the Virtual Account holder
statusint(1)NoFill 2. if you want to deactivate the VA. After deactivation, the VA can not be updated
typeint(1)No1: Collect the correct amount, 2: Collect the free amount
amountstring(25)Notype = 1 => The amount you want to collect
number_of_times_collectstring(25)No-1: unlimited, >= 1 number of times,
If you don't want to collect anymore, update status = 2
expire_datestring(19)NoFormat: YYYY-MM-DD HH:MM:SS
memostring(255)NoUpdated transfer note or description for the Virtual Account
va_purposeint(1)NoPurpose of the Virtual Account
1: Ecom Shopee Vietnam
2: Ecom Lazada Vietnam
3: Ecom Tiktokshop Vietnam
4: B2B
5: Website
6: Other
7: All

Request Example

{
"request_id": "MERCHANT12345678901234510130",
"request_time": "2024-11-15 14:41:00",
"merchant_code": "PHUONGTT",
"seller_id": "SELLER12345",
"mid": "MID12345",
"reference_code": "REF1231081",
"acc_name": "Nguyen Van D",
"type": 1,
"status": 2,
"amount": "20000",
"number_of_times_collect": "2",
"expire_date": "2024-11-20 12:00:00",
"memo": "Payment for order 12345",
"va_purpose": 1
}

Response

Response Table

ParamsData Type + LengthRequiredDescription
response_codeint(4)YesError code from Baokim as per Error Codes Table
response_messagestring(100)YesDescription of the error code from Baokim as per Error Codes Table
merchant_codestring(20)YesMerchant code provided by Baokim before integration
reference_codestring(100)YesThe reference code of VA managed in your system
statusint(1)Yes1: Active, 2: Inactive
expire_datestring(19)YesFormat: YYYY-MM-DD HH:MM:SS
account_infoobjectYesVirtual account details
account_info.bank_namestring(100)YesBank name
account_info.bank_nostring(6)YesBank no
account_info.bank_branchstring(100)YesBank branch
account_info.acc_nostring(22)YesBank account number
account_info.acc_namestring(63)YesAccount holder's name
account_info.qrstring(100)YesQR string encoded with base64
account_info.qr_pathstring(100)YesQR image path

Response Example

{
"response_code": 200,
"response_message": "Success",
"merchant_code": "PHUONGTT",
"reference_code": "REF1231081",
"status": 1,
"expire_date": "2024-11-20 12:00:00",
"account_info": {
"bank_name": "Ngân hàng Thương mại Cổ phần Đầu tư và Phát triển Việt Nam",
"bank_no": "970418",
"bank_branch": "Hà Nội",
"acc_no": "963336011173760",
"acc_name": "NGUYEN VAN D",
"qr": "00020101021238590010A0000007270129000697041801159633360111737600208QRIBFTTA53037045405200005802VN63049068",
"qr_path": "https://devtest.baokim.vn/vietqr/core/view/BKREF123108120241115144204.jpg"
}
}

Error Code

Response CodeResponse Message
200Success
99Pending
11Failed
101System Error
110Merchant Code Invalid
120Invalid Signature
422Validation Error
2101No VA found with this reference_code