Skip to content

Payments ​

EndpointDescription
POST /v1/paymentsCreate a payment
GET /v1/payments/{id}Retrieve a payment
GET /v1/paymentsList payments
POST /v1/payments/{id}/voidCancel / void
POST /v1/payments/{id}/refundRefund
POST /v1/payments/{id}/captureCapture an authorization
POST /v1/payments/{id}/tipAdjust the tip
POST /v1/payments/{id}/bindBind an external order reference
POST /v1/payments/{id}/reprintReprint a receipt — coming soon
GET /v1/payments/{id}/signatureDownload the cardholder signature — coming soon
POST /v1/payments/{id}/queryRequest a status inquiry
GET /v1/collections/{id}Retrieve a collection

Create a payment ​

http
POST /v1/payments

Starts a card transaction on a terminal. The call is asynchronous: it returns at once with status=pending. The outcome is delivered by webhook (payment.* events) or read with Retrieve a payment.

ItemValue
AuthSecret key, browser session token, host token
IdempotencyIdempotency-Key required, see Idempotency

Request body

ParameterTypeRequiredDescription
amount_centsintYesTransaction amount in cents, greater than 0. The terminal charges exactly this amount, regardless of the cart on the customer display.
terminal_idStringConditionalTerminal ID. Required with a secret key or host token; a browser session token is already bound to a terminal.
order_idStringNoMerchant order ID, echoed back. If it matches the order_id of the cart on the customer display, the terminal goes from the cart straight to card entry.
metadataObjectNoMerchant data, echoed back.
currencyStringNousd only. Default usd.
capture_methodStringNoTransaction type. automatic (default): sale. manual: authorization only; the payment stops at requires_capture until captured.
tip_flowStringNoTip prompt. default: follow the terminal's tip setting; off: no tip prompt for this payment. Can only disable, never enable, tipping.
tip_centsintNoTip already collected, in cents. Suppresses the tip prompt (same as tip_flow=off).
tip_presets_pctArray<int>NoTip percentages offered for this payment, e.g. [15, 18, 20]: 1–4 distinct integers from 1 to 100, shown in the order given. Overrides the terminal's tip percentages; omit to use the terminal setting. Has no effect when tipping is disabled on the terminal. Cannot be combined with tip_cents or tip_flow=off.
continue_from_payment_idStringNoFor a partially_approved payment: pass its ID to collect the remaining balance. The new payment joins the same collection.
collection_idStringNoAdd this payment to an existing collection.

Request example

bash
curl https://api.kuvex.com/v1/payments \
  -H "Authorization: Bearer $KUVEX_SECRET_KEY" \
  -H "Idempotency-Key: 6f1c2a52-4c1e-4b8e-9a43-2f0c1f7d9e10" \
  -H "Content-Type: application/json" \
  -d '{"terminal_id": "KV100023", "amount_cents": 3000, "order_id": "A-1042"}'

Response: 201 Created with the payment. Fields: Payment fields.

json
{
  "id": "pay_3kTq9xV2mB7nL4pR8sWz",
  "status": "pending",
  "amount_cents": 3000,
  "currency": "usd",
  "terminal_id": "KV100023",
  "order_id": "A-1042",
  "livemode": false,
  "created_at": "2026-11-30T18:24:05Z"
}

Errors (no payment is created)

HTTPCodeDescriptionRetriable
400amount_invalidAmount is not a positive integerNo
400tip_flow_invalidInvalid tip_flow, or an attempt to enable tipping the terminal has disabledNo
400tip_presets_invalidInvalid count, value or duplicate in tip_presets_pct, or combined with tip_cents / tip_flow=off. detail.reason: count / range / duplicate / tip_not_promptedNo
404terminal_not_foundTerminal does not exist or belongs to another accountNo
409terminal_offlineTerminal is offlineYes
409terminal_busyTerminal is processing another transactionYes
409terminal_not_readyTerminal is online but its payment module is not readyYes
409terminal_livemode_mismatchKey and terminal are in different modes (test / live)No
409sales_blockedCard sales on the terminal are suspended by Kuvex risk controlNo

Retrieve a payment ​

http
GET /v1/payments/{id}

Returns the current state of a payment. In addition to the create response, includes timeline (processing steps) and signature (when the cardholder signed).

ItemValue
AuthSecret key, browser session token, host token
Rate limitNone

Callers that cannot receive webhooks (such as a store host in companion mode) poll this endpoint at about 1-second intervals until status is final.

Path parameters

ParameterTypeRequiredDescription
idStringYesPayment ID (pay_ prefix)

Response: 200 OK

