Documentation

Quick reference for Pesa Studio MVP.

Callback URL

Use your project callback URL in any M-Pesa Daraja API request as the CallBackURL parameter. All POSTs to this URL are captured, stored, and forwarded in real-time.

POST https://yourdomain.com/api/callback/ps_demo_abc123

Local Forwarding

Set a local endpoint in Settings or the Dashboard. Every incoming callback is immediately forwarded there via a fire-and-forget POST.

http://localhost:3000/webhook

Replay

Click ↻ on any callback row to replay the exact original payload to your current local endpoint. Great for debugging missed callbacks.

POST /api/projects/{id}/callbacks/{cid}/replay

Simulator

Use the STK Push Simulator to fire synthetic callbacks without real money. Supports ResultCode 0 (success), 1032 (cancelled), 1037 (timeout), 1 (insufficient funds).

POST /api/simulate/stk
{ "targetUrl": "...", "resultCode": 1032, "amount": 100 }

CLI Auth

Authenticate your terminal session to scope API access to a specific project.

pesa auth login
# Opens /cli/auth in your browser