GINIR ONLINE

GINIR ONLINE

ginir.online

Developers

Partner mini-apps

Ship a ride, delivery, payments, or city service inside Ginir Online — the same pattern as Telebirr mini-apps: your HTTPS web app opens in a sandboxed frame with a short-lived SSO token and city context.

1. Register

Contact KETEMA ops / super admin. They create an Apps catalog entry with launchMode=embed, your embedUrl, and issue a client_id + secret.

2. Embed contract

  • Host serves your page at /apps/{slug}/run inside an iframe.
  • Query params: ketema_sso, city, lang, origin.
  • Allow only HTTPS embed URLs. Set allowedOrigins for postMessage.

3. Verify SSO

POST https://ginir.online/api/partners/v1/session
Authorization: Bearer <ketema_sso>
// or JSON body: { "token": "<ketema_sso>" }

// 200
{
  "ok": true,
  "user": { "id": "…", "displayName": "…" } | null,
  "city": { "slug": "adama", "name": "Adama" },
  "app": { "slug": "ride", "clientId": "ket_…" },
  "lang": "en",
  "exp": 1710000000
}

4. postMessage

// iframe → host (origin must be allowlisted)
parent.postMessage({ source: "ketema-mini", type: "ready" }, hostOrigin);
parent.postMessage({ source: "ketema-mini", type: "resize", height: 900 }, hostOrigin);
parent.postMessage({ source: "ketema-mini", type: "close" }, hostOrigin);

// host → iframe
{ source: "ketema-host", type: "ready", lang: "en" }

Example: ride

A ride slot is reserved in Apps → More. Point its embed URL at your booking UI, set status to live, and users open it from the city app without leaving KETEMA.

← Back to Apps