Kuvra Connect

Build on your business data

Connect an online store, a point of sale or your own tools. Read your catalogue, push orders, raise invoices and issue receipts — with the same tax rules, numbering and bookkeeping the app uses.

Every endpoint below has a Try it button — a sandbox console with a key already filled in, so you can see real responses before you write a line of code.

Before you start

Authenticating

Every request carries an API key as a bearer token. Create keys in Settings → Developers. The secret is shown once and stored only as a hash, so it cannot be recovered — to rotate, issue a new key and revoke the old one, letting the two overlap while you deploy.

curl "https://api.kuvra.ng/api/connect/v1/ping" \
  -H "Authorization: Bearer $KUVRA_API_KEY"
Keys are server-side credentials. The API sends no CORS headers on purpose, so a browser cannot call it directly — an API key in front-end code is a key published to every visitor. (The playground on this page works by proxying through our own server, not by relaxing that.)

Scopes and subscriptions

A key carries only the permissions you tick. Outside them you get 403 INSUFFICIENT_SCOPE, naming what was missing. Give each integration the least it needs — a catalogue sync has no business voiding receipts.

Keys can be created on any plan, so you can wire everything up before paying. Requests need an active subscription: without one you get 402 SUBSCRIPTION_REQUIRED and a subscribeUrl. /ping, /me and /events stay open regardless, so you can always diagnose why the rest is refusing.

Making a request safe to repeat

Every write needs an Idempotency-Key header unique to that operation. Retry with the same key and you get the original response back instead of a second invoice. Reuse a key with a different body and you get 422 — that is a client bug, and silently replaying the first response would lose the new request without anyone noticing.

That header protects a retry for 24 hours. For anything that might be re-sent much later — re-syncing last quarter’s orders — send externalId on the resource instead. It is permanent: a create matching an existing one answers 200 with "created": false, where a genuine create answers 201. Use both.

Webhooks

Add endpoints in Settings → Developers and we POST to them when something changes, so your stock stays in step without polling.

Verifying a delivery (Node.js)
import crypto from 'crypto';

