Skip to main content

Webhook Transaction Result Notification

Process​

Description:

  • For each transaction that is successfully converted / failed / or cancelled, Baokim sends a notification request to Merchant.
  • Merchant needs to build a webhook API to receive this notification.
  • Baokim will sign the data in the request sent to MERCHANT side.

API Information​

Method: POST

URL: Merchant provided

Header:

Content-Type: application/json
Signature: $signature

Request​

(Parameters sent by Baokim to Merchant)

Main Parameters Table​

No.Field NameData TypeRequiredDescription
1request_idString(100)✅Unique ID of the request
2request_timeString(20)✅Request sent time. Format: YYYY-MM-DD H:i:s
3merchant_codeString(50)✅Merchant identifier
4operationString✅Operation type: PAYMENT or REFUND
5dataObject✅Detailed transaction information

Data Information​

No.Field NameData TypeRequiredDescription
1bank_noString(6)✅Bank code on Baokim
2customer_id_numberString(12)❌Customer ID / CCCD / passport
3customer_nameString(200)❌Full customer name, no accents, with spaces
4customer_phoneString(10)✅Customer phone number
5customer_emailString(255)✅Customer email
6customer_addressString(500)❌Customer address
7product_nameString(255)❌Product name
8auth_codeString(50)✅Authorization code
9binString(50)✅Card BIN prefix
10mrc_order_idString(50)✅Merchant order code
11loan_packageObject✅Loan package information
12auth_timeString(50)✅Card payment time
13total_payment_amountInteger✅Card payment amount
14statusInteger✅Status: Conversion successful / Conversion failed / Cancellation successful / Cancellation failed
15installment_fee_amountInteger✅Installment conversion fee
16monthly_payment_amountInteger✅Monthly installment payment amount (total loan / term)
17installment_amountInteger✅Installment registered amount
18order_idInteger✅Unique order code created by Baokim
19created_atString(20)✅Order creation time
20updated_atString(20)✅Order update time

loan_package Information​

No.Field NameData TypeRequiredDescription
1loan_pack_idInteger✅Loan package ID on Baokim system
2package_nameString(255)✅Loan package name
3grace_periodInteger✅Installment term (months)
4conversion_feeDecimal✅Installment conversion fee (%)

Request Example​

{
"request_id": "MERCHANT050015588AXE012",
"request_time": "2020-08-11 14:41:00",
"merchant_code": "MERCHANT",
"operation": "PAYMENT/REFUND",
"data": {
"bank_no": "970436",
"customer_id_number": "H0119600",
"customer_name": "Nguyễn Trung Quân",
"customer_phone": "0394827170",
"customer_email": "[email protected]",
"customer_address": "40, ngách 16/255 đường Láng, Đống Đa, Hà Nội",
"product_name": "Tủ lạnh LG",
"auth_code": "1312338",
"bin": "5339682111",
"mrc_order_id": "VLAD_1753867524",
"loan_package": {
"loan_pack_id": 638,
"package_name": "6-month installment package",
"grace_period": 6,
"conversion_fee": 2.0
},
"auth_time": "2020-08-11 14:41:00",
"total_payment_amount": 10700000,
"status": 1,
"installment_fee_amount": 700000,
"monthly_payment_amount": 1188889,
"installment_amount": 10700000,
"order_id": 45467,
"created_at": "2020-08-11 14:41:00",
"updated_at": "2020-08-11 15:41:00"
}
}

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
}