API reference
Conventions shared by all endpoints. Endpoints are grouped as follows. If this is your first integration, start with the Quickstart.
| Group | Contents |
|---|---|
| Payments | Sale, authorization, void, refund, tip adjustment; receipt reprint and signature coming soon |
| Terminals | Terminal list and status, printing, scanning, cash drawer |
| Settlements | Terminal batch close — coming soon |
| Customer display | Cart display, customer display renderer, idle screen |
| Store hosts | Store host registration, pairing and tokens (companion mode) |
| Applications | Registering and publishing terminal applications |
| Webhooks and events | Asynchronous notifications, signature verification, event types, WebSocket |
| Errors | All error codes |
Base URL
https://api.kuvex.com/v1Requests and responses are JSON (UTF-8). Send Content-Type: application/json.
Authentication
Pass the credential in the Authorization header:
Authorization: Bearer sk_test_...| Credential | Prefix | Used from | Scope | Lifetime |
|---|---|---|---|---|
| Secret key | sk_test_, sk_live_ | Your server | All endpoints | Until revoked in the Dashboard |
| Browser session token | kvs_ | Browser / WebView | One terminal: create and read payments, peripherals | ≤ 900 s |
| Host token | kvs_ | Store host (companion mode) | Paired terminals: create, read and cancel payments, push the cart, read the terminal | 900 s |
Each endpoint lists the credentials it accepts under Auth. Any other credential returns 403 scope_forbidden.
Never ship a secret key in a browser, mobile app or store host. Secret keys are in the Dashboard under Developers → API keys.
Test and live mode
| Test mode | Live mode | |
|---|---|---|
| Key prefix | sk_test_ | sk_live_ |
| Terminals | Sandbox virtual terminal, test terminals | Live terminals |
| Funds | No real charge | Real charge |
livemode on objects | false | true |
A key used against a terminal of the other mode returns 409 terminal_livemode_mismatch.
Create a browser session token
POST /v1/auth/tokenIssues a short-lived token bound to one terminal, for use in front-end code instead of the secret key.
| Item | Value |
|---|---|
| Auth | Secret key only |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | String | Yes | Terminal the token is bound to |
expires_in | int | No | Lifetime in seconds, maximum 900 |
Response: 201 Created
{ "token": "kvs_...", "expires_in": 900, "livemode": false }An expired token returns 401 session_expired; issue a new one from your server.
Create a sandbox
POST /v1/sandbox/sessionCreates an anonymous test account valid for 14 days, with a test key, a browser session token and one virtual terminal. The sandbox page calls this endpoint.
| Item | Value |
|---|---|
| Auth | None (rate limited per IP) |
Response: 201 Created. Returned once; keep api_key on your server.
{
"api_key": "sk_test_...",
"session_token": "kvs_...",
"session_expires_in": 900,
"terminal_id": "KV100023",
"expires_at": "2026-12-08T17:00:00Z",
"livemode": false
}After expiry, the sandbox's keys, tokens and terminal return 401 sandbox_expired.
Amounts
Amounts are int in cents; field names end in _cents. amount_cents: 1250 is USD 12.50. The only supported currency is usd.
Idempotency
Money-moving writes (create payment, void, refund, capture, tip adjustment) require an Idempotency-Key header. The value is generated by the caller; a UUID is recommended.
Idempotency-Key: 6f1c2a52-4c1e-4b8e-9a43-2f0c1f7d9e10| Case | Result |
|---|---|
| Same key, same body | The first response is returned again (same status code and body, as a snapshot of the first processing) |
| Same key, different body | 409 idempotency_conflict |
| First request still processing | 409 idempotency_in_progress; retry later |
| First request created the object but the connection dropped | The created object is returned with recovered=true |
- Keys are scoped to the account and the endpoint.
- Persist the key with the order before sending, so a timed-out request can be retried with the same key.
- Requests without the header are not rejected, but a retry then creates a duplicate operation. The official SDKs always send the header.
Settlement, receipt reprint and application publishing use a request_id body field with the same semantics.
Error handling
HTTP status codes: 2xx success; 4xx the request cannot be processed as sent; 5xx server error. All errors share one format:
{
"error": {
"code": "terminal_offline",
"message": "That terminal is offline. Check its network connection and try again.",
"retriable": true
}
}| Field | Type | Description |
|---|---|---|
code | String | Stable error code. Branch on this field |
message | String | Human-readable description for troubleshooting; may change |
retriable | boolean | true if the same request (same idempotency key) can be retried |
detail | Object | Additional data for some errors, e.g. remaining_cents on refund_exceeds |
See Errors for all codes.
Request IDs
Every response carries a Kuvex-Request-Id header (req_ prefix). Include it when contacting support.
The Dashboard keeps 7 days of request logs under Developers → Request log (method, path, status, error code, idempotency key, API version, duration), searchable by request ID. Request and response bodies and query strings are not stored. Requests that fail authentication are not logged.
Lists
List endpoints return objects in reverse creation order:
{ "object": "list", "data": [ ... ] }limit is 1–100, default 20. Lists return recent records only and have no pagination; use reconciliation for complete data.
Rate limits
| Scope | Limit |
|---|---|
| Writes to one terminal (cart, print, scan, cash drawer, configuration) | About 60 per minute |
Retrieve a payment, GET /v1/payments/{id} | Unlimited |
Exceeding a limit returns 429 rate_limited with a Retry-After header in seconds.
Versions
API behavior is versioned by date. Backward-compatible changes such as new optional fields do not create a new version; breaking changes such as removing a field or changing a type or meaning do. Pin a version with:
Kuvex-Version: 2026-09-25| Version | Differences |
|---|---|
2026-09-25 | Current; used when no header is sent. Tip adjustment on an offline terminal returns 202 and is queued |
2026-09-15 | Cash drawer result status is dispatched. Default for SDK 1.0.6 and later |
2026-09-10 | Cash drawer result status is opened; tip adjustment on an offline terminal returns 409 terminal_offline |
- Responses echo
Kuvex-Version. - An unknown date returns
400 unsupported_api_version; a malformed value returns400 invalid_api_version. - A version is retired with at least 180 days' notice.
- Clients must ignore unknown response fields.