Hosted payment page
Let Wajub host the payment experience — all payment methods, mobile-first, production-ready, customizable to your brand.
The hosted payment page (pay.wajub.com) is the fastest way to collect payments. You
initialize a transaction, redirect the customer to the authorization_url, and Wajub handles
the UI, payment method selection, reminders, and confirmation — optimized for Mobile
Money and mobile.
When to use it
Choose the hosted page if you want to move fast and delegate payment UI compliance. For a 100% integrated experience within your app, see the Direct API.
Initialize with options
All customization fields are passed at initialization.
https://api.wajub.com/paymentsamountintegerrequiredcurrencystringrequiredcustomerobjectrequireddescriptionstringoptionalcallbackstring (url)optionalreferencestringoptionalmetadataobjectoptionalNo locale/channels params yet
There is currently no locale or channels body parameter — the hosted page shows all
channels available for the team/currency, and language follows the browser/team default.
Passing these fields today has no effect.
https://api.wajub.com/paymentscurl https://api.wajub.com/payments \
-H "Authorization: pk_test.8f2b91c4d7e6a0f3" \
-H "Content-Type: application/json" \
-d '{
"amount": 25000,
"currency": "XAF",
"email": "amina@example.com",
"name": "Amina N.",
"description": "Pro subscription — May",
"callback": "https://example.com/return",
"metadata": { "order_id": "4172", "plan": "pro" }
}'{
"status": "Created",
"code": 201,
"transaction": { "id": "trx_01JXXXXXXXXXXXXX", "status": "pending" },
"authorization_url": "https://pay.wajub.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"authorization_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}authorization_url embeds an opaque session token (not the transaction reference) — treat it
as an opaque redirect URL, don't try to parse or construct it yourself.
Handle customer return
After the attempt, Wajub sends the customer back to your callback URL:
https://example.com/return?reference=trx_01JXXXXXXXXXXXXX&status=succeededNever trust the browser return
The URL status parameter is indicative: a customer can close the tab or manipulate the URL.
Always verify server-side with GET /payments/{id} (or wait for the
payment.succeeded webhook) before delivering.
https://api.wajub.com/payments/{id}curl https://api.wajub.com/payments/trx_01JXXXXXXXXXXXXX \
-H "Authorization: pk_test.8f2b91c4d7e6a0f3"{
"status": "OK",
"code": 200,
"transaction": { "id": "trx_01JXXXXXXXXXXXXX", "status": "succeeded", "amount": 25000, "channel": "cm.mtn" }
}Customize the appearance
The logo, accent color, and business name displayed on pay.wajub.com are set once and
for all in Dashboard → Settings → Brand. They automatically apply to
all your payment pages, in test as in production.