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 i @flux-payments/sdkConfigure your environment with the standard Flux variables extracted from your dashboard settings.
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 -X POST https://api.flux.systems/v1/payments \
-H "Authorization: Bearer sk_test_..." \
-d amount=2500 \
-d currency=KESSTK 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.
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.
All webhook payloads are signed with an HMAC SHA256 header. Always verify the signature before processing sensitive transaction updates.