
M-PESA DARAJA API - C2B Integration Guide
Introduction If you are building a web or mobile app that needs to receive payments from M-PESA customers in Kenya, the Safaricom Daraja API is the tool you need. This guide will walk you through everything from scratch — no prior API experience required. By the end of this guide, you will understand: What the C2B API is and how it works How to set up and test it in the sandbox using Postman What ValidationURL and ConfirmationURL do How to take your integration live What is C2B? C2B stands for Customer to Business . It refers to the flow of money from an individual customer to your business. When a customer pays your Paybill or Till number via M-PESA, that is a C2B transaction. The C2B API allows your application to receive real-time notifications every time a payment comes in, so you can automate things like: Marking an order as paid Sending a payment receipt to the customer Updating your accounting system automatically What is Daraja? Daraja (which means "bridge" in Swahili) is Safar
Continue reading on Dev.to Beginners
Opens in a new tab




