Skip to content

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.

EndpointDescription
POST /v1/terminals/{id}/settleClose the batch — coming soon
GET /v1/settlementsList 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 ​

http
POST /v1/terminals/{id}/settle
ItemValue
AuthSecret key only
IdempotencyDeduplicated by request_id in the body

Request body

ParameterTypeRequiredDescription
request_idStringYesUnique request ID. The same value returns the same settlement with replayed=true and never closes the batch twice

Request example

bash
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

EventDescription
settlement.completedBatch closed
settlement.failedBatch close failed; reason in failure_code. May be retried
settlement.review_requiredOutcome 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

HTTPCodeDescriptionRetriable
409settlement_blockedA transaction is in progress, or offline transactions are not yet uploadedYes
409terminal_offlineTerminal is offlineYes
409settlement_in_progressThe previous settlement of this terminal has no result yetYes

List settlements ​

http
GET /v1/settlements

Returns recent settlements in reverse order.

ItemValue
AuthSecret key

Query parameters

ParameterTypeRequiredDescription
terminal_idStringNoFilter by terminal
limitintNoNumber of results, 1–100, default 20

Retrieve a settlement ​

http
GET /v1/settlements/{id}
ItemValue
AuthSecret key

Response: 200 OK

json
{
  "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 ​

FieldTypeDescription
idStringSettlement ID, stl_ prefix
terminal_idStringTerminal ID
statusStringpending, succeeded, failed, review (outcome unknown)
initiated_byStringapi: started by the merchant; kuvex: started by Kuvex support
request_idStringRequest ID sent on creation
failure_codeStringFailure reason
period_startStringRequest time of the previous successful settlement; null for the first
requested_atStringRequest time
finished_atStringTime the result was received
totals_basisStringBasis of the totals; always kuvex_ledger
totalsObjectBatch totals, below
replayedbooleanOnly on Close the batch: true if request_id was reused
livemodebooleantrue for live mode

totals (cents):

FieldTypeDescription
card_centsintApproved card amount
cash_centsintCash amount
gift_centsintGift card amount
tip_centsintTip amount
refund_centsintRefund amount
tx_countintTransactions counted in the amounts
unsettled_countintTransactions 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.