SDKs & Libraries
Official SDKs and libraries for integrating with Wajub — server SDKs for Node.js, Python, PHP, Go, Ruby, Java, and C#, plus Wajub Components for the browser.
Wajub provides official server-side SDKs for Node.js, PHP, Python, Go, Ruby, Java, and C#, plus browser components and a full REST API.
Official server SDKs
Server-side SDKs are published for Node.js (@wajub/node),
PHP (wajub/wajub-php), Python (wajub
), Go (github.com/wajub/wajub-go), Ruby (
wajub), Java (com.wajub:wajub-java), and
C# (Wajub). All mirror the same merchant API surface.
What's available
Official tools
Server-side (Node.js)
Install the official SDK:
npm install @wajub/nodeimport { Wajub } from '@wajub/node';
const wajub = new Wajub({ privateKey: process.env.WAJUB_SECRET_KEY! });
const payment = await wajub.payments.create({
amount: 5000,
currency: 'XAF',
email: 'buyer@example.com',
callback: 'https://example.com/return',
});
console.log(payment.authorization_url, payment.authorization_token);See the full Node.js guide for resources, webhooks, Sync, and Edge usage.
Other server languages
Official SDKs are available for Python, PHP, Go, Ruby, Java, and C# — same API surface as @wajub/node:
pip install wajubfrom wajub import Wajub
import os
wajub = Wajub(api_key=os.environ["WAJUB_SECRET_KEY"])
payment = wajub.payments.create({
"amount": 5000, "currency": "XAF",
"email": "buyer@example.com",
"callback": "https://example.com/return",
})
print(payment["authorization_url"])Detailed guides: Python · PHP · Go · Ruby · Java · C#
Public vs private key on POST /payments
Payment initialization accepts either a public key (pk.…) or a private key
(sk.…). Use pk.… for client-side calls (browser/mobile) and sk.… for server-side calls — the
latter grants access to all resources beyond just payments.
curl https://api.wajub.com/payments \
-H "Authorization: sk_test.8f2b91c4d7e6a0f3" \
-H "Content-Type: application/json" \
-d '{ "amount": 5000, "currency": "XAF", "customer": { "email": "a@b.co" } }'Language-specific guides: Python · PHP · Go · Ruby · Java · C#
Client-side checkout (Wajub Components)
For embedding checkout in a web app, use Wajub Components.
Your backend creates the session first — with @wajub/node or raw HTTP:
// Backend (Next.js route)
const payment = await wajub.payments.create({ amount: 5000, currency: 'XAF' });
return { sessionToken: payment.authorization_token };
// Frontend (@wajub/js)
import { loadWajub } from '@wajub/js';
const rt = await loadWajub();
rt?.wajub.mount('#checkout', {
sessionId: sessionToken,
onSuccess: (transaction) => showSuccess(transaction),
});Was this page helpful?