Oweru Pay – Selcom Payment Console
Complete testing interface for your independent Selcom payment API. Test all endpoints, view responses, and integrate into your main system.
API Connected
How to use the Oweru Pay API
Your app never calls Selcom directly. It talks to your Oweru FastAPI backend, which then talks to Selcom Checkout using their official SDK.
1. Architecture
- Your app sends JSON to
/api/checkout/*on the backend. - Backend checks
X-App-Keyand uses your Selcom keys to call their gateway via the official SDK. - Selcom's JSON response is returned unchanged to your app.
2. Required headers
X-App-Key: <shared-secret-from-backend-env> Content-Type: application/json
The X-App-Key must match APP_API_KEY in the backend .env. This prevents unknown callers from hitting your payment API.
3. Typical payment flow
- Your app calls
POST /api/checkout/create-order-minimalwith amount, currency and customer MSISDN. - Backend creates an order at Selcom and returns an
order_id. - Your app then calls
POST /api/checkout/wallet-paymentwith thatorder_idto trigger Push USSD. - Optionally poll
GET /api/checkout/order-status?order_id=...to confirm payment.
4. Quick cURL example
curl -X POST "https://api.selcom.oweru.com/api/checkout/create-order-minimal" \
-H "X-App-Key: <your-app-key>" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000,
"currency": "TZS",
"msisdn": "255712345678"
}'Use the other tabs to test manually, then copy these patterns into your own backend or mobile app.
Python (requests)
import requests
BASE_URL = "https://api.selcom.oweru.com"
APP_KEY = "<your-app-key>"
payload = {
"amount": 1000,
"currency": "TZS",
"msisdn": "255712345678",
}
r = requests.post(
f"{BASE_URL}/api/checkout/create-order-minimal",
headers={"X-App-Key": APP_KEY, "Content-Type": "application/json"},
json=payload,
)
print(r.json())Node.js (fetch)
const BASE_URL = "https://api.selcom.oweru.com";
const APP_KEY = "<your-app-key>";
async function createOrder() {
const res = await fetch(
BASE_URL + "/api/checkout/create-order-minimal",
{
method: "POST",
headers: {
"X-App-Key": APP_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 1000,
currency: "TZS",
msisdn: "255712345678",
}),
}
);
const data = await res.json();
console.log(data);
}PHP (cURL)
$baseUrl = 'https://api.selcom.oweru.com';
$appKey = '<your-app-key>';
$ch = curl_init($baseUrl . '/api/checkout/create-order-minimal');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-App-Key: ' . $appKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1000,
'currency' => 'TZS',
'msisdn' => '255712345678',
]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));