Integrate M-Pesa payments into your applications with our secure, reliable API infrastructure.

Complete documentation for authentication, payment initiation, and webhook handling. Get started in minutes.

Getting Started

  1. Quickstart Guide

API Reference

  1. Base URL

    All API requests should be made to our secure endpoint.

    Production:
    https://felixdev.io/api/v1
  2. Get API Access

Quick Example

  1. cURL Example

    Complete example for initiating a payment request.

    curl -X POST https://felixdev.io/api/v1/initiate \ -H "Content-Type: application/json" \ -H "apikey: your_api_key_here" \ -H "linkid: your_shortcode_tracking_code" \ -d '{ "msisdn": "254712345678", "amount": 100, "callback": "https://yoursite.com/webhook" }'
  2. Success Response

    Response format for successful payment initiation.

    { "success": true, "request_id": "REQ_abc123def456", "checkout_request_id": "ws_CO_27072023123456789", "status": "pending", "message": "STK Push sent successfully", "customer_message": "Success. Request accepted for processing" }
  3. View Full Examples