Khairul Imran Full-stack developer Malaysia MYT
01 · Fintech

Bayarcash SDK ecosystem

One payment API, ten official client libraries — eight languages plus Laravel and Django integrations, kept honest by a single shared contract.

Role
SDK author & maintainer
Years
2024 — now
Stack
PHP · Node · Python · Go · Rust · Ruby · Dart · .NET · Laravel · Django

Bayarcash is a Malaysian payment gateway — FPX, DuitNow and friends. Merchants integrate it from whatever stack they already run, which in practice means every stack: agencies on Laravel, startups on Node, a bank integration team on .NET, a Flutter app that needs payment status on the device.

My job was to make the answer to “do you have an SDK for X?” always be yes — and to make all ten answers behave identically. The same API also grew a product surface I work on: Bayarcash Link for no-code payment links, and the merchant onboarding and sign-up campaign portals that bring merchants in.

The problem

A payment SDK is a thin wrapper around HTTP, which is exactly why it goes wrong. Ten hand-written wrappers drift: one library names a field order_ref, another orderRef; one retries on timeout, another doesn’t; one validates the callback checksum, another trusts the network. For payments, drift isn’t a style problem — a missed checksum validation is money.

The approach

What it taught me

Maintaining ten parallel libraries is a lesson in API design economics: every awkward corner of an API gets paid for ten times. It pushed changes upstream — if something was annoying to wrap consistently in ten languages, that was usually the API’s fault, not the SDKs’.