Transactions/createTerminalPaymentSession
Start a payment on an assigned terminal
Light up an assigned reader and start one card-present payment.
POST
/v1/terminal/payment-sessionsCreate this from your POS or server when the customer is ready to pay. kepa sends the amount and currency to the assigned Android terminal, which owns card capture, EMV, PIN, host authorization, and reader completion. Reuse the same Idempotency-Key if this request times out; never create a second session for the same checkout attempt.
Request body
application/json
merchantIdstringOptional with a merchant API key; the key-bound merchant is authoritative.
terminalIdstringRequiredExample "TID-00012345"
operationenumRequiredPURCHASEREFUNDoriginalTransactionIdstringRequired for REFUND and forbidden for PURCHASE.
amountMinorintegerRequiredExample 1250
currencyCodestringRequiredExample "USD"
expiresInSecondsintegerResponse
application/json
idstringRequiredmerchantIdstringRequiredterminalIdstringRequiredExample "TID-00012345"
deviceIdstringRequiredExample "dev_01JQXYZ123456"
idempotencyKeystringRequiredStable key the terminal uses for the single host authorization attempt and all safe retries.
Example "sale-01JQXYZ123456"
claimTokenstringRequiredFencing token issued for this terminal claim. Every device event and authorization must echo it.
operationenumRequiredPURCHASEREFUNDoriginalTransactionIdstringamountMinorintegerRequiredExample 1999
currencyCodestringRequiredExample "USD"
statusenumRequiredCREATEDCLAIMEDIN_PROGRESSSUCCEEDEDDECLINEDCANCELEDFAILEDEXPIREDRECOVERY_REQUIREDpaymentIdstringExample "0195d46e-7088-7cc4-a9b2-5f9273cd63b8"
failureCodestringfinalAmountMinorintegerFinal amount authorized after any terminal tip.
tipAmountMinorintegerExample 0
lastEventSequenceintegerRequiredexpiresAtstring · ISO 8601RequiredExample "2026-04-09T09:14:22Z"
processingExpiresAtstring · ISO 8601Fifteen-minute deadline for a reader operation already in progress. If it passes without a verified final event, status becomes RECOVERY_REQUIRED and the command is never automatically reissued.
Example "2026-04-09T09:14:22Z"
authorizationStartedAtstring · ISO 8601Time the host serialized this session's single authorization attempt.
Example "2026-04-09T09:14:22Z"
completedAtstring · ISO 8601Example "2026-04-09T09:14:22Z"
createdAtstring · ISO 8601Example "2026-04-09T09:14:22Z"
updatedAtstring · ISO 8601Example "2026-04-09T09:14:22Z"
Good to know
- The terminal uses the session's exact currency, even when it differs from the device's default currency.
- expiresAt is the deadline to start reading a card. Once the reader starts, processingExpiresAt becomes the separate deadline for finishing the in-flight transaction.
- A session that loses contact while processing becomes RECOVERY_REQUIRED. It is never automatically sent to the reader again, because doing so could charge the card twice.
createTerminalPaymentSession