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.
- Products in. Push your catalog and stock; customers see it on WhatsApp instantly.
- Orders and customers out. Every order, payment and delivery step is an event, delivered to your server as a signed webhook.
- Checkout from anywhere. Your website, an ad or an AI agent builds the cart; the customer confirms and pays in WhatsApp.
- Agent-ready. An MCP server for the shop owner's assistant, and one per shop for shoppers' assistants.
- Reconcile with your ids. Put your own id in
external_idon products, customers and orders. You never have to store ours.
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
- JSON in and out. Send
Content-Type: application/json. - Every object has an
id(prefixed:pr_,ct_,ord_,evt_,we_) and anobjecttype. - Money: integer minor units with a
currency(KES). Times: Unix seconds. - Updates use
POST /v1/<objects>/<id>(orPATCH) and change only the fields you send. - Lists are newest first and paginated.
- Every POST accepts an Idempotency-Key.
- Errors have a stable
typeandcode; see Errors.
For AI agents and LLMs
These docs are built to be read by machines too:
/llms.txt— an index of every page;/llms-full.txt— all of it in one file.- Any page as Markdown: add
.mdto its URL (e.g./docs/webhooks.md), or sendAccept: text/markdown. - The OpenAPI 3.1 spec:
/v1/openapi.json. - Error messages say what to do next, and every error links to its explanation.
Reference
Authentication · Checkout sessions · AI agents & MCP · Ads & attribution · Shopify & Odoo · Payments · Errors · Idempotency · Pagination · Webhooks · Products · Customers · Orders · Events · Webhook endpoints