Skip to content

SDKs & Libraries

Every official Wajub package, where it lives, and which one your stack needs.

There is one Wajub API. Every package on this page is a thin wrapper over it, written in the idioms of its language, so nothing here does something the REST API cannot. What the wrappers buy you is authentication, retries, idempotency, typed errors and pagination that you would otherwise write once per project.

Where your code runs

That question decides the package, and nothing else does.

Your code runsReach forBecause
On your serverA server SDKIt holds the secret key, so it can do everything
In a browserWajub ComponentsIt renders and confirms a checkout, nothing more
In a mobile appA mobile SDKIt renders a native payment sheet
In a terminalThe CLILocal webhook forwarding and test events
On WordPressA pluginNo integration code at all
Anywhere elseThe REST APIEvery endpoint, documented for raw HTTP

Server SDKs

Seven languages, one surface. They are versioned together and released together, so the difference between them is syntax rather than capability.

LanguagePackageRegistryVersionRuntime
Node.js@wajub/nodenpm1.1.1Node 18+
PythonwajubPyPI1.1.1Python 3.10+
PHPwajub/wajub-phpPackagist2.0.0PHP 8.4+
Gogithub.com/wajubhq/wajub-goGo modulesv1.1.1Go 1.22+
RubywajubRubyGems1.1.1Ruby 3.1+
Javacom.wajub:wajub-javaMaven Central1.1.1Java 17+
C# and .NETWajubNuGet1.1.1.NET 8+

The same call, seven ways

Create a payment, get back a token for the browser and a URL for a redirect. This is the shape every server SDK shares.

curl https://api.wajub.com/payments \
-H "Authorization: sk_test.kZ3qP8mWvL2xR7tB5nY4hC6dF9jS1aG0eU3i…" \
-H "Content-Type: application/json" \
-d '{"amount": 15000, "currency": "XAF", "customer": {"email": "buyer@example.com"}}'

Ruby, Java and C# read the same way in their own idiom. Each has its own page: Ruby, Java, C#.

What every server SDK gives you

The client is resource oriented. One object per API resource, the same names everywhere.

GroupResources
Money inpayments, refunds, disputes, links, invoices
Money outtransfers, beneficiaries, balance
People and accountscustomers, accounts, identity
Risk and complianceshield, tax
Plumbingevents, webhooks, webhookEndpoints, listen, global

Around them, the behaviour you would otherwise rebuild in every project.

  • An Idempotency-Key is generated for every mutating call, and you can pass your own.
  • Retries on 429 and 5xx, with exponential backoff.
  • One error class per failure kind, so authentication, validation, rate limiting and transport failures are told apart before you read a message.
  • Page based pagination with an iterator that fetches the next page for you.
  • Webhook signature verification, so the endpoint that receives events is one call away from being safe.
  • A Sync account reference per request, for platforms charging on behalf of their merchants.

Naming follows each language, snake_case in Python, PHP and Ruby, camelCase elsewhere, while the wire format stays snake_case. The mapping is on SDK naming conventions.

In the browser

These render a checkout. They never hold a key, and they cannot refund, pay out or list anything. Your server creates the session first.

PackageFrameworkVersion
@wajub/jsVanilla, bundler or CDN1.4.0
@wajub/reactReact 18+, Next.js1.4.0
@wajub/vueVue 3.3+, Nuxt1.4.0
@wajub/svelteSvelte, SvelteKit1.4.0

The three framework packages are wrappers around @wajub/js, which is itself a small loader that fetches the checkout runtime from https://js.wajub.com. The whole section has its own tree: Wajub Components.

In a mobile app

A native payment sheet against a session your server created. The customer picks an operator, enters a number, and approves from their phone without leaving your app.

PackagePlatformVersionNeeds
wajub_mobileFlutter1.1.1Dart 3.5+
@wajub/react-nativeReact Native1.1.1React Native 0.74+, @stripe/stripe-react-native
com.wajub:wajub-mobile-coreAndroid, Kotlin1.1.0Compose UI in wajub-mobile-compose

On the command line

@wajub/cli is the only package here that is not for production code. It forwards webhooks to your machine, triggers test events, and reads your API resources while you build.

PackageRegistryVersionRuntime
@wajub/clinpm, Homebrew, Scoop1.4.0Node 20+

Installation and every command are on the CLI pages.

Without an SDK

Nothing on this page is required. Each SDK is a few thousand lines over HTTPS and JSON, and the API reference documents every endpoint with request and response examples. That is the right path for a language with no official package, for an environment you cannot add a dependency to, and for anyone who prefers to see the wire.

What did you think of this content?