json
{
  "id": "pay_3kTq9xV2mB7nL4pR8sWz",
  "status": "succeeded",
  "amount_cents": 3000,
  "tip_cents": 450,
  "currency": "usd",
  "refunded_cents": 0,
  "terminal_id": "KV100023",
  "order_id": "A-1042",
  "card": { "brand": "visa", "last4": "4242", "entry_mode": "tap" },
  "auth_code": "492555",
  "failure": null,
  "livemode": false,
  "created_at": "2026-11-30T18:24:05Z",
  "timeline": [
    { "step": "created", "at": "2026-11-30T18:24:05Z" },
    { "step": "webhook_sent", "at": "2026-11-30T18:24:11Z" }
  ]
}

Transaction status ​

Values of status:

ValueMeaningFinalRecommended handling
pendingCreated; the terminal has not started processing (includes tip selection)NoWait
processingTerminal is processingNoWait
succeededApproved and chargedYesMark the order paid
failedDeclined or not completed; nothing charged. Reason in failure.codeYesMay retry with a new idempotency key
canceledCanceled, or voided; nothing chargedYes—
reviewOutcome unknown (e.g. the terminal lost connection mid-transaction); Kuvex is verifyingNoDo not charge again; wait for the next status
partially_approvedPartial approval: the issuer approved only approved_amount_cents; remaining_cents is outstandingYesCollect the balance with continue_from_payment_id, or void
requires_captureAuthorization approved; awaiting captureNoCapture or void
offline_approvedApproved locally while the terminal was offline; not yet sent to the issuerNoMerchant carries the risk. Becomes succeeded after upload, or failed (failure.code=offline_upload_declined) if declined
void_pendingVoid in progressNoWait
partially_refundedPartially refundedYes—
refundedFully refundedYes—

Authorizations expire after 7 days (auth_expires_at). After expiry, capture returns 409 auth_expired; Kuvex voids the authorization to release the hold and sends payment.canceled with reason=authorization_expired.

List payments ​

http
GET /v1/payments

Returns recent payments in reverse creation order. No pagination; use reconciliation for a full day.

ItemValue
AuthSecret key, browser session token, host token

Query parameters

ParameterTypeRequiredDescription
terminal_idStringConditionalFilter by terminal. Required with a host token.
limitintNoNumber of results, 1–100, default 20

Response: 200 OK

json
{ "object": "list", "data": [ { "id": "pay_3kTq9xV2mB7nL4pR8sWz", "status": "succeeded", "amount_cents": 3000 } ] }

Cancel / void ​

http
POST /v1/payments/{id}/void

Cancels or voids a payment, depending on its current status.

ItemValue
AuthSecret key. A host token can cancel only non-final payments it created
IdempotencyIdempotency-Key required

Cancel: for pending and processing.

Terminal stateResponseOutcome
Terminal has not received the payment200, status=canceledCanceled
Terminal has received it, Runtime ≥ 294202, cancel_requested=trueThe terminal aborts if no card has been read, and the payment becomes failed (failure.code=canceled); otherwise it completes with the actual result. Keep polling
Terminal has received it, Runtime < 294409 cancel_not_safeNo change; wait for the outcome

Void: for succeeded, partially_approved and requires_capture, before settlement. Secret key only.

  • Live mode: executed by the terminal; returns 202 with void_id and the payment moves to void_pending. Result events: payment.canceled (success), void.failed (failure), void.review_required (unknown).
  • Test mode: completes synchronously with 200.

Settled payments cannot be voided; use Refund.

Request body

ParameterTypeRequiredDescription
via_terminalbooleanNoTest mode only. true runs the void on the terminal as in live mode

Errors

HTTPCodeDescriptionRetriable
409cancel_not_safeTerminal has the payment and cannot abort itNo
409already_settledSettled or refunded; cannot be voidedNo
409void_in_progressVoid already in progressNo
409money_operation_in_progressA capture, tip adjustment or refund is in progressNo
409not_voidableStatus does not allow a voidNo

Refund ​

http
POST /v1/payments/{id}/refund

Refunds all or part of a succeeded, partially_approved or partially_refunded payment.

ItemValue
AuthSecret key only
IdempotencyIdempotency-Key required

Request body

ParameterTypeRequiredDescription
amount_centsintNoRefund amount in cents. Omit to refund the full refundable balance
via_terminalbooleanNoTest mode only. true runs the refund on the terminal as in live mode

Response

  • Live mode: executed by the terminal (online and idle); returns 202. Result events: payment.refunded (success), refund.failed (failure), refund.review_required (unknown; do not refund again).
  • Test mode: completes synchronously; returns 200 with the updated payment.
