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

FieldTypeDescription
externalIdstringUnique identifier for this transaction (e.g. from Moolre)
amountintegerTransaction amount in pesewas (e.g. 10000 = GHS 100.00)
currencystringCurrency code (e.g. "GHS")
routingRuleIdstring (optional)Specific rule to apply. If omitted, the first matching active rule is used.
metadataobject (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

  1. The incoming transaction is matched to the merchant's active routing rules.
  2. If a routingRuleId is provided in the request, that specific rule is used.
  3. Otherwise, the first active rule matching the transaction criteria is applied.
  4. The split engine calculates disbursements based on the rule's preset configuration.
  5. Disbursements are queued and processed asynchronously — the initial response shows PROCESSING status.
  6. Track final status via the Transactions API or webhook callbacks.