Complete engineering documentation for accepting online payments via JazzCash, Easypaisa, and Raast Instant QR, with automated IBFT disbursements and signed webhooks.
Base: https://mail.gofluxpay.com
(Copy)
TLS 1.3 · HMAC-SHA256
Introduction & Dual Environments
Flux provides completely isolated Sandbox and Live environments to ensure risk-free development, testing, and production scaling.
DUAL ENV
The Flux Payment Platform provides unified rails for customer checkout and instant disbursements across Pakistan. All endpoints are secured over TLS 1.3 and require authenticated cryptographic credentials.
SANDBOXTest Environment (flx_test_*)
Simulate customer payments and payout executions without debiting real PKR funds. Pre-configured test numbers auto-approve to let you build end-to-end integration tests in minutes.
LIVEProduction Rails (flx_live_*)
Direct clearing with State Bank of Pakistan Raast QR, 1LINK 1BILL, JazzCash and Easypaisa. Activated once your merchant business KYC review is approved.
Authentication & Scoped API Keys
Flux enforces strict separation of duties between Payment Collection (Payin) and Fund Withdrawals (Payouts).
SECURITY
1. Payin Collection Key (flx_live_* / flx_test_*)
Authorized exclusively for creating customer checkout sessions and polling transaction status (/api/v1/payments/*). This key cannot disburse funds.
Authorized exclusively for bank title fetches and real-time fund withdrawals (/api/v1/payouts/*). Pass via header X-API-KEY or Bearer.
X-API-KEY: flx_xak_xxxxxxxxxxxxxxxx
Merchant Identity Enforcement: Always supply your public account identifier merchant_id (MID e.g. mrc_...) in API request payloads. Flux verifies server-side MID cryptographic ownership on every transaction.
Idempotency & Replay Defense
Network dropouts and timeouts can happen in distributed checkout. Pass a unique transaction reference in the Idempotency-Key header with every payment creation or disbursement request. If an identical request is received within 24 hours, Flux safely returns the original response without double charging the customer or duplicating bank debits.
A unified, zero-redirect-friction checkout experience that lets buyers pay via digital wallet push or instant dynamic QR.
CHECKOUT FLOW
When you initialize a payment, Flux returns a secure checkout_url valid for 10 minutes. Redirect the customer to this URL. The hosted checkout provides:
JazzCash Mobile Account: Instant push notification or OTP sent to customer mobile device for 1-tap PIN approval.
Easypaisa Mobile Wallet: In-app push clearing with sub-second approval webhook.
Raast Dynamic QR (ISO 20022): Scannable directly through all major Pakistani banking apps (Meezan, HBL, Nayapay, SadaPay, MCB, Allied, Bank Alfalah).
Live 3-Second Return Transition: Instant receipt generation followed by an automated countdown returning the buyer to your return_url.
POST
Create Hosted Checkout Session
Initializes a customer checkout session and returns a secure hosted checkout URL.
POST https://mail.gofluxpay.com/api/v1/payments/create
Distributes merchant float balance directly to a verified Pakistani bank account or digital wallet. Requires a dedicated Disbursement Key (flx_xak_*) passed via the X-API-KEY header.
POST https://mail.gofluxpay.com/api/v1/payouts/create