Skip to main content

Baokim Webhook notice transaction status

API VA Flow

Path

  • URL: ``
  • Method: ``
  • Description: Baokim Webhook notice transaction status.

Baokim Request

Request Tables

ParamsData Type + LengthRequiredDescription
request_idstring(50)YesThe unique code that corresponds to an upload request.
Format: MerchantCode + BK + YYYYMMDD + UniqueId Table
request_timestring(19)YesThe timestamp for sending the request from Merchant. Format: YYYY-MM-DD HH:MM:SS
reference_idstring(50)YesIf transaction_type = 1, reference_id in response of Webhook notice transaction status
If transaction_type = 2, reference_id in request of API Create FX transaction
If transaction_type = 3, reference_id in response of Webhook notice transaction status
If transaction_type = 4, reference_id in request of API Create Disbursement Transaction
If transaction_type = 5, reference_id in request of Webhook notice transaction status
If transaction_type = 6, reference_id in request of API Create Order Refund
If transaction_type = 7, reference_id in request of Webhook notice transaction status
transaction_idstring(50)YesTransactionID of Baokim
transaction_timestring(19)YesTime when transaction is recorded by Baokim. Format: YYYY-MM-DD HH:MM:SS
transaction_typeint(1)YesType of transaction:
1. Collection transaction
2. FX transaction
3. Deposit transaction
4. Disbursement
5. Disbursement Refund
6. Order Refund
7. Fee
transaction_statusint(4)YesThe transaction status
200: Success
11: Fail
99: Pending
201: Cancelled
transaction_payment_methodstring(20)YesWhen transaction_type = 1,
The payment method of the transaction is VA/ATM/CREDIT/QRCODE
The other transaction_type, send null
transaction_merchant_feedecimal(10,3)YesFees charged to Merchant on each transaction. And it will be deducted into amount when the transaction is occurring
transaction_remitter_feedecimal(10,3)YesFees charged to Remitter when transferring the fund. And it will be deducted into amount when the transaction is occurring
bene_bank_nostring(20)YesThis is the bank of beneficiary. bank_no in the response of API Get bank list
bene_acc_nostring(22)YesThis is the account number of beneficiary
bene_acc_namestring(50)YesFull bank account name of the beneficiary
bene_acc_typeint(1)YesThis is the account type of beneficiary. 0 for bank account number, 1 for bank card number
amountdecimal(18,2)YesThe amount that is requested to disburse to beneficiary, to do FX. Or the amount collected into VA
actual_bene_amountdecimal(18,2)YesActual amount transferred to the beneficiary.
exchange_ratedecimalYesThe exchange rate of the transaction. If there is no FX, return exchange rate=1
exchange_amountdecimal(18,2)YesThe amount after FX conversion into target currency
request_currencystring(50)YesThe currency code of the request FX. Ex: VND, USD
target_currencystring(50)YesThe currency code of the target FX. Ex: VND, USD
memostring(50)YesIf transaction_type = 1, return memo with the structure:.
For example: NGUYEN VAN A transfers money (970423, 02050895023, NGUYEN VAN A).
If transaction type = 4, return memo of Disbursement request
refunded_reference_idstring(16)YesWhen transaction_type = 5 or transaction_type = 6, it is the reference_id of transaction which is refunded
detail_statusstring(200)YesDetail description of the error code from Baokim

Request Example

{
"request_id": "BK2023110612345",
"request_time": "2023-11-06 15:30:45",
"reference_id": "BK2023110698765",
"transaction_id": "BK2023110698765",
"transaction_time": "2023-11-06 15:30:45",
"transaction_type": 1,
"transaction_status": 1,
"transaction_payment_method": "AAA",
"transaction_merchant_fee": 10.500,
"transaction_remitter_fee": 5.000,
"bene_bank_no": "970423",
"bene_acc_no": "123456789012",
"bene_acc_name": "John Doe",
"bene_acc_type": 1,
"amount": 100000.00,
"actual_bene_amount": 98000.00,
"exchange_rate": 1,
"exchange_amount": 98000.00,
"request_currency": "VND",
"target_currency": "VND",
"memo": "NGUYEN VAN A transfers money (970423 123456789012)",
"refunded_reference_id": "DISB1234567890",
"detail_status": "Success"
}

Response

Response Tables

ParamsData TypeDescription
response_codeint(4)Error code from Baokim as per Error Codes Table
response_messagestring(200)Description of the error code from Baokim as per Error Codes Table
reference_idstring(50)Unique transaction ID in the MERCHANT system

Example JSON Response

{
"response_code": 200,
"response_message": "Transaction successful",
"reference_id": "Bk12345"
}

Error Code

Response CodeResponse Message
200Success
11Failed
101System Error