Skip to main content

Update VA

Process

Merchant calls this API to update VA information.

Can be applied to business cases such as:

  • Update fixed amount on VA: collect_amount_min / collect_amount_max
  • Cancel VA no longer needed: update expire_date to a past date.

API Information

Method: POST

URL: /b2b/core/api/ext/mm/bank-transfer/update

Request

(Parameters sent by merchant)

Main Parameters

NoField NameData TypeRequiredDescription
1request_idString(100)Unique request ID from merchant to Baokim
2request_timeString(20)Request time. Format: YYYY-MM-DD H:i:s
3master_merchant_codeString(50)Unique identifier for master merchant
4sub_merchant_codeString(50)Unique identifier for sub merchant
5mrc_order_idStringMerchant order ID
6acc_nameStringNew VA account name
7collect_amount_minIntegerMinimum amount (2,000 VND)
8collect_amount_maxIntegerMaximum amount
9expire_dateStringVA expiration date

Request Example

{
"request_id": "MERCHANT050015588AXE014",
"request_time": "2020-08-11 14:41:00",
"master_merchant_code": "MASTERMERCHANT",
"sub_merchant_code": "SUBMERCHANT",
"mrc_order_id": "ORD_123456789",
"acc_name": "NGUYEN VAN A",
"collect_amount_min": 20000,
"collect_amount_max": 20000,
"expire_date": null
}

Response

(Parameters returned by Baokim to merchant)

Main Parameters

No.Field NameData TypeRequiredDescription
1codeNumber(3)Baokim error code
2messageString(200)Baokim error message
3dataObjectData returned by Baokim

Data Information

No.Field NameData TypeRequiredDescription
1order_idIntegerBaokim order ID
2mrc_order_idStringMerchant order ID
3acc_typeIntegerVA type: 1 = Dynamic, 2 = Static
4collect_amount_minIntegerMinimum amount
5collect_amount_maxIntegerMaximum amount
6expire_dateStringVA expiration date: acc_type = 1, default = NULL / acc_type = 2: required
7bank_nameStringVA bank name
8bank_branchStringBranch
9acc_noStringVA account number
10acc_nameStringVA account name
11qr_stringTextQR code string
12qr_pathStringQR code image path

Example response:

{
"code": 0,
"message": "Success",
"data": {
"order_id": 1870436,
"mrc_order_id": "ORD_123456789",
"acc_type": 1,
"collect_amount_min": 20000,
"collect_amount_max": 20000,
"expire_date": null,
"bank_name": "Ngân hàng TMCP Ngoại Thương Việt Nam (Vietcombank)",
"bank_branch": "Chi nhánh Hà Nội",
"acc_no": "01234567890123",
"acc_name": "BAOKIM NGUYEN VAN A",
"qr_string": "00020101021238550010A0000007270123000697040300000000000020386304C3A4",
"qr_path": "https://sandbox.baokim.vn/qr/BK1234567890.png"
}
}

Error Codes

Error CodeDescription
100Success
11Failed
101Baokim system error
103Signature authentication error
104JWT authentication error
422Invalid data
710Sub merchant does not exist
711Master merchant does not exist
712Sub merchant is inactive
713Master merchant is inactive