System Status: OperationalRequest Merchant API Access
Documentation v1.0

CORE INFRA
MANUAL.

Welcome to the Flux Core Infrastructure documentation. This guide details how to integrate high-performance payment rails into your African enterprise stack.

Quick Start

To begin orchestrating payments, first initialize the Flux client with your secure merchant credentials.

npm install
npm i @flux-payments/sdk

Configure your environment with the standard Flux variables extracted from your dashboard settings.

.env
FLUX_API_KEY=sk_test_51Mz...
FLUX_WEBHOOK_SECRET=whsec_...

Authentication

Flux uses deterministic bearer tokens for all API interactions. All requests must be performed over SSL with a strictly formatted Authorization header.

cURL Request
curl -X POST https://api.flux.systems/v1/payments \
  -H "Authorization: Bearer sk_test_..." \
  -d amount=2500 \
  -d currency=KES

STK Push (M-Pesa)

The STK Push (Sim Tool Kit) allows you to trigger a payment request directly on the user's mobile device. This is the gold standard for frictionless mobile money in Kenya.

Initiate STK Push
import { FluxClient } from '@flux-payments/sdk';

const flux = new FluxClient(process.env.FLUX_API_KEY);

const result = await flux.mpesa.stkPush({
  phone: '254712345678',
  amount: 1000,
  reference: 'INV-001',
  description: 'Service Payment'
});

Handling Webhooks

Flux relies on asynchronous webhooks to communicate transaction finality. Ensure your endpoint returns a 200 OK status within 200ms to avoid re-delivery.

Important

All webhook payloads are signed with an HMAC SHA256 header. Always verify the signature before processing sensitive transaction updates.