Skip to main content
Calling this endpoint creates a payment file containing one or more transactions. The file starts in the PREVIEW-AND-APPROVE state — nothing is sent until you approve it. If you set requires_approval to "NO", Kulmi Pay approves and queues the file immediately after creation. You must have the add_files permission on your API token to call this endpoint.

Request

POST https://app.kulmipay.com/api/v1/send-money/initiation/
Authorization
string
required
Bearer token. Format: Bearer <token>.
currency
string
required
The currency to disburse. Use "KES" for Kenyan shillings.
provider
string
required
The payment provider to route the disbursement through. One of:
ValueDescription
MPESA-B2CSend to an M-Pesa mobile wallet
MPESA-B2BPay to an M-Pesa PayBill or Till number
PESALINKTransfer to a Kenyan bank account
P2PTransfer between Kulmi Pay wallets
AIRTIMETop up mobile airtime
RTGSHigh-value real-time gross settlement
requires_approval
string
default:"YES"
Whether the file requires a manual approval step before processing. Set to "NO" to skip approval and process immediately. Accepted values: "YES", "NO".
wallet_id
string
The ID of a specific wallet to debit. If omitted, Kulmi Pay uses your default KES settlement wallet. Use this when you have multiple wallets and need to debit a specific one.
batch_reference
string
Your internal reference for this batch, such as a payroll run ID or invoice number. Returned as-is in status and webhook responses.
callback_url
string
A URL to receive webhook notifications when the file or individual transaction statuses change. Must be HTTPS.
transactions
array
required
List of transactions to include in this file. You can include one or many recipients in a single request.

Response

A successful request returns HTTP 201 with the newly created file object.
file_id
string
The unique identifier for this payment file. Use this when calling the approve or cancel endpoints.
tracking_id
string
A UUID you can use to look up this file’s status. Use this with the status endpoint.
status
string
The current file state. Starts as PREVIEW-AND-APPROVE when approval is required, or moves to PROCESSING when requires_approval is "NO".
total_amount
string
The sum of all transaction amounts in this file, as a string.
transactions_count
number
The number of transactions in the file.
transactions
array
The list of transactions created for this file. Each transaction includes a transaction_id and its current status.
wallet
object
The wallet that will be (or has been) debited for this file.
charge_estimate
string
Estimated transaction charges for this file.
total_amount_estimate
string
Estimated total deduction including charges.
batch_reference
string
Your batch reference, as submitted.
created_at
string
ISO 8601 timestamp when the file was created.

Examples

curl -X POST https://app.kulmipay.com/api/v1/send-money/initiation/ \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "currency": "KES",
    "provider": "MPESA-B2C",
    "requires_approval": "NO",
    "transactions": [
      {
        "account": "254712345678",
        "amount": "1000",
        "name": "John Doe",
        "narrative": "Salary - January"
      }
    ]
  }'

Sample response

{
  "file_id": "f8a2b1c3-...",
  "tracking_id": "d9e4f5a6-...",
  "status": "PROCESSING",
  "batch_reference": null,
  "total_amount": "1000.00",
  "transactions_count": 1,
  "charge_estimate": "33.00",
  "total_amount_estimate": "1033.00",
  "wallet": {
    "currency": "KES",
    "wallet_type": "SETTLEMENT"
  },
  "transactions": [
    {
      "transaction_id": "t1a2b3c4-...",
      "status": "PENDING",
      "account": "254712345678",
      "amount": "1000",
      "name": "John Doe",
      "narrative": "Salary - January",
      "idempotency_key": null
    }
  ],
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
When sending to a bank account via PesaLink, include bank_code on every transaction. Fetch codes from the bank codes endpoint.
{
  "currency": "KES",
  "provider": "PESALINK",
  "transactions": [
    {
      "account": "1234567890",
      "amount": "5000",
      "name": "Jane Smith",
      "bank_code": "68",
      "narrative": "Vendor payment"
    }
  ]
}

M-Pesa B2B PayBill example

When paying a PayBill number, include both account_type and account_reference.
{
  "currency": "KES",
  "provider": "MPESA-B2B",
  "transactions": [
    {
      "account": "400200",
      "amount": "2500",
      "account_type": "PayBill",
      "account_reference": "INV-9901"
    }
  ]
}