ChapaChapa Docs

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/subaccounts

The 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.co

Example 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.co

Example 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_typeMeaningsplit_value interpretation
percentagePercent of the payment10 means 10%
flatFixed amount243 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_reference
    • meta.order_id
    • The split rules you stored during initialization

Common payment events still apply:

  • payment.success
  • payment.failed
  • payment.cancelled
  • payment.partially_refunded
  • payment.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_refunded
  • payment.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)

HTTPError CodeExample MessageMeaning
400INVALID_VALUESplit type must be either 'percentage' or 'flat'Invalid split_type
400INVALID_VALUEPercentage split value cannot exceed 100Percentage too high
404NOT_FOUNDSubaccount not foundInvalid subaccount_reference
409RESOURCE_CONFLICTA subaccount with this bank account already existsDuplicate subaccount

Best Practices

  • Create subaccounts once and reuse references
  • Store subaccount_reference + split rules in your database
  • Use Idempotency-Key when 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

On this page