View as Markdown

Kibanda API

Kibanda runs a shop inside WhatsApp: customers browse, add to cart, pay (M-Pesa, card, or cash on delivery) and track their delivery without leaving the chat. The API connects that shop to everything else you run — Shopify, Odoo, Zoho, a POS, a spreadsheet, or an AI agent.

Quickstart

1. Get a key. In the dashboard, open Developers → API keys → Create key. Test keys (kb_test_…) work on staging; live keys (kb_live_…) work in production.

export KIBANDA_KEY=kb_test_...
export KIBANDA_API=https://api-staging.kibanda.africa

2. Add a product. Money is always an integer in cents — 25000 is KES 250.

curl $KIBANDA_API/v1/products \
  -H "Authorization: Bearer $KIBANDA_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"name": "Unga 2kg", "price": 25000, "stock": 40, "external_id": "SKU-1001"}'

It's on your WhatsApp menu now. The response includes a code like UNG4: anyone who sends "P-UNG4" to your number lands on that product.

3. Get told about orders.

curl $KIBANDA_API/v1/webhook_endpoints \
  -H "Authorization: Bearer $KIBANDA_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/kibanda", "enabled_events": ["order.paid", "order.delivered"]}'

Save the secret (whsec_…) from the response and verify each delivery.

4. Send a test order. Message your shop's WhatsApp number, order something, and watch order.created arrive.

Base URLs

Environment URL Keys
Production https://api.kibanda.africa kb_live_…
Staging (test) https://api-staging.kibanda.africa kb_test_…

Conventions

For AI agents and LLMs

These docs are built to be read by machines too:

Reference

Authentication · Checkout sessions · AI agents & MCP · Ads & attribution · Shopify & Odoo · Payments · Errors · Idempotency · Pagination · Webhooks · Products · Customers · Orders · Events · Webhook endpoints