json
{ "refund_id": "ref_5hN2kW8qT1xV7mB4pL9s", "payment_id": "pay_3kTq9xV2mB7nL4pR8sWz", "amount_cents": 1000, "status": "pending" }

Errors

HTTPCodeDescriptionRetriable
400amount_invalidAmount is not a positive integer, or nothing is refundableNo
400refund_exceedsExceeds the refundable balance; detail.remaining_cents holds the balanceNo
409not_refundableStatus does not allow a refundNo
409collection_under_reviewAnother payment in the collection has an unknown outcomeNo
409terminal_offline / terminal_busyLive mode: terminal offline or busyYes
409money_operation_in_progressAnother money operation is in progressNo

Capture an authorization ​

http
POST /v1/payments/{id}/capture

Captures a requires_capture authorization.

ItemValue
AuthSecret key only
IdempotencyIdempotency-Key required

Request body

ParameterTypeRequiredDescription
amount_centsintNoCapture amount in cents. Omit to capture the authorized amount; cannot exceed it

Response: 202 Accepted with capture_id. If the terminal goes offline after acceptance, the capture is sent when it reconnects. Result events: payment.completed (success), capture.failed (failure), payment.review_required (unknown, with data.capture_id).

Errors

HTTPCodeDescriptionRetriable
400amount_invalidAmount is not an integerNo
400config_invalidAmount exceeds the authorized amountNo
409not_capturablePayment is not requires_captureNo
409auth_expiredAuthorization expiredNo
409capture_in_progressCapture already in progressNo
409terminal_offlineTerminal offline; not acceptedYes
409money_operation_in_progressAnother money operation is in progressNo

Adjust the tip ​

http
POST /v1/payments/{id}/tip

Adjusts the tip on a completed card payment before settlement (restaurant flow: charge the check amount, then add the tip written on the receipt).

ItemValue
AuthSecret key only
IdempotencyIdempotency-Key required

Request body

ParameterTypeRequiredDescription
tip_centsintYesNew total tip in cents

Response: 202 Accepted

json
{ "tip_id": "tip_2vM8nQ4kT7xW1pL5sR9z", "payment_id": "pay_3kTq9xV2mB7nL4pR8sWz", "tip_cents": 600, "status": "pending", "delivery": "sent" }
FieldTypeDescription
deliveryStringsent: dispatched to the terminal; queued: terminal offline, sent on reconnect

A successful adjustment sends no event; read tip_cents on the payment. Failure sends tip.failed; an unknown outcome sends tip.review_required.

Errors

HTTPCodeDescriptionRetriable
409not_adjustableOnly succeeded and requires_capture can be adjustedNo
409partial_needs_manualPartially approved payments cannot be adjusted via the API; contact Kuvex supportNo
409tip_adjust_in_progressTip adjustment already in progressNo
409money_operation_in_progressAnother money operation is in progressNo

Bind an external order reference ​

http
POST /v1/payments/{id}/bind

Associates a merchant order reference with a payment the terminal completed on its own (integration mode 1). Also sets order_id if empty.

ItemValue
AuthSecret key

Request body

ParameterTypeRequiredDescription
external_refStringYesMerchant order or transaction ID
noteStringNoNote

Response: 200 OK. Resubmitting the same external_ref returns the original result with replayed=true.

json
{ "id": "pay_3kTq9xV2mB7nL4pR8sWz", "external_ref": "ORDER-1042", "bound_at": "2026-11-30T18:30:00Z", "replayed": false }

Errors

HTTPCodeDescriptionRetriable
409already_boundBound to a different reference; cannot be overwrittenNo

Reprint a receipt ​

Coming soon

This endpoint is not available in production yet: calls return 404. This note is removed when it ships.

http
POST /v1/payments/{id}/reprint

Reprints the original receipt on the terminal that processed the payment.

ItemValue
AuthSecret key
IdempotencyDeduplicated by request_id in the body

Request body

ParameterTypeRequiredDescription
request_idStringYesUnique request ID. The same value returns the same print job and never prints twice
copyStringNocustomer: customer copy only. Omit for a full reprint
refund_idStringNoReprint the receipt of this refund

Response: 202 Accepted

json
{ "object": "print_job", "id": "prt_6bK3wN9qT2xM5pV8sL1r", "payment_id": "pay_3kTq9xV2mB7nL4pR8sWz",
  "receipt_id": "rcpt_4tR7mK2qW9xN3pL6sV8b", "refund_id": null, "copy": null, "status": "dispatched", "replayed": false }