export function verify(rawBody, signatureHeader, secret) {
  const [tPart, v1Part] = signatureHeader.split(',');
  const timestamp = tPart.split('=')[1];
  const signature = v1Part.split('=')[1];

  // Reject anything stale: the timestamp is inside the signed
  // material precisely so a captured delivery cannot be replayed.
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;

  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${timestamp}.${rawBody}`)
    .digest('hex');

  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected),
  );
}

Verify against the raw body, before any JSON parsing — re-serialising changes the bytes and the signature will not match. Failed deliveries retry at roughly 1, 5, 25, 125 and 600 minutes, and Kuvra-Event-Id is stable across them so you can dedupe.

Errors and limits

Errors are JSON with a stable code you can switch on, and a message written for whoever is reading the logs.

{
  "success": false,
  "code": "INSUFFICIENT_STOCK",
  "message": "Bag of rice (50kg): only 3 left, 10 wanted",
  "details": { "available": 3, "requested": 10 }
}

Rate limits are per key, per minute: 300 reads and 120 writes. Over them you get 429 with Retry-After. The full machine-readable contract is at openapi.json, which imports into Postman or a client generator.

AI assistants

Kuvra speaks the Model Context Protocol, so ChatGPT, Claude and other assistants can work with a business directly — read stock, record a sale, raise an invoice — without anyone writing an integration.

The address

In any client that supports connectors or remote MCP servers, add this URL. There is no key to paste: the client walks the user through signing in to Kuvra and approving what the assistant may do.

https://api.kuvra.ng/mcp

The connection is discovered from that one address — the server answers an unauthenticated request with a pointer to its OAuth metadata, and the client takes it from there.

What the user controls

The consent screen lists every permission in plain words and lets the user untick any of them. What they approve is what the token carries, and nothing an assistant sends can widen it. They can end the connection at any time from Settings → Developers, which stops every token at once rather than waiting for one to expire.

An assistant is only shown the tools its connection allows. A read-only connection does not see the tools that change data at all — a model offered a tool it cannot call will call it, be refused, and try again.

What it can never do

Nothing voids, cancels or deletes, whatever the user approves. An assistant that can issue a receipt is useful; one that can void a customer's receipt because it misread a message is a liability, and that action stays with a person in the app.

Writes carry the same protections as the rest of this API. Tools that create something accept an externalId, so an assistant that retries cannot book the same sale twice, and an order that would oversell is refused whole — the assistant is told nothing was deducted.

Clients that cannot connect remotely

A few clients only know how to launch a local command. For those there is a bridge on npm that forwards to the same server with an API key attached. It carries no tool definitions of its own, so it cannot fall behind what the server offers.

{
  "mcpServers": {
    "kuvra": {
      "command": "npx",
      "args": ["-y", "@kuvra/mcp-server"],
      "env": { "KUVRA_API_KEY": "kv_live_..." }
    }
  }
}

Getting started

Three endpoints that need no subscription and no scopes. Start here — if these work, your key is wired up correctly and anything that fails afterwards is a permission or a payload, not your setup.

Check your key

GET/ping

The first call to make. It confirms the key is valid and tells you which business it belongs to. No scope required, so it answers even for a key you have not finished configuring.

If this returns 401, the key is wrong, revoked or expired — nothing else will work until it does not.

curl -X GET "https://api.kuvra.ng/api/connect/v1/ping" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Example response

{
  "success": true,
  "data": {
    "ok": true,
    "businessId": "9f1c…",
    "environment": "live",
    "serverTime": "2026-11-26T09:14:22.104Z"
  }
}

What this key can do

GET/me

Returns the business, the scopes on this key, and whether the subscription is active.

Call it at start-up. A client that checks its scopes when it boots fails with "this key is missing inventory:write" on your own screen, rather than halfway through a customer's checkout.

curl -X GET "https://api.kuvra.ng/api/connect/v1/me" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Example response

{
  "success": true,
  "data": {
    "business": {
      "id": "9f1c…",
      "name": "Lunexcore Limited",
      "country": "Nigeria",
      "currency": "NGN"
    },
    "key": {
      "name": "WooCommerce store",
      "scopes": [
        "inventory:read",
        "orders:write"
      ]
    },
    "subscription": {
      "active": true
    }
  }
}

Webhook delivery log

GET/eventswebhooks:read

Everything we have tried to send your endpoints, with the response we got back.

This exists because most merchants cannot read their own server logs — shared hosting, a managed store, no access. When a webhook "did not arrive", this is how you find out whether it was sent and what answered.

curl -X GET "https://api.kuvra.ng/api/connect/v1/events?limit=5" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Products and stock

Your catalogue and what is on the shelf. Stock levels change through movements, never by assignment — so every change has a reason attached and reaches the books.

List products

GET/productsinventory:read

Your catalogue, newest change first. Cost price is never returned — a store integration needs the selling price and the quantity; what you paid your supplier has no reason to leave the building.

Use updatedSince for an incremental sync. A shop with five thousand products should not page the whole catalogue to find the three that moved.

Parameters

q
string
Match against name, SKU or barcode.
sku
string
Exact SKU.
updatedSince
ISO 8601
Only products changed since this moment.
page
integer
Defaults to 1.
limit
integer
Up to 100. Defaults to 25.
curl -X GET "https://api.kuvra.ng/api/connect/v1/products?limit=5" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Create a product

POST/productsinventory:write

SKU is the handle your system will use for everything afterwards, so it must mean one thing. Posting a SKU that already exists returns 200 with the existing product rather than quietly creating a second one — which would make every later stock update ambiguous.

openingQuantity is recorded as a stock receipt, not written onto the row, so the opening balance produces a movement and the matching ledger entries like any other delivery.

Parameters

skurequired
string
Unique within your business.
namerequired
string
What the customer sees.
sellingPricerequired
number
Tax-exclusive.
costPrice
number
Never returned by the API.
openingQuantity
number
Recorded as a stock receipt.
taxable
boolean
Defaults to true.
curl -X POST "https://api.kuvra.ng/api/connect/v1/products" \
  -H "Authorization: Bearer $KUVRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "sku": "RICE-50", "name": "Bag of rice (50kg)", "sellingPrice": 62000, "costPrice": 48000, "unit": "bag", "openingQuantity": 40 }'

Adjust stock

POST/stock-adjustmentsinventory:write

Every stock change that is not a sale: a count correction, breakage, a delivery arriving.

There is deliberately no way to *set* a stock level. Writing a number straight onto the product would skip the movement and the ledger entry, leaving the inventory asset on your balance sheet disagreeing with what is on the shelf — and with nothing recorded to explain the difference.

Negative quantities reduce stock. To add, send a positive quantity with direction: "receive" and a unitCost.

Parameters

productIdrequired
uuid
The product to adjust.
quantityrequired
number
Negative to reduce.
direction
"adjust" | "receive"
Defaults to adjust.
reason
string
e.g. damage, recount, theft.
notes
string
Free text, kept on the movement.
curl -X POST "https://api.kuvra.ng/api/connect/v1/stock-adjustments" \
  -H "Authorization: Bearer $KUVRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "productId": "replace-with-a-product-id", "quantity": -3, "reason": "damage", "notes": "Water damage in transit" }'

Stock movement history

GET/stock-movementsinventory:read

The audit trail behind a stock level: what changed it, by how much, and what it was before and after. When a count disagrees with the system, this is the answer.

Parameters

productId
uuid
Narrow to one product.
since
ISO 8601
Only movements after this moment.
curl -X GET "https://api.kuvra.ng/api/connect/v1/stock-movements?limit=5" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Orders

A sale that already happened somewhere else. This is the endpoint an online store calls once an order is paid.

Record a paid order

POST/ordersorders:write

Deducts stock, raises the invoice, posts the ledger, marks it paid and issues the customer's receipt — the same chain the till runs, through the same code, so the two channels cannot drift apart.

It needs orders:write rather than invoices:write because it moves stock as well as money. A key that may bill a customer should not thereby be able to empty your shelves.

If any line has insufficient stock the whole order is refused with 409, and anything already deducted is put back. A partly-applied order never happens.

Send externalId — your own order number. It is permanent protection: re-send the same order next month and you get 200 with the original, no second deduction. The Idempotency-Key header only covers a retry for 24 hours.

Parameters

externalId
string
Your order id. Strongly recommended.
itemsrequired
array
productId and quantity per line.
customer
object
Matched on email, so repeat buyers are one customer.
paymentMethod
string
Defaults to "online".
discount
object
Cart-wide, applied after line discounts.
curl -X POST "https://api.kuvra.ng/api/connect/v1/orders" \
  -H "Authorization: Bearer $KUVRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "externalId": "store-order-5001", "customer": { "name": "Chidi Okafor", "email": "chidi@example.com" }, "items": [ { "productId": "replace-with-a-product-id", "quantity": 2 } ], "paymentMethod": "card" }'

Example response

{
  "success": true,
  "created": true,
  "data": {
    "orderId": "…",
    "invoiceNumber": "INV-0042",
    "receiptNumber": "RCP-2026-0007",
    "total": 133300
  }
}

Invoices

Bills you raise, and the payments that settle them.

Raise an invoice

POST/invoicesinvoices:write

Tax is applied from the business's registered country — 7.5% in Nigeria, 15% in Ghana, 16% in Kenya — so you send prices and we apply the right rate.

An invoice does not move stock. It is a bill, not a sale off the shelf. If the goods have already gone out, use /orders instead, or you will have billed the customer without reducing inventory.

Posting into a closed accounting period returns 409 PERIOD_CLOSED.

Parameters

itemsrequired
array
description, quantity, unitPrice, taxable.
dueDaterequired
date
YYYY-MM-DD.
customer
object
Or customerId if you already have one.
externalId
string
Your own reference.
curl -X POST "https://api.kuvra.ng/api/connect/v1/invoices" \
  -H "Authorization: Bearer $KUVRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "externalId": "store-invoice-4521", "customer": { "name": "Chidi Okafor", "email": "chidi@example.com" }, "items": [ { "description": "Ankara shirt (L)", "quantity": 2, "unitPrice": 18000, "taxable": true } ], "dueDate": "2026-12-10" }'

List invoices

GET/invoicesinvoices:read

Filter by date, status or your own externalId.

Parameters

from
date
Inclusive.
to
date
Inclusive of the whole day.
status
string
draft, sent, paid, overdue…
externalId
string
Find the invoice you created.
curl -X GET "https://api.kuvra.ng/api/connect/v1/invoices?limit=5" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Record a payment

POST/invoices/{id}/paymentsinvoices:write

Records money received against an invoice, marks it paid when the balance reaches zero, and issues the customer's receipt automatically. A store that charges the card and posts the payment never has to ask for a receipt separately.

Parameters

amountrequired
number
Cannot exceed the balance.
paymentDaterequired
date
YYYY-MM-DD.
paymentMethod
string
card, bank_transfer, cash…
reference
string
Your processor's reference.
curl -X POST "https://api.kuvra.ng/api/connect/v1/invoices/{id}/payments" \
  -H "Authorization: Bearer $KUVRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "amount": 40200, "paymentMethod": "card", "paymentDate": "2026-11-26", "reference": "ch_1234" }'

Receipts

Proof that money was received.

Issue a receipt

POST/receiptsreceipts:write

For money taken with no invoice behind it — a cash sale, a service paid for on the spot, a deposit.

Because nothing else has recorded this sale, issuing the receipt posts revenue to the ledger: cash in, sales revenue and tax out. Receipts created from an invoice payment or a till sale do not post again — that money is already in the books.

Parameters

itemsrequired
array
description, quantity, unitPrice, taxable.
payerName
string
Required unless you send a customer.
paymentMethod
string
cash, bank_transfer, mobile_money…
externalId
string
Your own reference.
curl -X POST "https://api.kuvra.ng/api/connect/v1/receipts" \
  -H "Authorization: Bearer $KUVRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "payerName": "Walk-in customer", "items": [ { "description": "Phone repair", "quantity": 1, "unitPrice": 20000, "taxable": true } ], "paymentMethod": "cash" }'

List receipts

GET/receiptsreceipts:read

Every receipt, whatever issued it — the till, an invoice payment, or this API.

curl -X GET "https://api.kuvra.ng/api/connect/v1/receipts?limit=5" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Expenses

Money the business spent.

Valid categories

GET/expenses/categoriesexpenses:read

Call this first and map your own categories to these. Sending anything else returns 400 — and an integration whose first request fails is a bad first impression of your own product.

curl -X GET "https://api.kuvra.ng/api/connect/v1/expenses/categories" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Record an expense

POST/expensesexpenses:write

Useful for pulling in the costs that arrive as emails rather than invoices — ad spend, payment processor fees, subscriptions.

Parameters

categoryrequired
string
One of /expenses/categories.
amountrequired
number
Gross, including tax.
vatAmount
number
The recoverable portion, if any.
expenseDate
date
Defaults to today.
curl -X POST "https://api.kuvra.ng/api/connect/v1/expenses" \
  -H "Authorization: Bearer $KUVRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "externalId": "ads-invoice-77", "category": "marketing", "amount": 50000, "description": "Social ads — November", "expenseDate": "2026-11-26" }'

Customers

Who you sell to.

Create or match a customer

POST/customerscustomers:write

Find-or-create, matched on email. Safe to call on every checkout: a repeat buyer resolves to the customer you already have rather than a new row each time.

Details you send fill in blanks but never overwrite what is there — a merchant who corrected a name by hand keeps the correction.

curl -X POST "https://api.kuvra.ng/api/connect/v1/customers" \
  -H "Authorization: Bearer $KUVRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "name": "Chidi Okafor", "email": "chidi@example.com", "phone": "+2348020000001" }'

List customers

GET/customerscustomers:read

Search by email or free text.

Parameters

email
string
Exact match.
q
string
Name, email or phone.
curl -X GET "https://api.kuvra.ng/api/connect/v1/customers?limit=5" \
  -H "Authorization: Bearer $KUVRA_API_KEY"

Building something?

Tell us what you are connecting and we will help you through it.