Query Revenue Sharing Transactions
Process
Description:
- Partners call this API to query the disbursement orders that have occurred from collection transactions (User, Merchant, CashPlus), for reconciliation purposes.
- Each disbursement order is one row. A recipient may have multiple rows (a failed order followed by a retry, an
AUTOorder created after cutoff, a manual disbursement order). - Only data belonging to the partner of
partner_codeis returned. - Results are paginated.
API Information
Method: POST
URL: {BASE_URL}/ats/transaction-payment-share
Header: Signature — RSA-SHA1 signature of raw body (see Security).
Request
Main Parameters
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| request_id | String | ✅ | Request ID, unique. Maximum 50 characters, only letters, numbers, _, ., - |
| request_time | Datetime | ✅ | Request time. Format: YYYY-MM-DD HH:mm:ss. Must not differ by more than 10 minutes from Baokim time |
| partner_code | String | ✅ | Partner code provided by Baokim. Used for signature verification |
| sub_merchant_code | String | ❌ | Filter by sub-merchant code |
| trans_id_bk | String | ❌ | Filter by Baokim collection transaction ID (TransactionId) |
| from_date | Datetime | ❌ | Filter by creation time from. Format: YYYY-MM-DD HH:mm:ss |
| end_date | Datetime | ❌ | Filter by creation time to. Format: YYYY-MM-DD HH:mm:ss |
| page | Integer | ❌ | Page number. Default 1 |
| per_page | Integer | ❌ | Records per page, from 1 to 100. Default 15 |
Request Example
{
"request_id": "REQ20250115103000",
"request_time": "2025-01-15 10:30:00",
"partner_code": "CASHPLUS",
"trans_id_bk": "BK6AB9B10B92C04SZ",
"page": 1,
"per_page": 20
}
Response
note
HTTP 200 - Success
Main Parameters
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| response_code | Integer | ✅ | Response code. 200 = success |
| response_message | String | ✅ | Response message |
| response | Object | ❌ | Paginated result (structure like Query Merchant). Missing on error |
Revenue Sharing Transaction Information (response.data[])
Field names are kept as returned by the system (including the reconciliattion_* spelling).
| Field Name | Data Type | Description |
|---|---|---|
| trans_id_bk | String | Baokim collection transaction ID (TransactionId) |
| partner_code | String | Sub-merchant code of the transaction |
| receiver | Integer | Recipient: 1 = User, 2 = Merchant, 3 = CashPlus |
| type | Integer | Disbursement type: 1 = realtime, 2 = T+1 |
| amount | Integer | Revenue share amount (VND) |
| fee_amount | Integer | Disbursement fee (VND) |
| spend_amount | Integer | Actual amount transferred to recipient (VND) |
| account_no | String | Recipient account number |
| bank_no | String | Recipient bank code |
| memo | String | Transfer content |
| trans_id_payment | String | Baokim disbursement order ID (TransIdPayment) |
| reference_id | String | CashPlus disbursement order ID (ReferenceId). null for AUTO orders |
| source | String | Order source: PARTNER = called by CashPlus, AUTO = created automatically by Baokim after cutoff (00:05 on day T+1), MANUAL = manual disbursement |
| status_payment | Integer | Order status: 0 = T+1 awaiting settlement, 99 = processing, 200 = success, 11 = failure |
| status_payment_end | Integer | Final disbursement order status |
| reconciliattion_type | Integer | Settlement type: 1 = realtime, 2 = T+1 |
| reconciliattion_receiver | Integer | Recipient at settlement (same value table as receiver) |
| reconciliattion_status | Integer | Settlement status |
| reconciliattion_date | Date | Settlement date |
| reconciliattion_acc_no | String | Recipient account number at settlement |
| reconciliattion_bank_no | String | Recipient bank code at settlement |
| updated_end_status_at | Datetime | Time of final status update |
| store_code | String | Store code |
| created_at | Datetime | Creation time |
| updated_at | Datetime | Last update time |
Response Example
{
"response_code": 200,
"response_message": "Success",
"response": {
"current_page": 1,
"data": [
{
"trans_id_bk": "BK6AB9B10B92C04SZ",
"partner_code": "SHOP123",
"trans_id_payment": "TP2501151005010001",
"reference_id": "CPSPEND0001",
"source": "PARTNER",
"amount": 6860,
"type": 1,
"account_no": "0123******89",
"bank_no": "970436",
"receiver": 2,
"status_payment": 200,
"fee_amount": 0,
"spend_amount": 6860,
"memo": "Chi tien don hang",
"reconciliattion_type": 1,
"reconciliattion_status": null,
"reconciliattion_date": null,
"reconciliattion_acc_no": null,
"reconciliattion_bank_no": null,
"updated_end_status_at": null,
"status_payment_end": null,
"store_code": "STORE001",
"reconciliattion_receiver": 2,
"created_at": "2025-01-15 10:00:05",
"updated_at": "2025-01-15 10:00:12"
}
],
"from": 1,
"last_page": 1,
"per_page": 20,
"to": 1,
"total": 1
}
}
Error Codes
| Error Code | Description |
|---|---|
| 200 | Success |
| 11 | Error during Baokim processing |
| 104 | request_id or request_time invalid (wrong format, duplicate request_id, or differs by more than 10 minutes) |
| 105 | partner_code invalid |
| 120 | Signature invalid |
| 201 | Invalid parameter (response_message indicates which field) |