Skip to main content

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 Code and IsFull in 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 + BankNo must match the account synced at the time of the call.
  • Each request sends multiple Users in the Data array. Baokim checks each element in order, returns error on the first invalid element.
  • Operations by Type:
TypeOperation
1, 2Add a new User if the Code does not exist, or update AccountNo/BankNo if it does
3Delete User by Code. Code must exist

API Information​

Method: POST

URL: {BASE_URL}/collection/{env}/users

  • {env}: live (production) or sanbox (test)

Header: Signature — RSA-SHA1 signature of raw body (see Security).

Request​

Main Parameter Table​

Field NameData TypeRequiredDescription
RequestIdString✅Request ID, unique. Max 50 characters, alphanumeric and _, ., -
RequestTimeDatetime✅Request time. Format: YYYY-MM-DD HH:mm:ss. Time difference must not exceed 10 minutes from Baokim time
PartnerCodeString✅Partner code provided by Baokim
DataArray✅List of Users to sync, not empty

Data[]​

Field NameData TypeRequiredDescription
TypeInteger✅1, 2 = add/update, 3 = delete
UserIdString✅User ID from CashPlus side. Max 50 characters, alphanumeric and _, ., -
CodeString✅User code from CashPlus, used as User identifier. Max 100 characters, alphanumeric and _, ., -
AccountNoString✅Bank account number, digits only, 4 to 20 characters. Required even when Type=3
BankNoString✅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 NameData TypeRequiredDescription
ResponseCodeInteger✅200 = success
ResponseMessageString✅Response message
DataArray❌List of Users added/updated (does not include deleted Users). Only present when successful

Data[]​

Field NameData TypeDescription
UserIdStringUser ID
CodeStringUser code
AccountNoStringAccount number
BankNoStringBank 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 CodeDescription
200Success
11Error during Baokim processing
104RequestId or RequestTime is invalid (wrong format, duplicate RequestId, or time difference exceeds 10 minutes)
105Partner code is invalid
120Signature is invalid
127Data is invalid
128UserId is invalid
129AccountNo is invalid
130BankNo is invalid
131Type is invalid
132Code is invalid (wrong format, or Type=3 with non-existent Code)