Payments
| Endpoint | Description |
|---|---|
POST /v1/payments | Create a payment |
GET /v1/payments/{id} | Retrieve a payment |
GET /v1/payments | List payments |
POST /v1/payments/{id}/void | Cancel / void |
POST /v1/payments/{id}/refund | Refund |
POST /v1/payments/{id}/capture | Capture an authorization |
POST /v1/payments/{id}/tip | Adjust the tip |
POST /v1/payments/{id}/bind | Bind an external order reference |
POST /v1/payments/{id}/reprint | Reprint a receipt — coming soon |
GET /v1/payments/{id}/signature | Download the cardholder signature — coming soon |
POST /v1/payments/{id}/query | Request a status inquiry |
GET /v1/collections/{id} | Retrieve a collection |
Create a payment
POST /v1/paymentsStarts 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.
| Item | Value |
|---|---|
| Auth | Secret key, browser session token, host token |
| Idempotency | Idempotency-Key required, see Idempotency |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
amount_cents | int | Yes | Transaction amount in cents, greater than 0. The terminal charges exactly this amount, regardless of the cart on the customer display. |
terminal_id | String | Conditional | Terminal ID. Required with a secret key or host token; a browser session token is already bound to a terminal. |
order_id | String | No | Merchant 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. |
metadata | Object | No | Merchant data, echoed back. |
currency | String | No | usd only. Default usd. |
capture_method | String | No | Transaction type. automatic (default): sale. manual: authorization only; the payment stops at requires_capture until captured. |
tip_flow | String | No | Tip prompt. default: follow the terminal's tip setting; off: no tip prompt for this payment. Can only disable, never enable, tipping. |
tip_cents | int | No | Tip already collected, in cents. Suppresses the tip prompt (same as tip_flow=off). |
tip_presets_pct | Array<int> | No | Tip 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_id | String | No | For a partially_approved payment: pass its ID to collect the remaining balance. The new payment joins the same collection. |
collection_id | String | No | Add this payment to an existing collection. |
Request example
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.
{
"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)
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 400 | amount_invalid | Amount is not a positive integer | No |
| 400 | tip_flow_invalid | Invalid tip_flow, or an attempt to enable tipping the terminal has disabled | No |
| 400 | tip_presets_invalid | Invalid count, value or duplicate in tip_presets_pct, or combined with tip_cents / tip_flow=off. detail.reason: count / range / duplicate / tip_not_prompted | No |
| 404 | terminal_not_found | Terminal does not exist or belongs to another account | No |
| 409 | terminal_offline | Terminal is offline | Yes |
| 409 | terminal_busy | Terminal is processing another transaction | Yes |
| 409 | terminal_not_ready | Terminal is online but its payment module is not ready | Yes |
| 409 | terminal_livemode_mismatch | Key and terminal are in different modes (test / live) | No |
| 409 | sales_blocked | Card sales on the terminal are suspended by Kuvex risk control | No |
Retrieve a payment
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).
| Item | Value |
|---|---|
| Auth | Secret key, browser session token, host token |
| Rate limit | None |
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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Payment ID (pay_ prefix) |
Response: 200 OK
{
"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:
| Value | Meaning | Final | Recommended handling |
|---|---|---|---|
pending | Created; the terminal has not started processing (includes tip selection) | No | Wait |
processing | Terminal is processing | No | Wait |
succeeded | Approved and charged | Yes | Mark the order paid |
failed | Declined or not completed; nothing charged. Reason in failure.code | Yes | May retry with a new idempotency key |
canceled | Canceled, or voided; nothing charged | Yes | — |
review | Outcome unknown (e.g. the terminal lost connection mid-transaction); Kuvex is verifying | No | Do not charge again; wait for the next status |
partially_approved | Partial approval: the issuer approved only approved_amount_cents; remaining_cents is outstanding | Yes | Collect the balance with continue_from_payment_id, or void |
requires_capture | Authorization approved; awaiting capture | No | Capture or void |
offline_approved | Approved locally while the terminal was offline; not yet sent to the issuer | No | Merchant carries the risk. Becomes succeeded after upload, or failed (failure.code=offline_upload_declined) if declined |
void_pending | Void in progress | No | Wait |
partially_refunded | Partially refunded | Yes | — |
refunded | Fully refunded | Yes | — |
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
GET /v1/paymentsReturns recent payments in reverse creation order. No pagination; use reconciliation for a full day.
| Item | Value |
|---|---|
| Auth | Secret key, browser session token, host token |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | String | Conditional | Filter by terminal. Required with a host token. |
limit | int | No | Number of results, 1–100, default 20 |
Response: 200 OK
{ "object": "list", "data": [ { "id": "pay_3kTq9xV2mB7nL4pR8sWz", "status": "succeeded", "amount_cents": 3000 } ] }Cancel / void
POST /v1/payments/{id}/voidCancels or voids a payment, depending on its current status.
| Item | Value |
|---|---|
| Auth | Secret key. A host token can cancel only non-final payments it created |
| Idempotency | Idempotency-Key required |
Cancel: for pending and processing.
| Terminal state | Response | Outcome |
|---|---|---|
| Terminal has not received the payment | 200, status=canceled | Canceled |
| Terminal has received it, Runtime ≥ 294 | 202, cancel_requested=true | The 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 < 294 | 409 cancel_not_safe | No 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
202withvoid_idand the payment moves tovoid_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
| Parameter | Type | Required | Description |
|---|---|---|---|
via_terminal | boolean | No | Test mode only. true runs the void on the terminal as in live mode |
Errors
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 409 | cancel_not_safe | Terminal has the payment and cannot abort it | No |
| 409 | already_settled | Settled or refunded; cannot be voided | No |
| 409 | void_in_progress | Void already in progress | No |
| 409 | money_operation_in_progress | A capture, tip adjustment or refund is in progress | No |
| 409 | not_voidable | Status does not allow a void | No |
Refund
POST /v1/payments/{id}/refundRefunds all or part of a succeeded, partially_approved or partially_refunded payment.
| Item | Value |
|---|---|
| Auth | Secret key only |
| Idempotency | Idempotency-Key required |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
amount_cents | int | No | Refund amount in cents. Omit to refund the full refundable balance |
via_terminal | boolean | No | Test 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
200with the updated payment.
{ "refund_id": "ref_5hN2kW8qT1xV7mB4pL9s", "payment_id": "pay_3kTq9xV2mB7nL4pR8sWz", "amount_cents": 1000, "status": "pending" }Errors
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 400 | amount_invalid | Amount is not a positive integer, or nothing is refundable | No |
| 400 | refund_exceeds | Exceeds the refundable balance; detail.remaining_cents holds the balance | No |
| 409 | not_refundable | Status does not allow a refund | No |
| 409 | collection_under_review | Another payment in the collection has an unknown outcome | No |
| 409 | terminal_offline / terminal_busy | Live mode: terminal offline or busy | Yes |
| 409 | money_operation_in_progress | Another money operation is in progress | No |
Capture an authorization
POST /v1/payments/{id}/captureCaptures a requires_capture authorization.
| Item | Value |
|---|---|
| Auth | Secret key only |
| Idempotency | Idempotency-Key required |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
amount_cents | int | No | Capture 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
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 400 | amount_invalid | Amount is not an integer | No |
| 400 | config_invalid | Amount exceeds the authorized amount | No |
| 409 | not_capturable | Payment is not requires_capture | No |
| 409 | auth_expired | Authorization expired | No |
| 409 | capture_in_progress | Capture already in progress | No |
| 409 | terminal_offline | Terminal offline; not accepted | Yes |
| 409 | money_operation_in_progress | Another money operation is in progress | No |
Adjust the tip
POST /v1/payments/{id}/tipAdjusts the tip on a completed card payment before settlement (restaurant flow: charge the check amount, then add the tip written on the receipt).
| Item | Value |
|---|---|
| Auth | Secret key only |
| Idempotency | Idempotency-Key required |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
tip_cents | int | Yes | New total tip in cents |
Response: 202 Accepted
{ "tip_id": "tip_2vM8nQ4kT7xW1pL5sR9z", "payment_id": "pay_3kTq9xV2mB7nL4pR8sWz", "tip_cents": 600, "status": "pending", "delivery": "sent" }| Field | Type | Description |
|---|---|---|
delivery | String | sent: 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
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 409 | not_adjustable | Only succeeded and requires_capture can be adjusted | No |
| 409 | partial_needs_manual | Partially approved payments cannot be adjusted via the API; contact Kuvex support | No |
| 409 | tip_adjust_in_progress | Tip adjustment already in progress | No |
| 409 | money_operation_in_progress | Another money operation is in progress | No |
Bind an external order reference
POST /v1/payments/{id}/bindAssociates a merchant order reference with a payment the terminal completed on its own (integration mode 1). Also sets order_id if empty.
| Item | Value |
|---|---|
| Auth | Secret key |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
external_ref | String | Yes | Merchant order or transaction ID |
note | String | No | Note |
Response: 200 OK. Resubmitting the same external_ref returns the original result with replayed=true.
{ "id": "pay_3kTq9xV2mB7nL4pR8sWz", "external_ref": "ORDER-1042", "bound_at": "2026-11-30T18:30:00Z", "replayed": false }Errors
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 409 | already_bound | Bound to a different reference; cannot be overwritten | No |
Reprint a receipt
Coming soon
This endpoint is not available in production yet: calls return 404. This note is removed when it ships.
POST /v1/payments/{id}/reprintReprints the original receipt on the terminal that processed the payment.
| Item | Value |
|---|---|
| Auth | Secret key |
| 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 print job and never prints twice |
copy | String | No | customer: customer copy only. Omit for a full reprint |
refund_id | String | No | Reprint the receipt of this refund |
Response: 202 Accepted
{ "object": "print_job", "id": "prt_6bK3wN9qT2xM5pV8sL1r", "payment_id": "pay_3kTq9xV2mB7nL4pR8sWz",
"receipt_id": "rcpt_4tR7mK2qW9xN3pL6sV8b", "refund_id": null, "copy": null, "status": "dispatched", "replayed": false }| Field | Type | Description |
|---|---|---|
status | String | dispatched: 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
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 404 | receipt_not_found | The terminal has not printed this receipt | No |
| 409 | reprint_request_conflict | request_id already used for another receipt or copy | No |
Download the cardholder signature
Coming soon
This endpoint is not available in production yet: calls return 404. This note is removed when it ships.
GET /v1/payments/{id}/signatureReturns 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).
| Item | Value |
|---|---|
| Auth | Secret key |
Errors
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 404 | signature_not_found | No signature for this payment | No |
Request a status inquiry
POST /v1/payments/{id}/queryFor 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.
| Item | Value |
|---|---|
| Auth | Secret key, host token |
Response: 202 Accepted
Errors
| HTTP | Code | Description | Retriable |
|---|---|---|---|
| 409 | payment_query_not_needed | Payment is already final | No |
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.
GET /v1/collections/{collection_id}
GET /v1/collections?limit=20| Item | Value |
|---|---|
| Auth | Secret key |
Response example
{
"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"
}| Field | Type | Description |
|---|---|---|
status | String | open unpaid, partial partly paid, paid fully paid, resolving a payment has an unknown outcome, refunding, canceled |
requested_cents | int | Amount due |
confirmed_cents | int | Confirmed paid amount |
uncertain_cents | int | Amount with unknown outcome |
remaining_cents | int | Outstanding amount |
attempts | Array | Payments 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.
| Field | Type | Description |
|---|---|---|
id | String | Payment ID, pay_ prefix |
status | String | Transaction status, see Transaction status |
amount_cents | int | Transaction amount excluding tip, in cents |
tip_cents | int | Tip in cents. Omitted when zero; a tip chosen on the terminal or adjusted later can update after succeeded |
refunded_cents | int | Total refunded, in cents |
currency | String | Always usd |
terminal_id | String | Terminal ID |
order_id | String | Merchant order ID |
metadata | Object | Merchant data |
card | Object | Card 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_code | String | Issuer authorization code |
approved_amount_cents | int | Amount approved by the issuer; always present on partially_approved |
remaining_cents | int | Outstanding balance; only on partially_approved |
failure | Object | code, message; on failed, canceled and review |
needs_review | boolean | true while status=review |
safe_to_retry | boolean | true when Kuvex confirmed nothing was charged |
offline | boolean | true on offline approval |
risk | String | Risk statement for an offline approval |
auth_expires_at | String | Authorization expiry (ISO 8601); only on requires_capture |
collection_id | String | Collection ID |
tip_flow_effective | String | Tip flow applied: default / off |
tip_presets_pct | Array<int> | Tip percentages set for this payment; omitted when not set |
tip_selection | String | Tip-before-card state: awaiting, selected, withdrawn |
host_id | String | Store host that created the payment; only for host-token payments |
signature | Object | Cardholder signature: captured_at, sha256. Only on retrieve |
timeline | Array | Processing steps, each with step and at. Only on retrieve |
status_query | Object | Latest status inquiry result. Only on retrieve |
livemode | boolean | true live, false test |
created_at | String | Creation time, ISO 8601 (UTC) |