+254748651734

PCI-aware secure payments

API Reference

/

Quick Start

Quick Start

This guide will help you quickly get started with MekaPayGroup APIs. In just a few steps, you will be able to process your first payment and integrate secure payment functionality into your application.

Step 1: Create a Merchant Account

To begin, sign up for a MekaPayGroup merchant account. Once your account is created and approved, you will gain access to your merchant dashboard.

Step 2: Get Your API Keys

After logging into your dashboard, generate your API credentials. These keys are required to authenticate all API requests.

X-PUBLIC-KEY: YOUR_PUBLIC_API_KEY
X-SECRET-KEY: YOUR_SECRET_API_KEY

Step 3: Choose Integration Type

MekaPayGroup provides two main integration methods depending on your business needs:

  • Server-to-Server (S2S): Full control over the payment flow. Ideal for custom checkout experiences.
  • Hosted Payment Page (HPP): Redirect users to a secure hosted page managed by MekaPayGroup.

Step 4: Make Your First API Request

Use the base URL below to send your first request and initiate a payment.

curl --location 'https://api.mekapaygroup.com/api/sessions/payments/create' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-PUBLIC-KEY: YOUR_PUBLIC_API_KEY' \
--header 'X-SECRET-KEY: YOUR_SECRET_API_KEY' \
--data-raw '{
  "amount": 1000,
  "currency": "KES",
  "payment_link": true,
  "description": "Order 123",
  "return_url": "https://yourwebsite.com/payment/success",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "address1": "1600 Amphitheatre Parkway",
    "city": "Mountain View",
    "state": "California",
    "zip": "94043",
    "country": "US",
    "phone_number": "6502530000"
  }
}'

Step 5: Handle the Response

After making the request, you will receive a response indicating the payment status. You should handle success and failure scenarios in your application.

{
  "status": "success",
  "payment_id": "pay_123456",
  "message": "Payment initiated successfully"
}

Base URL

https://api.mekapaygroup.com