Distributable Node.js package Adfin can give to customers so they integrate without bespoke API plumbing.

Summary

They asked us to productise integration: build a distributable Node.js package Adfin can give to customers so they integrate without bespoke API plumbing.

Adfin brings all things money‑in into one place—invoicing, card and bank payments, and automated credit control. Our job was to reduce switching friction for teams already using an incumbent by delivering a Stripe‑compatible Node.js/TypeScript SDK. In practice, switching becomes a small diff, not a rewrite. Plain English: install the package, update a few calls, and you’re live on Adfin.

JDD engineered an SDK that mirrors the Stripe npm package, so migrating to Adfin was a small diff—not a rewrite.
Nathan Hall
Platform Solutions Lead

The Challenge

Platforms and finance teams were locked into Stripe-specific SDKs and workflows. Product teams wanted to add Direct Debit, Pay by Bank and automated chasing without rebuilding their stack. Accounting needed reconciliation that just works with Xero,QuickBooks and other ledgers. Stakeholders required a credible migration path with low switching risk and clear operational guardrails.

Objectives

Remove switching risk for prospects already using an incumbent (e.g., Stripe). Ship an installable Node.js package that customers can integrate in hours, not weeks. Bake in production patterns (verified webhooks, idempotency, retries, observability) so support loads drop. Provide clear migration maps and drop‑in examples to accelerate adoption.

Our Approach

User‑focused planning. We map real incumbent usage (top endpoints, common edge cases, webhook events) and prioritise the 80% flows customers need on day one. We align copy, tone, and examples to match how engineers already think about the job to be done.

Engineered design

We design incumbent‑compatible ergonomics—familiar method names, error semantics, and async flows—so the migration is a small diff, not a rewrite. Strong TypeScript types, Express/Next adapters, and ready‑to‑use webhook verification are included.

Solid development.

We ship tested, versioned packages with CI/CD, semantic releases, and versioned docs. We add observability hooks and security hardening (HMAC signatures, replay protection, principle of least privilege).

Stripe‑compatible SDK design.

We analysed common Stripe usage across subscriptions, payment intents, invoices, and webhooks and mapped equivalent Adfin capabilities into a familiar API shape. The goal: readable diffs, not rewrites. We kept method naming, error semantics, and async flows familiar, added strong typings, and provided adapters for common middleware (Express, NestJS, Next.js API routes).

Production patterns out of the box.

Webhooks verification helpers, HMAC signature checks, replay protection, exponential backoff on transient failures. Idempotency & retries, client‑ and server‑side guards to handle network jitter and duplicate deliveries. Observability structured logging, correlation IDs, and ready‑to‑use dashboards.

Turnkey examples & docs.

Once‑off payments recurring, and Direct Debit with auto‑fallback to card. Credit control sample flows that show Autopilot reminders via email/SMS/WhatsApp and how to control tone, timing, and cut‑offs. Reconciliation examples that sync payouts/fees and feed Xero, QuickBooks or CSV.

What We Delivered

@adfin/payments Node.js/TS package with Stripe‑like ergonomics

Reference repositories (Next.js & Express) covering invoices, payment links, and mandate management

Migration guide mapping common Stripe calls to Adfin equivalents

Webhook relay & verification utilities with retry/poison‑queue patterns

DX docs: quickstarts, copy‑paste snippets, and troubleshooting playbooks

Reusable pattern

This SDK‑as‑a‑product approach is repeatable. We build installable, incumbent‑compatible libraries (e.g., Stripe‑like, GoCardless‑like) so your customers integrate quickly without bespoke API plumbing.

What we package for other platforms

  • Incumbent‑compatible ergonomics: mirror common method names, error shapes, and async flows so migrations are small diffs, not rewrites.
  • Migration accelerators: mapping guides from incumbent calls to yours, side‑by‑side code diffs, and drop‑in examples for the most used flows.
  • Production patterns baked‑in: verified webhooks, idempotency + retries, observability, and sane defaults for security.
  • Developer enablement: reference apps (e.g., Next.js/Express), Postman collections, and quickstarts that reduce time‑to‑live.
  • Sales & partnerships leverage: lower switching friction for prospects, clearer RFP answers (“Stripe‑compatible SDK available”), fewer integration tickets post‑sale.

