Build commerce on CogniChat.
One headless API for catalog, cart, checkout, bookings, customers and webhooks. Checkout is money-blind: you send ids and quantities, we price every line and hand back a pay link.
curl "https://cognichat-api.vendyi.com/api/public/v1/catalog/" \
-H "Authorization: Bearer pk_live_YOUR_KEY"Base URL · https://cognichat-api.vendyi.com/api/public/v1
Two keys, the Stripe model.
Send your key as Authorization: Bearer <key> or X-Api-Key: <key>. Mint and revoke keys in your dashboard.
Browser-safe. Read the catalog and services, build a cart, check out, and read order status. Ship it in client code.
Server-only. Everything publishable can do, plus customer records and webhook config. Never expose it in a browser.
Your first request.
- 1Create a keyIn the dashboard, open Developers and mint a publishable key.
- 2Call the catalogSend it as a Bearer token to the catalog endpoint.
- 3Build checkoutCreate a cart, add lines, and check out for a pay link.
curl "https://cognichat-api.vendyi.com/api/public/v1/catalog/" \
-H "Authorization: Bearer pk_live_YOUR_KEY"Money-blind by design.
Your client never sends prices. It sends ids and quantities; the server prices every line against the live catalog, applies coupons, and returns an order number and a pay link. Prices can't be tampered with from the browser, and the same engine powers WhatsApp and the hosted store.
# 1. Create a cart
curl -X POST "https://cognichat-api.vendyi.com/api/public/v1/cart/" \
-H "Authorization: Bearer pk_live_YOUR_KEY"
# 2. Add a product line (ids + quantity only — never a price)
curl -X POST "https://cognichat-api.vendyi.com/api/public/v1/cart/CART_TOKEN/items/" \
-H "Authorization: Bearer pk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "menu_item_id": 42, "qty": 2 }'
# 3. Checkout — the server prices every line and returns a pay link
curl -X POST "https://cognichat-api.vendyi.com/api/public/v1/checkout/" \
-H "Authorization: Bearer pk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "cart_token": "CART_TOKEN", "customer": { "name": "Ada", "phone": "+233..." } }'Endpoints.
Full machine-readable schema at https://cognichat-api.vendyi.com/api/public/v1/openapi.json.
| GET | /catalog/ | Product catalog tree |
| GET | /services/ | Bookable services |
| GET | /services/{id}/availability/ | Open dates / slots |
| POST | /cart/ | Create a cart |
| GET/PATCH | /cart/{token}/ | Priced cart / set coupon |
| POST | /cart/{token}/items/ | Add a line |
| POST | /checkout/ | Place an order/booking, returns a pay link |
| GET | /orders/{token}/ | Order status by token |
| GET/POST | /customers/ | Identify / look up a customer (sk_) |
| GET/POST | /webhooks/ | List / register webhook endpoints (sk_) |
Know the moment you're paid.
Register a URL and we POST a signed event on order.paid, booking.paid, and order.status_changed. Every delivery carries an X-Webhook-Signature header; verify it over the raw body before you trust it. Failed deliveries retry with backoff.
import crypto from "node:crypto";
function verify(rawBody, signature, secret) {
const expected =
"sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}
// signature = req.headers["x-webhook-signature"]Predictable shapes.
Every error is a 4xx with a stable body you can branch on.
{
"error": {
"code": "not_entitled",
"message": "The headless commerce API is not enabled on this plan."
}
}Per key, not per IP.
Each key has its own bucket, so one integration can't starve another. Over the limit returns 429 with a Retry-After header. The headless API is available on the Business plan.
Stuck? Ask.
An assistant that knows this exact API. Tell it your stack and what you're building, and it writes the code to wire it up.
Ask how to integrate the CogniChat Commerce API in your stack. I answer with runnable code for the language you pick above.
Get your keys and start building.
Keys, the playground, and webhooks live in your workspace under Developers.