What this app shows
Frontend form in the App Router
Server-side route handlers under
/apiC2B initialization with your M-Pesa credentials
Callback capture and local transaction history
Use this tiny app to understand the payment lifecycle: initialize a customer payment, receive the callback, inspect local history, and prepare for status queries and reversals.
/api