Skip to main content

Create VA

Process

API Information

Method: POST

URL: /api/merchant-hosted/bank-transfer/create

Request

(Parameters sent by the partner)

Main Parameters Table

No.Field NameData TypeRequiredDescription
1request_idString(50)Unique request ID. Suggested format: MerchantCode+YYYYMMDDHHIISS+UniqueId
2request_timeDatetimeRequest sent time. Format: YYYY-MM-DD H:m:s
3merchant_codeString(30)Partner merchant code
4acc_nameString(50)Account name
5acc_typeIntegerVA type: 1 = Dynamic, 2 = Static
6store_codeString(50)Store code
7staff_codeString(50)Staff code
8bank_codeStringBank code to create VA account (default null)
9collect_amount_minIntegerMinimum collection amount (minimum 2,000 VND). acc_type=1: min=max / acc_type=2: null
10collect_amount_maxIntegerMaximum collection amount (unlimited)
11mrc_order_idString(25)Unique merchant order code
12expire_dateDatetimePayment expiration date. Format: YYYY-MM-DD H:m:s. acc_type=1: default 24h / acc_type=2: required
13memoString(255)Transfer memo

Request Example

{
"request_id": "MERCHANT123_20250717104530_0001",
"request_time": "2025-07-17 10:45:30",
"merchant_code": "MERCHANT123",
"store_code": "STORE001",
"staff_code": "NV001",
"bank_code": null,
"acc_name": "Nguyen Van A",
"acc_type": 1,
"collect_amount_min": 30000000,
"collect_amount_max": 30000000,
"mrc_order_id": "ORD123456789",
"expire_date": "2025-07-20 23:59:59",
"memo": "Thanh toan don hang ORD123456789"
}

Response

(Parameters returned by Baokim)

Main Parameters Table

No.Field NameData TypeRequiredDescription
1codeInteger(3)Baokim error code
2messageString(100)Error code description
3dataObjectData returned

Data Information

No.Field NameData TypeRequiredDescription
1mrc_order_idString(25)Merchant order code sent by partner
2acc_typeIntegerVA type: 1 = Dynamic, 2 = Static
3collect_amount_minIntegerMinimum collection amount (minimum 2,000 VND)
4collect_amount_maxIntegerMaximum collection amount (unlimited)
5expire_dateDatetimePayment expiration date. Format: YYYY-MM-DD H:m:s
6bank_nameString(100)Bank name
7bank_branchString(100)Bank branch
8acc_noString(22)Account number
9acc_nameString(50)Account holder name
10qr_stringTextQR string
11qr_pathString(100)QR image path
12order_idIntegerBaokim transaction code

Response Example

{
"code": 0,
"message": "Success",
"data": {
"mrc_order_id": "ORD123456789",
"order_id": 1111313,
"acc_type": 1,
"collect_amount_min": 30000000,
"collect_amount_max": 30000000,
"expire_date": "2025-07-20 23:59:59",
"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": "0123456789012",
"acc_name": "Nguyen Van A",
"qr_string": "00020101021238550010A0000007270123000697040300000000000020386304C3A4",
"qr_path": "https://sandbox.Baokim.vn/qr/BK1234567890.png"
}
}

Error Codes

codemessage
100Success
101System error
102Provider error
104JWT authentication error
105Invalid digital signature
106Order amount is insufficient for refund
107Order cannot be refunded
108Order cannot be cancelled
109Order does not exist
110Merchant order code already exists
422Validation error