Settlements
Coming soon
The settlement endpoints on this page are not available in production yet: calls return 404. This note is removed when they ship.
| Endpoint | Description |
|---|---|
POST /v1/terminals/{id}/settle | Close the batch — coming soon |
GET /v1/settlements | List settlements — coming soon |
GET /v1/settlements/{id} | Retrieve a settlement — coming soon |
A batch close submits the terminal's current batch of card transactions to the acquirer for clearing. Before settlement, a completed payment can be voided and its tip adjusted; after settlement only a refund is possible.
Close the batch
POST /v1/terminals/{id}/settle| Item | Value |
|---|---|
| Auth | Secret key only |
| Idempotency | Deduplicated by request_id in the body |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
request_id | String | Yes | Unique request ID. The same value returns the same settlement with replayed=true and never closes the batch twice |
Request example
curl https://api.kuvex.com/v1/terminals/KV100023/settle \
-H "Authorization: Bearer $KUVEX_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"request_id": "close-2026-11-30"}'Response: 202 Accepted with a settlement in status=pending. Fields: Settlement fields. If the terminal disconnects after acceptance, the request is sent when it reconnects.
Result events
| Event | Description |
|---|---|
settlement.completed | Batch closed |
settlement.failed | Batch close failed; reason in failure_code. May be retried |
settlement.review_required | Outcome unknown, or no result from the terminal within 10 minutes (including while offline). Do not treat as failed; a later result moves it to succeeded or failed and sends the matching event |
Errors
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 409 | settlement_blocked | A transaction is in progress, or offline transactions are not yet uploaded | Yes |
| 409 | terminal_offline | Terminal is offline | Yes |
| 409 | settlement_in_progress | The previous settlement of this terminal has no result yet | Yes |
List settlements
GET /v1/settlementsReturns recent settlements in reverse order.
| Item | Value |
|---|---|
| Auth | Secret key |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | String | No | Filter by terminal |
limit | int | No | Number of results, 1–100, default 20 |
Retrieve a settlement
GET /v1/settlements/{id}| Item | Value |
|---|---|
| Auth | Secret key |
Response: 200 OK
{
"object": "settlement",
"id": "stl_7nW2kQ9tX4mV1pL8sR3b",
"terminal_id": "KV100023",
"status": "succeeded",
"initiated_by": "api",
"request_id": "close-2026-11-30",
"failure_code": null,
"period_start": "2026-11-29T23:02:10Z",
"requested_at": "2026-11-30T23:01:44Z",
"finished_at": "2026-11-30T23:01:52Z",
"totals_basis": "kuvex_ledger",
"totals": {
"card_cents": 184250,
"cash_cents": 0,
"gift_cents": 0,
"tip_cents": 21400,
"refund_cents": 1200,
"tx_count": 63,
"unsettled_count": 0
},
"livemode": true
}Settlement fields
| Field | Type | Description |
|---|---|---|
id | String | Settlement ID, stl_ prefix |
terminal_id | String | Terminal ID |
status | String | pending, succeeded, failed, review (outcome unknown) |
initiated_by | String | api: started by the merchant; kuvex: started by Kuvex support |
request_id | String | Request ID sent on creation |
failure_code | String | Failure reason |
period_start | String | Request time of the previous successful settlement; null for the first |
requested_at | String | Request time |
finished_at | String | Time the result was received |
totals_basis | String | Basis of the totals; always kuvex_ledger |
totals | Object | Batch totals, below |
replayed | boolean | Only on Close the batch: true if request_id was reused |
livemode | boolean | true for live mode |
totals (cents):
| Field | Type | Description |
|---|---|---|
card_cents | int | Approved card amount |
cash_cents | int | Cash amount |
gift_cents | int | Gift card amount |
tip_cents | int | Tip amount |
refund_cents | int | Refund amount |
tx_count | int | Transactions counted in the amounts |
unsettled_count | int | Transactions without a final outcome at request time (review, offline_approved, etc.); not in any amount |
totals is a snapshot taken at request time, covering transactions created on the terminal between period_start and requested_at in the state they had then; later refunds are not included. It is derived from Kuvex's transaction records; the acquirer's cleared amounts are authoritative and available through reconciliation.
If a new settlement is requested while a previous one is in review, the new one counts from the last successful settlement; if the earlier one later succeeds, the two totals overlap.