Loading…
Loading…
Dex Hub
All users · buy · convert · offramp
All apps from the ODEI OS Home → Money folder.
OpenPayGB
Connect any app, marketplace, school, or fintech product to OpenPayGB. Create charges, host checkout, verify webhooks, and settle UGX via Mobile Money — without building your own PSP.
Create a charge via API and send customers to a branded OpenPayGB payment page.
Collect UGX via MTN & Airtel through LivePay — with sandbox confirm for local development.
Receive charge.created, charge.confirmed, and charge.failed events with HMAC signatures.
Multi-ecosystem wallets (Trust · MetaMask · Phantom · TON), OPGB balances, and Dex onramp/offramp.
End-to-end path from registration to confirmed payment. Use this as your integration checklist.
1. Register a developer app
Open →Create an app at /developers/register. Save client_id and client_secret (copy buttons on the success screen).
2. Sign in & create a Partner API key
Open →Open the dashboard and generate a key with charges:create and charges:read (add payments:read / dex:* as needed).
3. Register webhooks
Open →Add your HTTPS endpoint and subscribe to charge.confirmed (and charge.failed). Verify X-Odelhub-Signature.
4. Create a charge from your backend
Open →POST /api/partner/v1/charges (or /api/partner/v1/telegram/pay for Mini Apps) with amountUgx, description, redirectUrl, optional externalRef.
5. Send the customer to hosted checkout
Open →Redirect to charge.checkoutUrl — or from a Telegram Mini App call Telegram.WebApp.openLink(checkoutUrl) / OdeiOsTelegramPay.openCheckout.
6. Confirm via webhook or poll
Open →Treat charge.confirmed as source of truth. Optionally GET /api/partner/v1/charges/{id} to poll status.
Scope required: charges:create. Auth: Authorization: Bearer odelhub_live_…
curl -X POST https://YOUR_HOST/api/partner/v1/charges \
-H "Authorization: Bearer odelhub_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"amountUgx": 25000,
"description": "Order #1042",
"redirectUrl": "https://your-app.example/orders/1042/paid",
"cancelUrl": "https://your-app.example/orders/1042",
"externalRef": "ord_1042",
"customerEmail": "buyer@example.com",
"metadata": { "sku": "PRO-1" }
}'Response includes checkoutUrl, id, status, and expiresAt (1 hour). Reusing the same externalRef returns the existing charge (idempotent).
curl https://YOUR_HOST/api/partner/v1/charges/CHARGE_ID \ -H "Authorization: Bearer odelhub_live_YOUR_KEY"
// Minimal Node helper (no SDK package required)
async function createCharge(apiKey, body) {
const res = await fetch("https://YOUR_HOST/api/partner/v1/charges", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(await res.text());
const { charge } = await res.json();
// Redirect your customer:
// window.location = charge.checkoutUrl
return charge;
}URL shape: /opgb/checkout/{chargeId}. Branding comes from your developer app name. After payment, the payer is redirected to your redirectUrl?chargeId=…&status=confirmed&amount=…&sig=…. The sig proves OpenPayGB built that link, but ship only on the charge.confirmed webhook / alert or a verified status — never on the return URL alone.
GET /api/public/charges/:idGET /api/public/charges/:id/verify?status=…&amount=…&sig=… → ship when paid is true and signature is not invalid<script src="/opgb/button.js" data-link="…"></script> — add your site under Payment links → Embedded checkout firstPOST /api/public/charges/:id/livepay-startPOST /api/public/charges/:id/sandbox-confirmPOST /api/partner/v1/telegram/pay · SDK /odei-os/telegram-pay.js · ODEI OS host /os?start=checkout_…Checkout stays available even if Dex hub is hidden — payment links never soft-404. Partner Telegram Mini Apps monetize points / payments / crypto via OpenPayGB charges without embedding your card data in Telegram.
Events: charge.created, charge.confirmed, charge.failed (plus tuition payment.* and Dex dex.intent.*).
Headers: X-Odelhub-Event, X-Odelhub-Signature (HMAC-SHA256 of raw body).
const crypto = require("crypto");
function verify(secret, rawBody, signatureHex) {
const expected = crypto
.createHmac("sha256", secret)
.update(rawBody, "utf8")
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(expected, "hex"),
Buffer.from(signatureHex, "hex")
);
}POST /api/partner/v1/payouts (payouts:create)./api/oauth/authorize + POST /api/oauth/token (client_credentials or authorization_code)GET /api/partner/v1/dex/quote, POST /api/partner/v1/dex/payment-intentsGET /api/partner/v1/opgb/balances?studentId=…For accepting payments: charges:create + charges:read. For cashout: payouts:create + payouts:read. Add payments:read for tuition payment history, opgb:balance:read for wallets, dex:intent:create for Dex flows.
Consumer buy · swap · Cashout at /opgb/onoff, plus Dex rails for MoMo funding and cash-out.
Multi-ecosystem connect (Trust · MetaMask · Phantom · TON) plus OpenPayGB card and OPGB balance for tuition and Dex.
TonConnect · WalletConnect
For all users (guests, traders, education, and outside the tuition ecosystem): connect TON via TonConnect, EVM via WalletConnect (MetaMask, Trust, Rainbow), or the multi-ecosystem Wallets hub for injected MetaMask/Trust and Phantom (Solana). Self-custody keys stay in your wallet; OPGB cash rails stay custodial.
Self-custody TON transfer — network fees apply in your wallet.
TON not connected
WalletConnect
Set NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID to enable EVM wallets (WalletConnect Cloud — not Reown AppKit).
Full Trust · MetaMask · Phantom capability map → /opgb/wallets
Dex Hub
All users · buy · convert · offramp
All apps from the ODEI OS Home → Money folder.
OpenPayGB
Connect any app, marketplace, school, or fintech product to OpenPayGB. Create charges, host checkout, verify webhooks, and settle UGX via Mobile Money — without building your own PSP.
Create a charge via API and send customers to a branded OpenPayGB payment page.
Collect UGX via MTN & Airtel through LivePay — with sandbox confirm for local development.
Receive charge.created, charge.confirmed, and charge.failed events with HMAC signatures.
Multi-ecosystem wallets (Trust · MetaMask · Phantom · TON), OPGB balances, and Dex onramp/offramp.
End-to-end path from registration to confirmed payment. Use this as your integration checklist.
1. Register a developer app
Open →Create an app at /developers/register. Save client_id and client_secret (copy buttons on the success screen).
2. Sign in & create a Partner API key
Open →Open the dashboard and generate a key with charges:create and charges:read (add payments:read / dex:* as needed).
3. Register webhooks
Open →Add your HTTPS endpoint and subscribe to charge.confirmed (and charge.failed). Verify X-Odelhub-Signature.
4. Create a charge from your backend
Open →POST /api/partner/v1/charges (or /api/partner/v1/telegram/pay for Mini Apps) with amountUgx, description, redirectUrl, optional externalRef.
5. Send the customer to hosted checkout
Open →Redirect to charge.checkoutUrl — or from a Telegram Mini App call Telegram.WebApp.openLink(checkoutUrl) / OdeiOsTelegramPay.openCheckout.
6. Confirm via webhook or poll
Open →Treat charge.confirmed as source of truth. Optionally GET /api/partner/v1/charges/{id} to poll status.
Scope required: charges:create. Auth: Authorization: Bearer odelhub_live_…
curl -X POST https://YOUR_HOST/api/partner/v1/charges \
-H "Authorization: Bearer odelhub_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"amountUgx": 25000,
"description": "Order #1042",
"redirectUrl": "https://your-app.example/orders/1042/paid",
"cancelUrl": "https://your-app.example/orders/1042",
"externalRef": "ord_1042",
"customerEmail": "buyer@example.com",
"metadata": { "sku": "PRO-1" }
}'Response includes checkoutUrl, id, status, and expiresAt (1 hour). Reusing the same externalRef returns the existing charge (idempotent).
curl https://YOUR_HOST/api/partner/v1/charges/CHARGE_ID \ -H "Authorization: Bearer odelhub_live_YOUR_KEY"
// Minimal Node helper (no SDK package required)
async function createCharge(apiKey, body) {
const res = await fetch("https://YOUR_HOST/api/partner/v1/charges", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(await res.text());
const { charge } = await res.json();
// Redirect your customer:
// window.location = charge.checkoutUrl
return charge;
}URL shape: /opgb/checkout/{chargeId}. Branding comes from your developer app name. After payment, the payer is redirected to your redirectUrl?chargeId=…&status=confirmed&amount=…&sig=…. The sig proves OpenPayGB built that link, but ship only on the charge.confirmed webhook / alert or a verified status — never on the return URL alone.
GET /api/public/charges/:idGET /api/public/charges/:id/verify?status=…&amount=…&sig=… → ship when paid is true and signature is not invalid<script src="/opgb/button.js" data-link="…"></script> — add your site under Payment links → Embedded checkout firstPOST /api/public/charges/:id/livepay-startPOST /api/public/charges/:id/sandbox-confirmPOST /api/partner/v1/telegram/pay · SDK /odei-os/telegram-pay.js · ODEI OS host /os?start=checkout_…Checkout stays available even if Dex hub is hidden — payment links never soft-404. Partner Telegram Mini Apps monetize points / payments / crypto via OpenPayGB charges without embedding your card data in Telegram.
Events: charge.created, charge.confirmed, charge.failed (plus tuition payment.* and Dex dex.intent.*).
Headers: X-Odelhub-Event, X-Odelhub-Signature (HMAC-SHA256 of raw body).
const crypto = require("crypto");
function verify(secret, rawBody, signatureHex) {
const expected = crypto
.createHmac("sha256", secret)
.update(rawBody, "utf8")
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(expected, "hex"),
Buffer.from(signatureHex, "hex")
);
}POST /api/partner/v1/payouts (payouts:create)./api/oauth/authorize + POST /api/oauth/token (client_credentials or authorization_code)GET /api/partner/v1/dex/quote, POST /api/partner/v1/dex/payment-intentsGET /api/partner/v1/opgb/balances?studentId=…For accepting payments: charges:create + charges:read. For cashout: payouts:create + payouts:read. Add payments:read for tuition payment history, opgb:balance:read for wallets, dex:intent:create for Dex flows.
Consumer buy · swap · Cashout at /opgb/onoff, plus Dex rails for MoMo funding and cash-out.
Multi-ecosystem connect (Trust · MetaMask · Phantom · TON) plus OpenPayGB card and OPGB balance for tuition and Dex.
TonConnect · WalletConnect
For all users (guests, traders, education, and outside the tuition ecosystem): connect TON via TonConnect, EVM via WalletConnect (MetaMask, Trust, Rainbow), or the multi-ecosystem Wallets hub for injected MetaMask/Trust and Phantom (Solana). Self-custody keys stay in your wallet; OPGB cash rails stay custodial.
Self-custody TON transfer — network fees apply in your wallet.
TON not connected
WalletConnect
Set NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID to enable EVM wallets (WalletConnect Cloud — not Reown AppKit).
Full Trust · MetaMask · Phantom capability map → /opgb/wallets