kepa
Terminal API/completeTerminalPreauthorization

Capture a terminal preauthorization

POST/api/v1/terminal/transactions/auth-complete
Capture all or part of an existing terminal pre-authorization. Business declines are returned as HTTP 200 with approved false and an ISO-style responseCode; transport or ownership failures use errors.

Request body

application/json

originalTransactionIdstringRequired
amountintegerRequired
Example 400
currencyCodestringRequired
Example "USD"
idempotencyKeystring

Compatibility body field; prefer the header.

Example "sale-01JQXYZ123456"
metadataobject

Response

application/json

paymentobject
transactionIdstringRequired
originalTransactionIdstringRequired
approvedbooleanRequired
Example true
responseCodestringRequired
Example "00"
amountintegerRequired
Example 400
currencyCodestringRequired
Example "USD"
statusstringRequired
Example "CAPTURED"
messagestring
Example "Preauthorization completed"

completeTerminalPreauthorization

POSTGo API
https://api.kepapay.co/api/v1/terminal/transactions/auth-complete
Request
curl https://api.kepapay.co/api/v1/terminal/transactions/auth-complete \
  -H "Authorization: Bearer $KEPA_DEVICE_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "originalTransactionId": "0195d46e-7088-7cc4-a9b2-5f9273cd63b8",
  "amount": 400,
  "currencyCode": "USD",
  "idempotencyKey": "sale-01JQXYZ123456",
  "metadata": {}
}'
Response
{
  "payment": {
    "id": "0195d46e-7088-7cc4-a9b2-5f9273cd63b8",
    "merchantId": "mch_123",
    "acceptanceChannel": "CARD_PRESENT",
    "status": "REQUIRES_PAYMENT_METHOD",
    "type": "SALE",
    "captureMethod": "AUTOMATIC",
    "capturedAmountMinor": 0,
    "authExpiresAt": "2026-04-09T09:14:22Z",
    "amountMinor": 2500,
    "baseAmountMinor": 2200,
    "currencyCode": "NZD",
    "tipAmountMinor": 0,
    "tipSource": "preset:1800",
    "cashbackAmountMinor": 0,
    "customerId": "cus_123",
    "referenceId": "POS-INV-20260328-001",
    "authorizationCode": "A12345",
    "responseCode": "00",
    "cardScheme": "VISA",
    "maskedPan": "************1234",
    "rrn": "262803141422",
    "decline": {
      "category": "INSUFFICIENT_FUNDS",
      "retryClass": "NEVER",
      "retryable": true,
      "networkResponseCode": "51",
      "customerMessage": "Your card was declined. Please try another card.",
      "merchantMessage": "Insufficient funds; ask the customer for another payment method."
    },
    "cardPresent": {
      "terminalId": "TID-00012345",
      "entryMode": "CONTACTLESS",
      "acceptanceMode": "KEPA_L2",
      "applicationLabel": "Visa Credit",
      "aid": "A0000000031010",
      "cryptogramType": "TC",
      "tvr": "0000000000",
      "cvmResult": "PIN"
    },
    "cardNotPresent": {
      "paymentIntentId": "pi_123",
      "paymentMethodId": "pm_123",
      "threeDsStatus": "AUTHENTICATED",
      "liabilityShift": true,
      "eci": "05",
      "setupFutureUsage": "OFF_SESSION"
    },
    "settlementId": "stl_01JQDAY00042",
    "metadata": {},
    "createdAt": "2026-04-09T09:14:22Z",
    "updatedAt": "2026-04-09T09:14:22Z"
  },
  "transactionId": "0195d46e-7088-7cc4-a9b2-5f9273cd63b8",
  "originalTransactionId": "0195d46e-7088-7cc4-a9b2-5f9273cd63b8",
  "approved": true,
  "responseCode": "00",
  "amount": 400,
  "currencyCode": "USD",
  "status": "CAPTURED",
  "message": "Preauthorization completed"
}