API Reference

API Reference

Complete reference documentation for all SerixPay API endpoints.

Base URL

https://api.serixpay.comAll API requests use this base URL

M-PESA Payments

STK Push, C2B, and transaction queries for mobile money payments.

Key Endpoints

POST/api/v1/init-paymentInitiate STK Push
POST/api/v1/confirmPayment/:idQuery Status
GET/api/v1/transactionsList Transactions

Card Payments

Process Visa, Mastercard, and Amex payments with 3DS2 security.

Key Endpoints

POST/api/v1/payments/chargeCharge Card
GET/api/v1/payments/:idGet Transaction
POST/api/v1/payments/:id/refundRefund Payment

Payouts

Bank transfers (EFT, RTGS, PesaLink) and M-PESA B2C disbursements.

Key Endpoints

POST/api/v1/payoutsSingle Payout
POST/api/v1/payouts/batchBatch Payout
GET/api/v1/payouts/:idGet Payout

Payment Pages

Create hosted payment pages for donations, tickets, and quick payments.

Key Endpoints

POST/api/v1/payment-pagesCreate Page
GET/api/v1/payment-pagesList Pages
GET/public/payment-pages/:slugGet Public Page

Response Format

All API responses follow a consistent JSON format:

Success
{
  "success": true,
  "data": { ... },
  "message": "Operation successful"
}
Error
{
  "success": false,
  "error": "Error message",
  "code": "ERROR_CODE"
}

Pagination

List endpoints support pagination with page and limit query parameters:

GET /api/v1/transactions?page=1&limit=20

{
  "success": true,
  "items": [...],
  "total": 150,
  "page": 1,
  "pages": 8,
  "limit": 20
}