Weavz
M-Pesa Daraja

M-Pesa Daraja

Initiate Safaricom M-Pesa Daraja STK Push, C2B, B2C, B2B, reversal, status, balance, and callback workflows.

9 tools
1 trigger

Tools

Name
initiate_stk_push

Create an M-Pesa Express STK Push checkout request.

query_stk_push

Query the current status of an M-Pesa Express STK Push request.

register_c2b_urls

Register confirmation and validation callback URLs for C2B payments.

simulate_c2b_payment

Run the Daraja sandbox C2B simulation endpoint. This action is disabled for production credentials.

request_b2c_payment

Initiate a Daraja Business-to-Customer disbursement such as salary, business, or promotional payment.

request_b2b_payment

Initiate a Daraja Business-to-Business payment between shortcodes.

query_transaction_status

Request Daraja transaction status for a transaction ID or originator conversation ID.

query_account_balance

Request the Daraja account balance for a shortcode.

reverse_transaction

Request a Daraja transaction reversal.

Triggers

Name
callback_received

Receive M-Pesa Daraja STK or C2B callback payloads. Public Daraja docs do not define a general HMAC signature for these callbacks.

Quick Start

TypeScript
import { WeavzClient } from '@weavz-io/sdk'

const weavz = new WeavzClient({ apiKey: 'wvz_...' })

const result = await weavz.actions.execute('mpesa-daraja', 'initiate_stk_push', {
  workspaceId: '550e8400-e29b-41d4-a716-446655440000',
  integrationAlias: 'mpesa-daraja',
  input: { /* ... */ },
})

Related Integrations

Works well with

Frequently Asked Questions

How do I connect M-Pesa Daraja to my app?

Use Weavz Hosted Connect for Custom authentication. Install the SDK, create a connection through the connect portal or API, then execute tools programmatically.

What tools does M-Pesa Daraja support?

M-Pesa Daraja supports 9 tools including Initiate STK Push, Query STK Push, Register C2B URLs, Simulate C2B Payment, Request B2C Payment, and more.

Can I use M-Pesa Daraja with AI agents?

Yes. Add M-Pesa Daraja to an MCP server in Tool Mode or Code Mode. Code Mode provides 3 meta-tools with on-demand API discovery so agents can compose stateful workflows without loading every action schema up front.

Can M-Pesa Daraja be used in stateful agent workflows?

Yes. Agents can combine M-Pesa Daraja tools with Filesystem, State KV, Human Gates, input partials, and other workspace integrations while keeping execution scoped to the selected workspace or end user.

What authentication does M-Pesa Daraja use?

M-Pesa Daraja uses Custom. Weavz stores credentials securely and uses them for authorized action execution.

How much does the M-Pesa Daraja integration cost?

The M-Pesa Daraja integration is included on all Weavz plans including the free tier with 20,000 actions per month. No credit card required.

What triggers does M-Pesa Daraja support?

M-Pesa Daraja supports 1 triggers including Callback Received.

Connect M-Pesa Daraja in minutes

Get 20,000 free action executions every month. No credit card required.