Disbursement Result Webhook
Process
Description:
- Baokim sends a webhook to CashPlus when a disbursement order has a final result:
Status=200(success) orStatus=11(failure). - Applies to all orders:
| Order | Source | ReferenceId | When sent |
|---|---|---|---|
| Realtime order called by CashPlus | PARTNER | The order's own | When the final result is available, even if 200/11 was already returned in the response |
T+1 order called by CashPlus (Merchant Type=2, CashPlus) | PARTNER | The order's own | After the T+1 settlement period has been processed |
| Order created automatically by Baokim at 00:05 on day T+1 for undisbursed amounts | AUTO | null | After the T+1 settlement period has been processed |
Manual disbursement order (order at 99 past cutoff that then failed, or T+1 order that failed during settlement) | MANUAL | The original order's | When Baokim completes the manual disbursement, with a new TransIdPayment. Receiver is the actual recipient: the original receiver, or 2 (Merchant) if the original order had Retryable=false or re-disbursement failed |
- Each order has one final result. Due to retry mechanism, CashPlus may receive the same webhook multiple times → process idempotently by
TransIdPayment. - The order of webhooks across different orders is not guaranteed.
Retry:
- Baokim considers success when CashPlus returns HTTP 200 with JSON body
ResponseCode=200within 30 seconds. - Otherwise, Baokim retries: up to 6 times (1 initial + 5 retries), at least 1 minute apart.
- After exhausting retries without success, CashPlus uses Query Disbursement Result (for
AUTOorders: query byTransactionId).
API Information
Method: POST
URL: Disbursement result webhook URL provided by CashPlus to Baokim.
Header: Signature — RSA-SHA1 signature of raw body using Baokim's private key. CashPlus verifies using Baokim's public key (see Security).
Request
(Baokim sends to CashPlus)
Main Parameters
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| RequestId | String | ✅ | Request ID |
| RequestTime | Datetime | ✅ | Send time. Format: YYYY-MM-DD HH:mm:ss |
| PartnerCode | String | ✅ | Sub-merchant code of the collection transaction |
| TransactionId | String | ✅ | Collection transaction ID |
| ReferenceId | String | ❌ | CashPlus disbursement order ID. null for AUTO orders |
| TransIdPayment | String | ✅ | Baokim disbursement order ID |
| Source | String | ✅ | PARTNER, AUTO, or MANUAL |
| Receiver | Integer | ✅ | Recipient: 1 = User, 2 = Merchant, 3 = CashPlus |
| Type | Integer | ✅ | Disbursement type: 1 = realtime, 2 = T+1 |
| Status | Integer | ✅ | 200 = success, 11 = failure |
| ErrorCode | String | ❌ | Detailed error code when Status=11 (see Error Codes) |
| Retryable | Boolean | ❌ | Only present when Status=11 |
| Code | String | ❌ | User code (User orders) |
| RequestAmount | Integer | ✅ | Requested amount |
| FeeAmount | Integer | ✅ | Disbursement fee |
| SpendAmount | Integer | ✅ | Actual amount transferred |
| AccountNo | String | ✅ | Recipient account number |
| BankNo | String | ✅ | Recipient bank code |
| CreatedAt | Datetime | ✅ | Order creation time |
| UpdatedAt | Datetime | ✅ | Time the final result was reached |
Request Example — Order called by CashPlus
{
"RequestId": "BK20250115100512",
"RequestTime": "2025-01-15 10:05:12",
"PartnerCode": "SHOP123",
"TransactionId": "BK6AB9B10B92C04SZ",
"ReferenceId": "CPSPEND0001",
"TransIdPayment": "TP2501151005010001",
"Source": "PARTNER",
"Receiver": 2,
"Type": 1,
"Status": 200,
"ErrorCode": null,
"Code": null,
"RequestAmount": 6860,
"FeeAmount": 0,
"SpendAmount": 6860,
"AccountNo": "0123******89",
"BankNo": "970436",
"CreatedAt": "2025-01-15 10:05:01",
"UpdatedAt": "2025-01-15 10:05:10"
}
Request Example — AUTO order
{
"RequestId": "BK20250116103015",
"RequestTime": "2025-01-16 10:30:15",
"PartnerCode": "SHOP123",
"TransactionId": "BK6AB9B10B92C04SZ",
"ReferenceId": null,
"TransIdPayment": "TP2501152350590003",
"Source": "AUTO",
"Receiver": 2,
"Type": 2,
"Status": 200,
"ErrorCode": null,
"Code": null,
"RequestAmount": 7150,
"FeeAmount": 0,
"SpendAmount": 7150,
"AccountNo": "0123******89",
"BankNo": "970436",
"CreatedAt": "2025-01-15 23:50:59",
"UpdatedAt": "2025-01-16 10:30:00"
}
Response
(CashPlus returns to Baokim)
note
HTTP 200 - Success
Main Parameters
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| ResponseCode | Integer | ✅ | 200 = received. Other codes → Baokim retries |
| ResponseMessage | String | ✅ | Message |
Response Example
{
"ResponseCode": 200,
"ResponseMessage": "Success"
}
CashPlus Processing
- Verify
Signature. Invalid signature → do not process, returnResponseCode!=200. - Already processed this
TransIdPaymentbefore → returnResponseCode=200, do not reprocess. Status=200→ record successful disbursement.Status=11:Retryable=trueand still before cutoff: may call a new Disbursement order with a newReferenceId. If not called, that share goes to the Merchant on T+1.Retryable=false: do not retry. For User orders: notify the customer; the User share goes to the Merchant on T+1.- Order at
99past cutoff that then failed: cannot be retried (past cutoff). Baokim will disburse manually and send an additional webhook withSource=MANUAL.
Source=AUTO→ record that the transaction's undisbursed amount has been settled to the Merchant.Source=MANUALwith aReceiverdifferent from the original order → the share has been disbursed to the Merchant instead of the original receiver. For User orders: notify the customer.