Skip to main content

Webhook Transaction Notification

Flow​

Description: Baokim sends transaction result notification to Merchant after receiving payment from customer via VA.

API Information​

Method: POST

URL (URL configured by Merchant with Baokim)

Request Headers:

HeaderDesscription
SignatureChữ ký số để xác thực tính toàn vẹn dữ liệu

Request​

(Parameters Baokim sends to Merchant)

Main Parameters Table​

No.Field NameData TypeRequiredDescription
1request_idString(50)✅Unique request ID from Baokim to Merchant
2request_timeDatetime✅Request sent time. Format: YYYY-MM-DD H:m:s
3merchant_codeString(30)✅Merchant identifier on Baokim system
4store_codeString❌Store code
5staff_codeString❌Staff code
6signatureString✅Digital signature to authenticate request from Baokim
7transactionObject✅Transaction information
8va_infoObject✅VA account information

Transaction Information​

No.Field NameData TypeRequiredDescription
1idInteger✅Baokim transaction ID
2order_idInteger✅Order ID linked
3mrc_order_idString(50)✅Merchant's order ID
4typeInteger✅1 = Payment, 2 = Refund
5payment_methodInteger✅1 = VA
6merchant_feeInteger✅Merchant fee
7user_feeInteger✅User fee
8total_amountInteger✅Total transaction amount (includes fees)
9amountInteger✅Amount merchant receives
10descriptionString❌Transaction description
11statusInteger✅1 = Success
12bank_codeString(19)❌Bank code
13completed_atDatetime✅Completion time
14created_atDatetime✅Creation time
15updated_atDatetime✅Update time

VA Account Information​

No.Field NameData TypeRequiredDescription
1bank_nameString(255)✅VA bank name
2bank_branchString(255)❌Bank branch
3acc_noString(50)✅Account identifier number
4acc_nameString(255)✅Recipient name
5qr_stringString✅QR string format
6qr_pathString✅QR image path

Request Example​

{
"request_id": "req_20250717154500123",
"request_time": "2025-07-07 12:00:00",
"merchant_code": "MERCHANT001",
"store_code": "STORE001",
"staff_code": "STORE001",
"transaction": {
"id": 555002,
"order_id": 987654322,
"mrc_order_id": "ORDER20250717_002",
"type": 1,
"payment_method": 1,
"merchant_fee": 10000,
"user_fee": 0,
"total_amount": 2000000,
"amount": 1990000,
"description": "Thanh toán đơn hàng qua tài khoản định danh (VA)",
"status": 1,
"bank_code": "VCB",
"completed_at": "2025-07-17 15:45:00",
"created_at": "2025-07-17 15:43:00",
"updated_at": "2025-07-17 15:45:00"
},
"va_info": {
"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/BK987654322.png"
},
"signature": "0xd329a892110ff6a76cdaf650f6e78fcdf1a79eb0c9f6a5a91bd6aa12be223c05"
}

Response​

(Merchant's reply to Baokim)

Main Parameters Table​

No.Field NameData TypeRequiredDescription
1codeInteger✅Result code. 0, 100 or 200 = Success
2messageString✅Processing result message
3dataObject❌Returned data (if any)

Response Example​

{
"code": 200,
"message": "Successfully",
"data": null
}