Sync User Account
Process
Description:
- CashPlus calls this API to sync User receiving accounts (bank accounts) to Baokim.
- Baokim uses this information to:
- Identify the User when receiving collection transactions (fields
CodeandIsFullin Collection Webhook). - Verify the User account at share amount registration (if provided) and when calling a disbursement order for the User: the order's
Code+AccountNo+BankNomust match the account synced at the time of the call.
- Identify the User when receiving collection transactions (fields
- Each request sends multiple Users in the
Dataarray. Baokim checks each element in order, returns error on the first invalid element. - Operations by
Type:
| Type | Operation |
|---|---|
| 1, 2 | Add a new User if the Code does not exist, or update AccountNo/BankNo if it does |
| 3 | Delete User by Code. Code must exist |
API Information
Method: POST
URL: {BASE_URL}/collection/{env}/users
{env}:live(production) orsanbox(test)
Header: Signature — RSA-SHA1 signature of raw body (see Security).
Request
Main Parameter Table
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| RequestId | String | ✅ | Request ID, unique. Max 50 characters, alphanumeric and _, ., - |
| RequestTime | Datetime | ✅ | Request time. Format: YYYY-MM-DD HH:mm:ss. Time difference must not exceed 10 minutes from Baokim time |
| PartnerCode | String | ✅ | Partner code provided by Baokim |
| Data | Array | ✅ | List of Users to sync, not empty |
Data[]
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| Type | Integer | ✅ | 1, 2 = add/update, 3 = delete |
| UserId | String | ✅ | User ID from CashPlus side. Max 50 characters, alphanumeric and _, ., - |
| Code | String | ✅ | User code from CashPlus, used as User identifier. Max 100 characters, alphanumeric and _, ., - |
| AccountNo | String | ✅ | Bank account number, digits only, 4 to 20 characters. Required even when Type=3 |
| BankNo | String | ✅ | 6-digit bank code (e.g. 970436), must be in Baokim's supported bank list. Required even when Type=3 |
Request Example
{
"RequestId": "CP20250115103000",
"RequestTime": "2025-01-15 10:30:00",
"PartnerCode": "CASHPLUS",
"Data": [
{
"Type": 1,
"UserId": "100245",
"Code": "USER001",
"AccountNo": "9876543210",
"BankNo": "970416"
},
{
"Type": 3,
"UserId": "100246",
"Code": "USER002",
"AccountNo": "0123456789",
"BankNo": "970436"
}
]
}
Response
note
HTTP 200 - Success
Main Parameter Table
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| ResponseCode | Integer | ✅ | 200 = success |
| ResponseMessage | String | ✅ | Response message |
| Data | Array | ❌ | List of Users added/updated (does not include deleted Users). Only present when successful |
Data[]
| Field Name | Data Type | Description |
|---|---|---|
| UserId | String | User ID |
| Code | String | User code |
| AccountNo | String | Account number |
| BankNo | String | Bank code |
Response Example
{
"ResponseCode": 200,
"ResponseMessage": "Success",
"Data": [
{
"UserId": "100245",
"Code": "USER001",
"AccountNo": "9876543210",
"BankNo": "970416"
}
]
}
Error Response Example
{
"ResponseCode": 129,
"ResponseMessage": "AccountNo is invalid"
}
Error Codes
| Error Code | Description |
|---|---|
| 200 | Success |
| 11 | Error during Baokim processing |
| 104 | RequestId or RequestTime is invalid (wrong format, duplicate RequestId, or time difference exceeds 10 minutes) |
| 105 | Partner code is invalid |
| 120 | Signature is invalid |
| 127 | Data is invalid |
| 128 | UserId is invalid |
| 129 | AccountNo is invalid |
| 130 | BankNo is invalid |
| 131 | Type is invalid |
| 132 | Code is invalid (wrong format, or Type=3 with non-existent Code) |