Where this works best Platforms that compete with an entrenched provider and need to remove switching risk—payments, AR, lending, logistics, comms, or any API‑driven product.

Engagement model

  1. Discovery & mapping of incumbent usage patterns. 2) API surface design and DX spec. 3) SDK build with tests + examples. 4) Docs & launch kit (implementation guide, one‑pager, case study). 5) Pilot & hardening with first adopters.

Outcomes

Minimal code change for teams switching from Stripe—often a handful of lines per flow.

Faster go‑lives thanks to ready‑made examples and opinionated defaults.

Lower support load: consistent error shapes and robust diagnostics shorten investigation time.

Finance‑ready: clean reconciliation paths for Xero, QuickBooks, and CSV exports.

In plain English

Your customers don’t need a custom integration project—they just install a package.

Sales conversations get easier: “Yes, there’s a Stripe‑compatible SDK. Here are the code diffs.”

Engineering spends time on product, not glue code and webhook edge cases.

Why Adfin

All payment methods in one place: card, Apple Pay/Google Pay, Direct Debit, and Pay by Bank—no juggling multiple providers.

Built for service businesses that invoice: invoices, flexible partial payments, and real-time credit control with configurable reminders.

Simple, transparent and fair pricing with human support.

Accounting-ready: deep Xero and QuickBooks integrations, plus Adfin Bridge to connect with any other system you use.

Accountant ecosystem: integrations with Socket and Engager.

Trust & migration features: name on the bank statement and mandate migration from other providers.

Who it's ideal for

Our approach works best for teams and platforms that want to make integration effortless for their customers. Software platforms that want to offer their own SDK so customers can plug in quickly. Fintechs and payment providers looking to replace incumbent SDKs (like Stripe or GoCardless) with a familiar, faster alternative. Engineering‑led startups that want to give developers a polished integration experience out of the box. Product and partnerships teams that need to remove friction and accelerate onboarding for new clients.

If your business relies on developers adopting your API this is built for you.

Tech Stack

Our foundation is the same stack that powers the SDKs we build for clients — modern, fast, and developer‑friendly.

Core technologies

  • Node.js — the runtime powering the SDK, chosen for its speed, scalability, and vast ecosystem.
  • TypeScript — for type‑safety, predictability, and a smoother developer experience.
  • Express — a lightweight, battle‑tested framework that makes handling webhooks, routing, and middleware simple.

Why it matters

Using this stack ensures every SDK we build is:

  • Reliable and scalable: built on widely‑adopted open‑source technology.
  • Developer‑friendly: familiar patterns for anyone who’s used Node.js before.
  • Easy to maintain: clean structure, strong typings, and documentation‑ready from day one.

This approach means when we hand over your SDK, it’s production‑grade, fully typed, and easy for your engineers — or your customers — to extend and maintain.

Let’s build your Node.js SDK

Need a Node.js package or SDK your customers can install and integrate in hours, not weeks?
That’s what we do — incumbent-compatible SDKs that feel instantly familiar and make switching a small diff, not a rewrite.

What you’ll get

  • Incumbent-compatible ergonomics (e.g., Stripe-like) for seamless migrations.
  • TypeScript-first SDK with Express and Next adapters built in.
  • Production-grade patterns baked in from day one — verified webhooks, idempotency, retries, and observability.
  • Migration maps & code diffs that guide developers from incumbent APIs to yours.
  • Docs, quickstarts & a launch kit your sales team can demo confidently.

Why partner with us

We specialise in designing and building installable, production-ready SDKs that make integration effortless and adoption faster.
From the first planning session to the release candidate, we focus on developer experience, quality, and clarity.

Free feasibility check included — API review, suggested SDK surface, migration plan, and rough timeline.

Trust strip

UK-based • TypeScript-first • Verified webhooks • Idempotency & retries • Express/Next adapters • Xero/QuickBooks-ready • Stripe-compatible migrations

Book a 30-minute scoping call

Get In Touch

Whether you have a specific project in mind or would like to find out more about how we might be able to support your business, we'd love to talk.