Payment Split Rules
Automatically distribute a single payment between multiple recipients using subaccounts.
Split Payments allow you to automatically distribute a single customer payment between multiple recipients (subaccounts). This is commonly used for:
- Marketplaces (vendor payout + platform commission)
- Multi-branch businesses
- Partner settlements
- Affiliate revenue sharing
Splits are configured using subaccounts and included during payment initialization. The customer pays once, and Chapa routes the defined portions to the specified subaccounts based on your split rules.
Key Concepts
Subaccount
A subaccount represents a beneficiary (vendor/partner) with settlement details and split configuration.
Create subaccounts using:
POST /v2/subaccountsThe response returns:
subaccount_reference— used later when initializing a payment.
Split Rule
Each split entry defines:
- Which subaccount receives funds (
subaccount_reference) - How much they receive (
split_type+split_value)
1) Create a Subaccount
Endpoint:
POST /v2/subaccounts
Host: api.chapa.globalExample Request:
For cURL, set PRIVATE_KEY in your shell. Replace the placeholders in the JavaScript example before running it.
{
"subaccount_name": "Acme Vendor",
"account": {
"account_number": "251911000000",
"account_name": "Abebe Kebede",
"bank_slug": "telebirr",
"bank_name": "telebirr"
},
"currency": "ETB",
"split_type": "percentage",
"split_value": 10,
"min_amount": 100,
"max_amount": 10000,
"is_primary": false
}curl -X POST 'https://api.chapa.global/v2/subaccounts' \
-H "Authorization: Bearer $PRIVATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"subaccount_name": "Acme Vendor",
"account": {
"account_number": "251911000000",
"account_name": "Abebe Kebede",
"bank_slug": "telebirr",
"bank_name": "telebirr"
},
"currency": "ETB",
"split_type": "percentage",
"split_value": 10,
"min_amount": 100,
"max_amount": 10000,
"is_primary": false
}'const response = await fetch("https://api.chapa.global/v2/subaccounts", {
method: "POST",
headers: {
"Authorization": "Bearer <PRIVATE_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"subaccount_name": "Acme Vendor",
"account": {
"account_number": "251911000000",
"account_name": "Abebe Kebede",
"bank_slug": "telebirr",
"bank_name": "telebirr"
},
"currency": "ETB",
"split_type": "percentage",
"split_value": 10,
"min_amount": 100,
"max_amount": 10000,
"is_primary": false
})
});
const data = await response.json();
console.log(data);Example Response:
{
"status": "success",
"message": "Subaccount created successfully",
"data": {
"subaccount_reference": "SUB_ABCDEF123456",
"created_at": "2025-02-02T11:30:00Z",
"updated_at": "2025-02-02T11:30:00Z"
}
}Best practice: Create subaccounts once and reuse subaccount_reference for future payments.
Create, list, and update recipients through the Subaccounts API. Subaccount operations do not require Idempotency-Key; payment initialization does.
2) Initialize a Payment With Split Rules
When initializing hosted checkout, pass a subaccounts array.
Endpoint:
POST /v2/payments/hosted
Host: api.chapa.globalExample Request (Split Payment):
For cURL, set PRIVATE_KEY in your shell. Set IDEMPOTENCY_KEY for this operation and reuse it on retries. Replace the placeholders in the JavaScript example before running it.
{
"amount": 10000,
"currency": "ETB",
"merchant_reference": "ref-1791192600",
"preferred_payment_methods": [
"telebirr"
],
"customer": {
"first_name": "Abebe",
"last_name": "Kebede",
"email": "abebe.kebede@example.com",
"phone_number": "251911000000"
},
"callback_url": "https://example.com/chapa/callback",
"return_url": "https://example.com/chapa/return",
"meta": {
"order_id": "ORD-1001"
},
"customization": {
"title": "Order #1001",
"description": "Payment for order 1001",
"logo": "https://example.com/logo.png"
},
"subaccounts": [
{
"subaccount_reference": "SUB_566492527h",
"split_type": "flat",
"split_value": 1000
}
]
}curl -X POST 'https://api.chapa.global/v2/payments/hosted' \
-H "Authorization: Bearer $PRIVATE_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency": "ETB",
"merchant_reference": "ref-1791192600",
"preferred_payment_methods": [
"telebirr"
],
"customer": {
"first_name": "Abebe",
"last_name": "Kebede",
"email": "abebe.kebede@example.com",
"phone_number": "251911000000"
},
"callback_url": "https://example.com/chapa/callback",
"return_url": "https://example.com/chapa/return",
"meta": {
"order_id": "ORD-1001"
},
"customization": {
"title": "Order #1001",
"description": "Payment for order 1001",
"logo": "https://example.com/logo.png"
},
"subaccounts": [
{
"subaccount_reference": "SUB_566492527h",
"split_type": "flat",
"split_value": 1000
}
]
}'const response = await fetch("https://api.chapa.global/v2/payments/hosted", {
method: "POST",
headers: {
"Authorization": "Bearer <PRIVATE_KEY>",
"Idempotency-Key": "<IDEMPOTENCY_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount": 10000,
"currency": "ETB",
"merchant_reference": "ref-1791192600",
"preferred_payment_methods": [
"telebirr"
],
"customer": {
"first_name": "Abebe",
"last_name": "Kebede",
"email": "abebe.kebede@example.com",
"phone_number": "251911000000"
},
"callback_url": "https://example.com/chapa/callback",
"return_url": "https://example.com/chapa/return",
"meta": {
"order_id": "ORD-1001"
},
"customization": {
"title": "Order #1001",
"description": "Payment for order 1001",
"logo": "https://example.com/logo.png"
},
"subaccounts": [
{
"subaccount_reference": "SUB_566492527h",
"split_type": "flat",
"split_value": 1000
}
]
})
});
const data = await response.json();
console.log(data);Split Types
split_type | Meaning | split_value interpretation |
|---|---|---|
percentage | Percent of the payment | Whole percentage from 1 to 100; 10 means 10% |
flat | Fixed amount | 243 means 243 cents (2.43 ETB for ETB payments) |
Use percentage for commissions and flat for fixed service charges.
Webhook Behavior for Split Payments
Split payments use the same webhook structure as normal payments.
- The primary payment webhook reports the full payment amount
- Your system should reconcile splits using:
merchant_referencemeta.order_id- The split rules you stored during initialization
Common payment events still apply:
payment.successpayment.failedpayment.cancelledpayment.partially_refundedpayment.fully_refunded
Best practice: Store the split configuration in your DB at initialization time, and use the webhook's merchant_reference to reconcile.
Refunds & Splits
Refund events are communicated via:
payment.partially_refundedpayment.fully_refunded
Recommended approach:
- Track refunded amount at the payment level
- Apply your own business logic for how refunds should affect subaccount settlement reporting (depending on your marketplace policy)
Validation Rules (Common Errors)
| HTTP | Error Code | Example Message | Meaning |
|---|---|---|---|
| 400 | INVALID_VALUE | Split type must be either 'percentage' or 'flat' | Invalid split_type |
| 400 | INVALID_VALUE | Percentage split value cannot exceed 100 | Percentage too high |
| 404 | NOT_FOUND | Subaccount not found | Invalid subaccount_reference |
| 409 | RESOURCE_CONFLICT | A subaccount with this bank account already exists | Duplicate subaccount |
Best Practices
- Create subaccounts once and reuse references
- Store
subaccount_reference+ split rules in your database - Use
Idempotency-Keywhen initializing payments to avoid duplicates - Validate splits (types, values, and business rules) before initialization
- Always verify payment success before triggering settlement or fulfillment logic
Next Steps
- Hosted Checkout - Full hosted payment integration
- Payment Webhooks - Handle payment events in real-time
- Verify Payments - Confirm payment status