Libraries
Use the REST API from your server and kepa.js in the browser.
kepa does not currently publish Node, Python, Go, Ruby, or general-purpose Kotlin client packages. Examples that used those fictional packages have been removed.
Server integrations
Call the JSON REST API with the HTTP client you already use. Keep your secret key in server-side environment configuration or a secret manager.
const response = await fetch("https://api.kepapay.co/v1/cnp/payment-intents", {
method: "POST",
headers: {
"X-Api-Key": process.env.KEPA_SECRET_KEY,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
merchantId: "mch_123",
amountMinor: 2500,
currencyCode: "USD",
}),
});
if (!response.ok) throw new Error(await response.text());
const paymentIntent = await response.json();Browser checkout
kepa.js is the shipped browser library. It renders kepa-hosted payment fields so raw card data does not enter your page.
<script src="https://api.kepapay.co/kepa.js"></script>
<script>
const kepa = Kepa("pk_kepa_...");
const payment = kepa.elements().create("payment");
payment.mount("#payment-element");
</script>Android terminal integration
The terminal code is part of the secure Android payment application, not a merchant-facing SDK. If you are building or certifying terminal software, start with the in-person payment guide and the live terminal API reference.