Quick Start

Get started with SerixPay in just a few minutes. This guide will walk you through making your first payment.

1

Create your account

Sign up at serixpay.com to get access to the dashboard.

2

Get your API keys

Navigate to API Keys in the dashboard to create test and live keys.

3

Make your first API call

Use the code examples below to initiate a test payment.

4

Handle webhooks

Set up webhook endpoints to receive payment notifications.

API Keys

SerixPay provides two types of API keys:

pk_test_*

Test keys for development. No real money is moved.

pk_live_*

Live keys for production. Real payments are processed.

Warning

Never expose your API keys in client-side code. Always make API calls from your server.

Make Your First Payment

Here's how to initiate an M-PESA STK Push payment:

const response = await fetch('https://api.serixpay.com/api/v1/init-payment', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer pk_test_your_api_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    phoneNumber: '254712345678',
    amount: 100,
    orderId: 'ORDER-001',
    accountReference: 'Payment',
    callbackUrl: 'https://your-site.com/webhook'
  })
});

const data = await response.json();
console.log(data);
// { success: true, checkoutRequestId: "ws_CO_...", orderId: "ORDER-001" }

What Happens Next

  1. Customer receives STK Push prompt on their phone
  2. Customer enters M-PESA PIN to authorize payment
  3. Payment is processed by Safaricom
  4. Webhook notification is sent to your callback URL
  5. You can query the payment status using the checkoutRequestId