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_timeDatetimeRequest sent time. Format: YYYY-MM-DD H:m:s
3merchant_codeString(30)Merchant identifier on Baokim system
4store_codeStringStore code
5staff_codeStringStaff code
6signatureStringDigital signature to authenticate request from Baokim
7transactionObjectTransaction information
8va_infoObjectVA account information

Transaction Information

No.Field NameData TypeRequiredDescription
1idIntegerBaokim transaction ID
2order_idIntegerOrder ID linked
3mrc_order_idString(50)Merchant's order ID
4typeInteger1 = Payment, 2 = Refund
5payment_methodInteger1 = VA
6merchant_feeIntegerMerchant fee
7user_feeIntegerUser fee
8total_amountIntegerTotal transaction amount (includes fees)
9amountIntegerAmount merchant receives
10descriptionStringTransaction description
11statusInteger1 = Success
12bank_codeString(19)Bank code
13completed_atDatetimeCompletion time
14created_atDatetimeCreation time
15updated_atDatetimeUpdate 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_stringStringQR string format
6qr_pathStringQR 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"
}