M-Pesa (Safaricom Daraja) · OpenAPI Overlay 1.0.0

API Evangelist conversational phrasing for M-Pesa Daraja C2B API

3 actions 3 updates phrasing extends openapi/mpesa-c2b-api-openapi.yml
Generated by API Evangelist Written by API Evangelist tooling for M-Pesa (Safaricom Daraja)'s API. It is a proposal applied on top of the contract, not a document M-Pesa (Safaricom Daraja) publishes.
View Overlay File View on GitHub Overlay Specification

What the actions change

x-apievangelist-phrasing

Targets 3

$.info
$.paths['/mpesa/c2b/v1/registerurl'].post
$.paths['/mpesa/c2b/v1/simulate'].post

OpenAPI Overlay

Raw ↑
# Generated by API Evangelist (build-phrasing.py). Our phrasing, not observed demand.
overlay: 1.0.0
info:
  title: API Evangelist conversational phrasing for M-Pesa Daraja C2B API
  version: 1.0.0
extends: openapi/mpesa-c2b-api-openapi.yml
actions:
- target: $.info
  update:
    x-apievangelist-phrasing:
      method: generated
      generated: '2026-11-18'
      generator: build-phrasing.py
      label: Generated by API Evangelist
      operations: 2
- target: $.paths['/mpesa/c2b/v1/registerurl'].post
  update:
    x-apievangelist-phrasing:
      intent: Register C2B callback URLs
      effect: write
      questions:
      - How do I tell M-Pesa where to send my C2B payment confirmations?
      - Can I choose the response type for C2B validation?
      instructions:
      - text: Register C2B confirmation URL {ConfirmationURL} and validation URL {ValidationURL} for short code {ShortCode} with response type {ResponseType}.
        slots:
          ConfirmationURL: requestBody.ConfirmationURL
          ValidationURL: requestBody.ValidationURL
          ShortCode: requestBody.ShortCode
          ResponseType: requestBody.ResponseType
      - text: Set up C2B callbacks for {ShortCode}, response {ResponseType}.
        slots:
          ShortCode: requestBody.ShortCode
          ResponseType: requestBody.ResponseType
      method: generated
      generated: '2026-11-18'
- target: $.paths['/mpesa/c2b/v1/simulate'].post
  update:
    x-apievangelist-phrasing:
      intent: Simulate an inbound C2B payment
      effect: write
      questions:
      - Can I test a C2B payment in the sandbox?
      - What does a simulated C2B payment look like?
      instructions:
      - text: Simulate a C2B payment of {Amount} to short code {ShortCode} from {Msisdn}.
        slots:
          Amount: requestBody.Amount
          ShortCode: requestBody.ShortCode
          Msisdn: requestBody.Msisdn
      - text: Run a C2B test payment of {Amount} with command {CommandID}.
        slots:
          Amount: requestBody.Amount
          CommandID: requestBody.CommandID
      method: generated
      generated: '2026-11-18'

Work with this as data

Every overlay here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for openapi overlays

4 MCP tools reach this
  • find_overlaysBrowse and filter every overlay in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This overlay
curl "https://apis.io/api/v1/overlays/mpesa-c2b-api-phrasing-overlay"
All openapi overlays
curl "https://apis.io/api/v1/overlays?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.