kepa
Get started · In-person payments

Take an in-person payment

This guide is for teams building the software that runs on a provisioned Android payment terminal. It uses the live terminal API—there is no local HTTP server or fictional POS SDK in this flow.

Before you begin: you need a provisioned terminal, its device token, and an enabled test merchant. Device tokens belong only inside the secure terminal app.
01

Start in the terminal app

The Android terminal collects the card and PIN, if required. Your POS or backend must never collect or forward raw card numbers or PIN data.

02

Create one payment-attempt ID

Generate one unique value before authorization and send it as Idempotency-Key. Store it until the payment has a final result. Reuse it if the request times out.

03

Authorize the payment

The terminal sends the amount and encrypted card data to kepa. Check approved for the decision and store payment.id as your permanent reference.

04

Let the terminal finish the card interaction

For contact chip, give the issuer response back to the card and report the final result. Contactless terminals normally finish this during the original card interaction.

05

Recover instead of charging again

If the network fails after you send the request, look up the original attempt with the same idempotency key. Never start a second payment just because you did not receive the first response.