kepa Commerce API
A REST API for card payments. Predictable resource-oriented URLs, JSON request and response bodies, and standard HTTP verbs, response codes, and authentication. Take payments in person from a provisioned Android terminal or online with a hosted checkout and secure browser fields.
curl https://api.kepapay.co/api/v1/terminal/transactions/authorize \
-H "Authorization: Bearer $KEPA_DEVICE_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "deviceId": "dev_123", "terminalId": "TID-00012345",
"amount": 2500, "currencyCode": "USD", "transactionType": "purchase",
"entryMode": "Chip", "completionMode": "CONTACT_CHIP_SECOND_AC",
"panEncrypted": "<device-encrypted>", "accountDataKsn": "<account-ksn>" }'
# → { "approved": true, "authorizationCode": "A12345",
# "responseCode": "00", "transactionId": "txn_01JQ…" }Surfaces
Choose the guide for where you take payment. In-person payments start on an Android terminal; online payments start on your server and finish in the customer’s browser.
How an in-person payment works
Card data stays in the payment terminal. kepa authorizes the payment and returns one payment ID that you use for receipts, refunds, and support.
Capabilities
The API spans the payment lifecycle: accept, route, bill, and settle.
Accept
In person, online, or server-to-server. One integration across every surface, including saved cards on file.
Orchestrate
Soft declines retried, unavailable acquirers routed around. Cascading and failover across processors, on by default.
Bill
SoonSave a card, run subscriptions, raise invoices, and let customers self-serve from a billing portal.
Settle
Settlement, reconciliation, and payouts, with a ledger readable from the API.
Server and browser
Card-not-present splits across two credentials: the server creates the intent, the browser confirms it. This keeps your secret key out of the browser and card data off your server.
Your server
Create a payment intent or checkout session with your secret key. You get back a client secret, the only part the browser is allowed to see. Start at /v1/cnp/payment-intents.
The customer’s browser
Tokenize the card, run 3DS if the issuer asks, and confirm, all under /api/v1/cnp/public/ with a publishable key. Apple Pay and Google Pay use the same session.
Endpoints
Card present
35Take tap, insert, and PIN payments from a provisioned Android terminal.
Device
4Terminal health, connectivity, and status queries.
Transactions
10Orchestrated financial operations where the terminal manages the full lifecycle.
Terminal API
8Authorize, finish, recover, and reverse payments created on an Android terminal.
Transaction Management
3Query, poll, or abort transactions after they have been initiated.
Reconciliation
6Running totals and end-of-day settlement.
Device Interaction
3Display, input, and printer control for the terminal surface.
Card not present
33Online payments three ways (hosted page, Elements, or server-side), plus saved cards, subscriptions, and invoices.
Checkout
15Take an online payment two ways: a kepa-hosted page, or Elements rendered in your own checkout. Both keep you in SAQ A.
Server-side payments
4Charge from your server: a PAN from a PCI-L1 source, a vault token, or a saved card. Auth-and-capture and card-on-file live here.
Customers
3The saved-customer object that payment methods, subscriptions, and invoices hang off.
Subscriptions
7Recurring billing: prices and the subscription lifecycle.
Invoices
3Invoices raised by subscriptions, and their PDFs.
Billing portal
1A hosted page where customers update their card and download invoices.
Platform & staff
internal10Merchant provisioning and CNP configuration. kepa staff only.
Merchant Identity
10Provision merchants, manage lifecycle state, and issue or rotate API keys.