Skip to main content

Create Disbursement Transaction

API VA Flow

Path

  • URL: /cb-core/api/v1/disbursement/create-transaction
  • Method: POST
  • Description: This API allows you to create disbursement transaction.

Request

Request table

ParamsData TypeRequiredDescription
request_idstring(50)YesThe only code that corresponds to an upload request.
Proposed format: MerchantCode + BK + YYYYMMDD + UniqueId
request_timestring(19)YesTime to send request from merchant. Format: YYYY-MM-DD HH:MM:SS
merchant_codestring(20)YesMerchant code provided by Baokim before integration
sub_merchant_codestring(50)YesCode for sub-merchant, or your Merchant code if seller is direct
reference_idstring(50)YesTransaction code sent by the merchant
bene_bank_nostring(6)YesThis is the bank of beneficiary.
Fill bank_no in the response of API Get bank list
bene_acc_nostring(22)YesThis is the account number of beneficiary
bene_acc_typeint(1)YesThis is the account type of beneficiary.
Fill 0 for bank account number, 1 for bank card number
bene_amountdecimal(18,2)YesThe amount that beneficiary can receive after completing disbursement transaction
memostring(100)NoMoney transfer contents
currency_codestring(10)YesThe currency code of disbursement transaction.
Fill VND for VND transaction
disbursement_purposeint(1)Yes1. To settle in to merchant's account
2. To disburse
trade_typestring(255)NoType of trade

Request Example

{
"request_id": "MerchantCodeBK20231106UniqueId",
"request_time": "2024-11-06 10:15:30",
"merchant_code": "BAOKIM",
"sub_merchant_code": "BAOKIM1",
"reference_id": "TXN-987654321",
"bene_bank_no": "001122",
"bene_acc_no": "1234567890123456789012",
"bene_acc_type": 0,
"bene_amount": 100000.00,
"memo": "Payment for services",
"currency_code": "VND",
"disbursement_purpose": 1,
"trade_type": "Foo"
}

Response

Response table

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)Merchant information posted
transaction_idstring(50)Transaction code recorded on Baokim side
transaction_timestring(50)Finishing time on Baokim side. Format: YYYY-MM-DD HH:MM:SS
bene_bank_nostring(6)This is the bank of beneficiary. Fill bank_no in the response of API Get bank list
bene_acc_nostring(22)This is the account number of beneficiary.
bene_acc_namestring(50)Full bank account name of the beneficiary
bene_acc_typeint(1)This is the account type of beneficiary. Fill 0 for bank account number, 1 for bank card number
bene_amountdecimal(18,2)The amount that beneficiary can receive after completing disbursement transaction
actual_bene_amountdecimal(18,2)Actual amount transferred to the beneficiary. Will be less than bene_amount in request if there is disbursement fee for beneficiary
detail_statusstring(200)Detail description of the error code from Baokim

Response Example

{
"response_code": 200,
"response_message": "Success",
"reference_id": "MerchantRef12345",
"transaction_id": "BKTrans987654321",
"transaction_time": "2024-11-06 10:15:30",
"bene_bank_no": "001122",
"bene_acc_no": "1234567890123456789012",
"bene_acc_name": "John Doe",
"bene_acc_type": 0,
"bene_amount": 100000.00,
"actual_bene_amount": 95000.00,
"detail_status": "Success"
}

Error Code

Response CodeResponse Message
200Success
99Pending
11Failed
101System Error
110Merchant Code Invalid
120Invalid Signature
422Validation Error
128Error processing from bank
129Insufficient disbursement limit or expired guarantee period
130Exceeded transfer limit on day