API Reference
Splits API
Trigger split executions and batch operations via the Orchestrator API.
POST /api/v1/split
Initiates a single split execution. The Orchestrator matches the incoming transaction to an active routing rule and processes disbursements accordingly.
Request Body
{
"externalId": "order_12345",
"amount": 10000,
"currency": "GHS",
"routingRuleId": "rule_id",
"metadata": {
"orderId": "ord_67890",
"customerId": "cust_111"
}
}Request Fields
| Field | Type | Description |
|---|---|---|
| externalId | string | Unique identifier for this transaction (e.g. from Moolre) |
| amount | integer | Transaction amount in pesewas (e.g. 10000 = GHS 100.00) |
| currency | string | Currency code (e.g. "GHS") |
| routingRuleId | string (optional) | Specific rule to apply. If omitted, the first matching active rule is used. |
| metadata | object (optional) | Arbitrary key-value pairs passed through to webhooks and logs |
POST /api/v1/split/batch
Executes multiple splits in a single request. Each item is processed independently — partial failures are reported per item.
Request Body
{
"items": [
{
"externalId": "order_111",
"amount": 5000,
"currency": "GHS"
},
{
"externalId": "order_222",
"amount": 15000,
"currency": "GHS"
}
]
}Response
Split Response
{
"transactionId": "txn_id",
"externalId": "order_12345",
"status": "PROCESSING",
"disbursements": [
{
"recipientType": "MOMO",
"destination": "233501234567",
"amount": 7000,
"status": "QUEUED"
},
{
"recipientType": "BANK",
"destination": "1234567890",
"bankCode": "GH120100",
"amount": 3000,
"status": "QUEUED"
}
]
}How Routing Rules Are Triggered
- The incoming transaction is matched to the merchant's active routing rules.
- If a
routingRuleIdis provided in the request, that specific rule is used. - Otherwise, the first active rule matching the transaction criteria is applied.
- The split engine calculates disbursements based on the rule's preset configuration.
- Disbursements are queued and processed asynchronously — the initial response shows
PROCESSINGstatus. - Track final status via the Transactions API or webhook callbacks.