CitaPay Developer API
Welcome to the CitaPay Developer Documentation. Our API is designed to be simple, predictable, and easy to integrate, allowing your application to accept payments and send payouts across multiple payment methods.
Base URLs
All API requests depend on the environment you are targeting.
| Environment | Base URL |
|---|---|
| Production | https://citapayapi.citatech.cloud/api/v1 |
| Sandbox | https://sandbox.citapayapi.citatech.cloud/api/v1 |
Every path in these docs is relative to the base URL. For example POST /checkout/payments on sandbox is POST https://sandbox.citapayapi.citatech.cloud/api/v1/checkout/payments.
Always use the Sandbox environment for development and testing. It runs the same code as production, routing payment provider calls through real sandbox APIs (Daraja Sandbox for M-Pesa). Test transactions wait for real provider callbacks just like production: if you cancel an STK push, the transaction will fail. No real money moves.
Key Concepts
- RESTful: Our API follows standard REST principles.
- JSON: All request bodies and response payloads are formatted in JSON. Successful responses are wrapped as
{ "success": true, "data": ..., "timestamp": "..." }; list endpoints add ametaobject with pagination details. The examples in these docs show the contents ofdataunless they show the full envelope. - Amounts: Amounts are numbers in Kenyan shillings (KES), not cents:
1500means KES 1,500. - Secure: Strict authentication via Bearer tokens and signature verification for webhooks.
- Async Processing: Payments are processed asynchronously; use Webhooks for real-time updates.
- Multi-Provider: Choose your payment method via the
paymentMethodfield. M-Pesa and Card are live today; Bank Transfer is coming soon.
Supported Payment Methods
| Value | Description | Status |
|---|---|---|
MPESA | M-Pesa STK Push & B2C (Kenya) | Live (default) |
CARD | Debit / Credit Card on a hosted checkout page | Live for payments, if enabled for your account (see allowedPaymentMethods in whoami) |
BANK_TRANSFER | Direct bank transfer | Coming soon |
Need Help?
If you encounter any issues, please contact our implementation team at support@citatech.cloud.