Create Disbursement Transaction
Path
- URL:
/cb-core/api/v1/disbursement/create-transaction - Method:
POST - Description: This API allows you to create disbursement transaction.
Request
Request table
| Params | Data Type | Required | Description |
|---|---|---|---|
| request_id | string(50) | Yes | The only code that corresponds to an upload request. Proposed format: MerchantCode + BK + YYYYMMDD + UniqueId |
| request_time | string(19) | Yes | Time to send request from merchant. Format: YYYY-MM-DD HH:MM:SS |
| merchant_code | string(20) | Yes | Merchant code provided by Baokim before integration |
| sub_merchant_code | string(50) | Yes | Code for sub-merchant, or your Merchant code if seller is direct |
| reference_id | string(50) | Yes | Transaction code sent by the merchant |
| bene_bank_no | string(6) | Yes | This is the bank of beneficiary. Fill bank_no in the response of API Get bank list |
| bene_acc_no | string(22) | Yes | This is the account number of beneficiary |
| bene_acc_type | int(1) | Yes | This is the account type of beneficiary. Fill 0 for bank account number, 1 for bank card number |
| bene_amount | decimal(18,2) | Yes | The amount that beneficiary can receive after completing disbursement transaction |
| memo | string(100) | No | Money transfer contents |
| currency_code | string(10) | Yes | The currency code of disbursement transaction. Fill VND for VND transaction |
| disbursement_purpose | int(1) | Yes | 1. To settle in to merchant's account 2. To disburse |
| trade_type | string(255) | No | Type 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
| Params | Data Type | Description |
|---|---|---|
| response_code | int(4) | Error code from Baokim as per Error Codes Table |
| response_message | string(200) | Description of the error code from Baokim as per Error Codes Table |
| reference_id | string(50) | Merchant information posted |
| transaction_id | string(50) | Transaction code recorded on Baokim side |
| transaction_time | string(50) | Finishing time on Baokim side. Format: YYYY-MM-DD HH:MM:SS |
| bene_bank_no | string(6) | This is the bank of beneficiary. Fill bank_no in the response of API Get bank list |
| bene_acc_no | string(22) | This is the account number of beneficiary. |
| bene_acc_name | string(50) | Full bank account name of the beneficiary |
| bene_acc_type | int(1) | This is the account type of beneficiary. Fill 0 for bank account number, 1 for bank card number |
| bene_amount | decimal(18,2) | The amount that beneficiary can receive after completing disbursement transaction |
| actual_bene_amount | decimal(18,2) | Actual amount transferred to the beneficiary. Will be less than bene_amount in request if there is disbursement fee for beneficiary |
| detail_status | string(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 Code | Response Message |
|---|---|
| 200 | Success |
| 99 | Pending |
| 11 | Failed |
| 101 | System Error |
| 110 | Merchant Code Invalid |
| 120 | Invalid Signature |
| 422 | Validation Error |
| 128 | Error processing from bank |
| 129 | Insufficient disbursement limit or expired guarantee period |
| 130 | Exceeded transfer limit on day |