Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.kulmipay.com/llms.txt

Use this file to discover all available pages before exploring further.

Use M-Pesa B2C when the recipient should receive funds directly in their M-Pesa wallet. Common use cases include salary payments, customer refunds, commissions, rewards, and remittance payouts.

Transaction fields

FieldRequiredDescription
accountYesRecipient phone number in international format, for example 254712345678.
amountYesAmount to send in KES. Minimum is KES 10.
nameNoRecipient name for your records.
narrativeNoPayment reason shown in your reports.
idempotency_keyNoUnique key to prevent duplicate payouts.

Initiate M-Pesa B2C

curl -X POST https://app.kulmipay.com/api/v1/send-money/initiate/ \
  -H "Authorization: Bearer ISSecretKey_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "currency": "KES",
    "provider": "MPESA-B2C",
    "requires_approval": "YES",
    "callback_url": "https://example.com/webhooks/send-money",
    "transactions": [
      {
        "account": "254712345678",
        "amount": "1000",
        "name": "Jane Doe",
        "narrative": "Salary payment",
        "idempotency_key": "salary-jan-jane-001"
      }
    ]
  }'

Approve the file

If you set requires_approval to "YES", approve the returned file before money moves:
curl -X POST https://app.kulmipay.com/api/v1/send-money/approve/ \
  -H "Authorization: Bearer ISSecretKey_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "FILE_ID_FROM_INITIATE_RESPONSE",
    "transactions": [
      "TRANSACTION_ID_FROM_INITIATE_RESPONSE"
    ]
  }'
Set requires_approval to "NO" only when your backend is already doing its own review and approval checks.