FieldTypeDescription
statusStringdispatched: sent to the terminal; queued: terminal offline, printed on reconnect

Result events: print.succeeded, print.failed, print.delivery_unknown, with the same id. Customer-copy reprints send no events.

Errors

HTTPCodeDescriptionRetriable
404receipt_not_foundThe terminal has not printed this receiptNo
409reprint_request_conflictrequest_id already used for another receipt or copyNo

Download the cardholder signature ​

Coming soon

This endpoint is not available in production yet: calls return 404. This note is removed when it ships.

http
GET /v1/payments/{id}/signature

Returns the signature captured on the terminal as image/png. The Kuvex-Signature-Sha256 header is the SHA-256 of the image and equals signature.sha256 on the payment. A payment.signature_captured event is sent when the signature is uploaded. Whether a signature is required is a terminal setting (off / always / above an amount, tip included).

ItemValue
AuthSecret key

Errors

HTTPCodeDescriptionRetriable
404signature_not_foundNo signature for this paymentNo

Request a status inquiry ​

http
POST /v1/payments/{id}/query

For a pending, processing or review payment, instructs the original terminal to query the acquirer again. The result is recorded in the payment's status_query field for Kuvex's verification; the outcome is still given by status. Never creates a new charge.

ItemValue
AuthSecret key, host token

Response: 202 Accepted

Errors

HTTPCodeDescriptionRetriable
409payment_query_not_neededPayment is already finalNo

Money operation exclusivity ​

Capture, void, tip adjustment and refund on the same payment are mutually exclusive. While one is in progress or its outcome is unknown, starting another returns 409 money_operation_in_progress; wait for the first operation's result event.

Collections ​

A collection holds all payment attempts for one order. A normal payment is a collection of one; after a partial approval, the balance payment joins the same collection (same collection_id). collection.completed is sent when the collection is fully paid.

http
GET /v1/collections/{collection_id}
GET /v1/collections?limit=20
ItemValue
AuthSecret key

Response example

json
{
  "id": "col_8fJw2KqT5nX1mR6pZ3vY",
  "object": "payment_collection",
  "status": "paid",
  "terminal_id": "KV100023",
  "order_id": "A-1042",
  "requested_cents": 3000,
  "confirmed_cents": 3000,
  "uncertain_cents": 0,
  "remaining_cents": 0,
  "created_at": "2026-11-30T18:24:05Z"
}
FieldTypeDescription
statusStringopen unpaid, partial partly paid, paid fully paid, resolving a payment has an unknown outcome, refunding, canceled
requested_centsintAmount due
confirmed_centsintConfirmed paid amount
uncertain_centsintAmount with unknown outcome
remaining_centsintOutstanding amount
attemptsArrayPayments in the collection; only on retrieve

Payment fields ​

Returned by Create a payment, Retrieve a payment, and in webhook data.payment. Optional fields without a value may be omitted.

FieldTypeDescription
idStringPayment ID, pay_ prefix
statusStringTransaction status, see Transaction status
amount_centsintTransaction amount excluding tip, in cents
tip_centsintTip in cents. Omitted when zero; a tip chosen on the terminal or adjusted later can update after succeeded
refunded_centsintTotal refunded, in cents
currencyStringAlways usd
terminal_idStringTerminal ID
order_idStringMerchant order ID
metadataObjectMerchant data
cardObjectCard details once read: brand (e.g. visa), last4, entry_mode (tap contactless, insert chip, swipe magstripe, keyed manual entry). Never the full card number
auth_codeStringIssuer authorization code
approved_amount_centsintAmount approved by the issuer; always present on partially_approved
remaining_centsintOutstanding balance; only on partially_approved
failureObjectcode, message; on failed, canceled and review
needs_reviewbooleantrue while status=review
safe_to_retrybooleantrue when Kuvex confirmed nothing was charged
offlinebooleantrue on offline approval
riskStringRisk statement for an offline approval
auth_expires_atStringAuthorization expiry (ISO 8601); only on requires_capture
collection_idStringCollection ID
tip_flow_effectiveStringTip flow applied: default / off
tip_presets_pctArray<int>Tip percentages set for this payment; omitted when not set
tip_selectionStringTip-before-card state: awaiting, selected, withdrawn
host_idStringStore host that created the payment; only for host-token payments
signatureObjectCardholder signature: captured_at, sha256. Only on retrieve
timelineArrayProcessing steps, each with step and at. Only on retrieve
status_queryObjectLatest status inquiry result. Only on retrieve
livemodebooleantrue live, false test
created_atStringCreation time, ISO 8601 (UTC)