Split Payment
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.coExample Request:
POST https://api.chapa.co/v2/subaccounts
Authorization: Bearer CHAPA_TEST_xxxxxxxxxxxxx
Content-Type: application/json{
"subaccount_name": "Acme Vendor Wallet",
"account": {
"account_number": "251987654152",
"account_name": "Anwar",
"bank_slug": "telebirr",
"bank_name": "telebirr Mobile Money"
},
"currency": "ETB",
"split_type": "percentage",
"split_value": 10,
"min_amount": 50,
"max_amount": 50000
}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.
2) Initialize a Payment With Split Rules
When initializing hosted checkout, pass a subaccounts array.
Endpoint:
POST /v2/payments/hosted
Host: api.chapa.coExample Request (Split Payment):
POST https://api.chapa.co/v2/payments/hosted
Authorization: Bearer CHAPA_TEST_xxxxxxxxxxxxx
Content-Type: application/json{
"amount": 25000,
"currency": "ETB",
"merchant_reference": "ORDER_1001",
"subaccounts": [
{
"subaccount_reference": "SUB_REF_001",
"split_type": "percentage",
"split_value": 10
},
{
"subaccount_reference": "SUB_REF_002",
"split_type": "flat",
"split_value": 243
}
],
"meta": {
"order_id": "ORD-99887",
"notes": "Hosted payment with split rules"
}
}Split Types
split_type | Meaning | split_value interpretation |
|---|---|---|
percentage | Percent of the payment | 10 means 10% |
flat | Fixed amount | 243 means 243 in the payment currency |
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
- Accept Payments - Full hosted payment integration
- Webhooks - Handle payment events in real-time
- Verify Payments - Confirm payment status