Split payments
Update Subaccount
Change a split recipient account or split rule.
PUT /v2/subaccounts/{subaccountReference}
Host: api.chapa.global
Authorization: Bearer <PRIVATE_KEY>
Content-Type: application/jsonAll fields are optional; send only the changes. Accepted fields are account with account_number, account_name, bank_slug, and bank_name, plus split_type and split_value.
percentage uses whole percentages from 1 to 100; flat uses cents. Updates do not require Idempotency-Key.
Example Request
For cURL, set PRIVATE_KEY in your shell. Replace the placeholders in the JavaScript example before running it.
JSON
{
"account": {
"account_number": "251911000000",
"account_name": "Abebe Kebede",
"bank_slug": "telebirr",
"bank_name": "telebirr"
},
"split_type": "percentage",
"split_value": 15
}cURL
curl -X PUT 'https://api.chapa.global/v2/subaccounts/SUB_566492527h' \
-H "Authorization: Bearer $PRIVATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"account": {
"account_number": "251911000000",
"account_name": "Abebe Kebede",
"bank_slug": "telebirr",
"bank_name": "telebirr"
},
"split_type": "percentage",
"split_value": 15
}'JavaScript
const response = await fetch("https://api.chapa.global/v2/subaccounts/SUB_566492527h", {
method: "PUT",
headers: {
"Authorization": "Bearer <PRIVATE_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"account": {
"account_number": "251911000000",
"account_name": "Abebe Kebede",
"bank_slug": "telebirr",
"bank_name": "telebirr"
},
"split_type": "percentage",
"split_value": 15
})
});
const data = await response.json();
console.log(data);Example Response
200 Success
{
"status": "success",
"message": "Subaccount updated successfully",
"data": {
"subaccount_reference": "SUB_566492527h",
"created_at": "2026-10-05T09:30:00Z",
"updated_at": "2026-10-05T09:30:00Z"
}
}400 Error
{
"status": "error",
"message": "Flat split value must be greater than 0",
"error": {
"code": "INVALID_VALUE",
"details": null
}
}401 Error
{
"status": "error",
"message": "Invalid API key or User does not exist",
"error": {
"code": "UNAUTHORIZED",
"details": null
}
}403 Error
{
"status": "error",
"message": "API key environment does not match business environment.",
"error": {
"code": "INVALID_VALUE",
"details": null
}
}404 Error
{
"status": "error",
"message": "Subaccount not found",
"error": {
"code": "NOT_FOUND",
"details": null
}
}500 Error
{
"status": "error",
"message": "Failed to update subaccount",
"error": {
"code": "PROCESSING_FAILED",
"details": null
}
}