Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kler.africa/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks through the core integration flow: create a session, receive a payment, and fetch the reconciliation summary.

Step 1 — Create a session

A session represents a single event. Creating one provisions a collection account and optionally assigns POS terminals.
curl -X POST https://api.kler.africa/v1/sessions \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_event_id": "evt_abc123",
    "name": "Lagos Music Festival 2025",
    "currency": "NGN",
    "collection": {
      "account": true,
      "pos": true,
      "pos_count": 3
    },
    "webhook_url": "https://yourplatform.com/webhooks/kler"
  }'
Response
{
  "success": true,
  "data": {
    "session_id": "sess_...",
    "status": "active",
    "collection_account": {
      "account_number": "1234567890",
      "account_name": "Kler / Lagos Music Festival 2025",
      "bank_name": "Providus Bank",
      "bank_code": "101"
    },
    "pos_terminals": [
      { "terminal_id": "pos_abc_001", "label": "Terminal 1", "status": "assigned" },
      { "terminal_id": "pos_abc_002", "label": "Terminal 2", "status": "assigned" },
      { "terminal_id": "pos_abc_003", "label": "Terminal 3", "status": "assigned" }
    ]
  }
}
Share the collection_account details with your attendees for bank transfers, and deploy the POS terminals on the ground.

Step 2 — Receive a payment webhook

When a payment lands on the collection account, Kler fires a POST to your webhook_url:
{
  "event": "transaction.received",
  "session_id": "sess_...",
  "data": {
    "id": "txn_...",
    "amount": "5000.00",
    "currency": "NGN",
    "channel": "bank_transfer",
    "status": "successful",
    "sender_name": "John Doe",
    "sender_account": "0123456789",
    "sender_bank": "058",
    "narration": "Ticket payment",
    "paid_at": "2025-08-01T18:32:00.000Z"
  }
}
Use this to update your ticketing platform in real time.

Step 3 — Fetch reconciliation

At any point during or after the event:
curl https://api.kler.africa/v1/reconciliation/sess_... \
  -H "x-api-key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "session_id": "sess_...",
    "total_inflow": "245000.00",
    "transaction_count": 49,
    "successful_count": 47,
    "pending_count": 1,
    "failed_count": 1,
    "by_channel": {
      "bank_transfer": { "count": 30, "total": "150000.00" },
      "pos": { "count": 17, "total": "95000.00" }
    },
    "by_terminal": {
      "pos_abc_001": { "count": 8, "total": "40000.00" },
      "pos_abc_002": { "count": 9, "total": "55000.00" }
    }
  }
}

Next steps