Skip to content
All work

Case study · 02

Afriex developer ecosystem

An SDK, two commerce plugins and 18 guides for cross-border payment integrations.

Role
Developer Relations Engineer
Period
Apr 2026 – Oct 2026
Stack
TypeScript, Node.js, Medusa v2, WordPress, WooCommerce, Fastify, PostgreSQL, Drizzle, Next.js
Status
Open source

01 The problem

A payment API is only as useful as the time it takes a developer to get a first transaction through it.

Developers building for African markets need cross-border collections and payouts, but each integration meant reading raw HTTP docs and rebuilding the same webhook, idempotency and error handling.

The ecosystem work covers that gap end to end, from a typed SDK to drop-in commerce plugins to guides that explain production details.

02 What I built

  1. afriex business api

    afriex business api: Customers, transactions, payment methods, balances, rates, webhooks

  2. @afriex/sdk

    @afriex/sdk: Official TypeScript SDK (npm maintainer)

  3. guides

    guides: 18 articles on Afriex's DEV publication

  4. medusa-payment-afriex

    medusa-payment-afriex: Medusa v2: bank transfer, Afriex Checkout, verified webhooks

  5. woocommerce gateway

    woocommerce gateway: Classic and block checkout

  6. example apps

    example apps: afriex-checkout, afriex-creator-payout

The base layer is @afriex/sdk, the official TypeScript SDK for the Afriex Business API: customers, transactions, payment methods, balances, rates and webhooks. The repository lives in Afriex's GitHub organisation; Lucky maintains the npm package.

On top of it sit two commerce plugins. medusa-payment-afriex adds bank transfer and Afriex Checkout to Medusa v2 stores, verifies webhooks and can be switched on per region. The Afriex Gateway for WooCommerce brings the same to WordPress, in classic and block checkout.

The reference apps are the code behind the guides. The digital marketplace pairs a Fastify, PostgreSQL and Drizzle backend for checkout and creator payouts with a Next.js storefront (Tailwind CSS, React Hook Form, Zod, TanStack Query), and is written up as the two-part Build a Digital Marketplace with Afriex, Fastify and Postgres series.

03 Decisions and trade-offs

  1. Decision 01

    Chose A typed SDK as the base layer over plugins that each call the HTTP API directly.

    Why: Webhook verification, errors and types are written once and every plugin and example app reuses them.

    Cost: SDK releases have to stay ahead of the plugins that depend on them.

  2. Decision 02

    Chose Per-region toggles in the Medusa plugin over one global payment configuration.

    Why: Merchants enable Afriex only in the regions where it makes sense for their customers.

    Cost: More configuration surface to document and test.

  3. Decision 03

    Chose Example apps paired with long-form guides over reference docs alone.

    Why: A two-part marketplace series shows checkout and payouts working together, which reference pages cannot.

    Cost: Guides need updating when the API changes.

04 Results

@afriex/sdk · npm downloads / month
331
Source: npm downloads API, 2026-09-27 to 2026-10-26

What shipped

  • @afriex/sdk on npm, with docs at afriex-sdk-docs.vercel.app.
  • medusa-payment-afriex for Medusa v2, with bank transfer, Afriex Checkout, verified webhooks and per-region toggles.
  • Afriex Gateway for WooCommerce, supporting classic and block checkout.
  • Reference apps for the Business API, including a digital marketplace with checkout and creator payouts (Fastify, PostgreSQL, Drizzle, with a Next.js storefront).
  • 18 articles on Afriex's DEV publication, including build-alongs for a freelancer payout platform, a remittance app and a two-part marketplace series, and guides on webhooks, idempotency and sandbox, virtual accounts, mobile money, stablecoin settlement and MCP agents.

Want this kind of work on your team?

Next projectDriftWatchA self-observing AI agent SDK.