Introduction
The Sevi Partner API lets you accept Sevi as a payment method in your shop, ERP or checkout: buyers pay with M-Pesa, their Sevi wallet, or Sevi credit (pay later), and you get the money in your Sevi wallet once the goods are delivered.
Typical integrations:
- ERP / invoicing systems — create a Sevi order for each invoice and print the payment link as a QR code.
- E-commerce platforms — add Sevi as a checkout option (WooCommerce, Shopify, custom shops).
- Distributor / route-sales apps — create the order at the shop, confirm delivery when the driver drops the goods.
Start with the Integration flow — it describes the one standard flow end to end.
Environments
| Sandbox (testing) | Production | |
|---|---|---|
| GraphQL endpoint | https://sandbox.sevi.io/graphql | https://partner.sevi.io/graphql |
| Seller dashboard (API token, webhooks) | staging admin portal (ask us) | admin.sevi.io |
| Money | test money only | real money |
Both environments expose the same schema and behave the same way. See Testing for how to get a sandbox account.
Authentication
Every request needs your API token in the Authorization header, sent as-is (no Bearer prefix):
POST /graphql HTTP/1.1
Host: partner.sevi.io
Content-Type: application/json
Authorization: <your API token>
The token identifies your seller wallet, so orders you create are automatically linked to your account. See Authentication for how to get one.
What the Partner API offers
| Operation | Type | Use it to |
|---|---|---|
orderCreate | mutation | Create an order and get the payment link |
orderDeliver | mutation | Confirm delivery (full or partial) — releases the money to you |
orderCancel | mutation | Close an unpaid order the buyer abandoned |
orderSearch | query | Look up the current state of an order (reconciliation) |
orderPaymentProposals | query | Preview the credit options for a buyer before creating the order |
orderUpdateItems | mutation | Change the items of an unpaid order |
paymentRequest | mutation | Trigger an M-Pesa STK push for an order directly (instead of the payment link) |
setUpWebhooks | mutation | Register a webhook URL (you can also do this in the dashboard) |
customerCreate | mutation | Register a buyer with your own customer reference ahead of the first order |
Order and payment updates are pushed to you via webhooks — there is no need to poll.
Working with GraphQL
- Open the endpoint URL in a browser to use the GraphQL playground; its documentation explorer lists every field and input with a description.
- Use query variables rather than inlining values.
- Generate typed clients from the schema with GraphQL Code Generator.
- GraphQL always answers HTTP
200; check theerrorsarray in the response body. - A Postman collection with sandbox and production examples is available.