kepa
Terminal API/completeTerminalTransaction

Record terminal EMV completion

POST/api/v1/terminal/transactions/complete
Finish a contact-chip payment after authorization by reporting the result from the card. This updates the existing payment; it does not create another charge.

Request body

application/json

transactionIdstringRequired
railIdstring
Example "rail_01JQXYZ123456"
finalDecisionenumRequired
approveddeclined
issuerScriptResultsstring
emvTlvobject

completeTerminalTransaction

POSTGo API
https://api.kepapay.co/api/v1/terminal/transactions/complete
Request
curl https://api.kepapay.co/api/v1/terminal/transactions/complete \
  -H "Authorization: Bearer $KEPA_DEVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "transactionId": "0195d46e-7088-7cc4-a9b2-5f9273cd63b8",
  "railId": "rail_01JQXYZ123456",
  "finalDecision": "approved",
  "issuerScriptResults": "string",
  "emvTlv": {}
}'
Response
{
  "transactionId": "0195d46e-7088-7cc4-a9b2-5f9273cd63b8",
  "railId": "rail_01JQXYZ123456",
  "finalDecision": "approved",
  "issuerScriptResults": "string",
  "emvTlv": {},
  "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"
  }
}