SDK Quickstart
Your first Wajub API call — with @wajub/node on Node.js or the official PHP, Python, Go, Ruby, Java, and C# SDKs.
6 min read
Store your keys
Load your keys from the environment — never hardcode them.
# Wajub API keys — pk. (public), sk. (private), rk. (restricted); _test. for sandbox
WAJUB_SECRET_KEY=sk_test.2a7c5e91b0d34f68
WAJUB_WEBHOOK_SECRET=whsec_test_abc123Node.js — @wajub/node
Official server SDK
Use @wajub/node on Node.js 18+. See the full Node.js guide.
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: 'a@b.co',
callback: 'https://example.com/return',
});
console.log(payment.authorization_url);Other official SDKs
Install the SDK for your language first:
| Language | Install |
|---|---|
| Python | pip install wajub |
| PHP | composer require wajub/wajub-php |
| Go | go get github.com/wajub/wajub-go |
| Ruby | gem install wajub |
| Java | Maven / Gradle — see Java guide |
| C# | dotnet add package Wajub |
Initialize a payment
curl https://api.wajub.com/payments \
-H "Authorization: sk_test.8f2b91c4d7e6a0f3" \
-H "Content-Type: application/json" \
-d '{ "amount": 5000, "currency": "XAF", "email": "a@b.co" }'Then dive into your language's reference page: Node.js, Python, PHP, Go, Ruby, Java, C#.
Related pages
SDKs OverviewAvailable libraries and common patterns.Node.js (@wajub/node)Official server SDK — full API coverage.PythonOfficial wajub package.PHPOfficial wajub/wajub-php package.GoOfficial wajub-go module.RubyOfficial wajub gem.JavaOfficial wajub-java package.C# / .NETOfficial Wajub NuGet package.API AuthenticationPublic, private, and restricted keys.
Was this page helpful?