For developers, by developers

One SDK. All six providers. Ship in a day.

Replace 6 PSP integrations with one. TypeScript-first, fully typed, OpenAPI-backed. Your sandbox is live in 60 seconds.

Node.js · @popfab/node
const popfab = require('@popfab/node');
const client = new popfab.Client({ apiKey: 'sk_test_...' });

// Initiate a payment
const payment = await client.payments.initiate({
  amount: 5000000, // ₦50,000 in kobo
  currency: 'NGN',
  payment_method: 'bank_transfer',
  reference: 'ORD-20240001',
  customer: {
    email: 'customer@example.com',
    name: 'Amaka Obi',
    phone: '+2348012345678'
  },
  metadata: {
    order_id: 'ORD-20240001',
    product: 'Premium Plan'
  }
});

console.log(payment.data.payment_url); // Redirect user here
Quick Start

From zero to live payment in 3 steps.

01

Install the SDK

Pick your language and install the POPFAB SDK. All SDKs are on public package registries.

Step 01 · Node.js
npm install @popfab/node
02

Get your API key

Create a free account and copy your test API key from the dashboard. No KYC required in sandbox.

Step 02 · Node.js
// In your dashboard: Settings → API Keys
// Copy your test key: sk_test_xxxxxxxxxxxx

const client = new popfab.Client({
  apiKey: process.env.POPFAB_API_KEY
});
03

Initiate your first payment

Make your first API call. POPFAB selects the best provider, handles failover, and returns a payment URL.

Step 03 · Node.js
const payment = await client.payments.initiate({
  amount: 10000, // ₦100 in kobo
  currency: 'NGN',
  payment_method: 'bank_transfer',
  reference: 'TEST-001',
  customer: { email: 'test@example.com' }
});

// Redirect your customer to complete payment
console.log(payment.data.payment_url);
// → https://checkout.popfab.io/pay/ch_xxxxx
SDKs

Available in your language

All SDKs auto-generated from OpenAPI spec. Always up-to-date.

JS

Node.js

v2.4.1

$ npm install @popfab/node
npm14.2k downloads/wk
Py

Python

v2.4.1

$ pip install popfab
pip6.8k downloads/wk
Go

Go

v2.4.1

$ go get popfab.dev/sdk
go2.1k downloads/wk
PHP

PHP

v2.4.1

$ composer require popfab/php
composer3.4k downloads/wk
DX

A developer experience that respects your time

60-sec sandbox

Sign up, get your test API key, and make your first API call, all in under 60 seconds. No KYC, no approval required.

<500ms response

Our API responds in under 500ms globally. Provider routing decisions are made in under 100ms using our routing engine.

Human-readable errors

Every error includes a code, a human message, and a link to the relevant docs section. No cryptic status codes.

Webhook inspector

Test webhook delivery in sandbox with our built-in inspector. See payloads, retry failed deliveries, replay events.

OpenAPI spec

Download our OpenAPI 3.1 spec, import into Postman or Insomnia, or generate clients in any language.

Zero cold-start

All POPFAB API endpoints are warm 100% of the time. No serverless cold-start delays. Consistent sub-500ms responses.

Webhooks

Build webhook handlers with confidence.

POPFAB delivers webhooks for every payment event. Our sandbox webhook inspector lets you test handlers before going live: replay events, inspect payloads, and simulate failures.

payment.initiatedPayment created, provider selected
payment.successPayment completed successfully
payment.failedPayment failed, includes failure reason
payment.refundedFull or partial refund processed
payment.disputedDispute raised by customer
Example webhook payloadpayment.success
Webhook payload · payment.success
{
  "event": "payment.success",
  "data": {
    "id": "pay_01HXXXXXXXXXXXXXXXX",
    "reference": "ORD-20240001",
    "amount": 5000000,
    "currency": "NGN",
    "status": "success",
    "provider": "paystack",
    "provider_reference": "T123456789",
    "customer": {
      "email": "customer@example.com",
      "name": "Amaka Obi"
    },
    "metadata": {
      "order_id": "ORD-20240001"
    },
    "created_at": "2024-01-15T14:32:00Z",
    "settled_at": "2024-01-16T00:00:00Z"
  },
  "timestamp": "2024-01-15T14:32:01Z",
  "version": "2024-01"
}

Webhook security

All webhooks are signed with HMAC-SHA256. Verify the signature before processing:

const sig = popfab.webhooks.verify(payload, secret)

Your sandbox is waiting.

60 seconds from now, you could have your first test payment running.

OpenAPI spec · Postman collection · GitHub examples