Sandbox is always on

Payments, integrated
in a few lines of code

New to payments? No problem. Copy-paste samples and test keys let you ship a working checkout today.

checkout.js
// 1. Initialize the SDK
const kt = KoratechPay('test_ck_KT2026xxxxxxxx');

// 2. Request a payment
await kt.requestPayment({
  method: 'CARD',
  amount: 39000,
  orderId: 'ORDER_20261008_001',
  orderName: 'Wool Blend Half Coat',
  successUrl: location.origin + '/success',
  failUrl: location.origin + '/fail'
});

Payment method

Total₩39,000

We save developers time

One-line integration

A single SDK covers cards, easy-pay wallets, bank transfer, virtual accounts and subscriptions.

No-code method control

Add, reorder or hide payment methods from the dashboard — no code changes required.

Secure server-side approval

Server approval blocks amount tampering, and signed webhooks keep every event trustworthy.

Copy, paste —
and you're integrated

Payment approval API samples. Always keep your secret key on the server.

// POST /api/payments/confirm  (Express)
import express from 'express';
const app = express();
app.use(express.json());

const SECRET_KEY = process.env.KT_SECRET_KEY; // test_sk_...
const auth = 'Basic ' + Buffer.from(SECRET_KEY + ':').toString('base64');

app.post('/api/payments/confirm', async (req, res) => {
  const { paymentKey, orderId, amount } = req.body;

  // Verify the amount — always compare with your DB
  const order = await db.orders.find(orderId);
  if (order.amount !== amount) return res.status(400).json({ code: 'AMOUNT_MISMATCH' });

  const r = await fetch('https://api.koratechit.com/v1/payments/confirm', {
    method: 'POST',
    headers: { Authorization: auth, 'Content-Type': 'application/json' },
    body: JSON.stringify({ paymentKey, orderId, amount })
  });
  const data = await r.json();
  res.status(r.status).json(data);
});
# pip install requests
import base64, os, requests

SECRET_KEY = os.environ["KT_SECRET_KEY"]  # test_sk_...
auth = base64.b64encode(f"{SECRET_KEY}:".encode()).decode()

def confirm_payment(payment_key, order_id, amount):
    r = requests.post(
        "https://api.koratechit.com/v1/payments/confirm",
        headers={"Authorization": f"Basic {auth}", "Content-Type": "application/json"},
        json={"paymentKey": payment_key, "orderId": order_id, "amount": amount},
        timeout=10,
    )
    r.raise_for_status()
    return r.json()  # status == "DONE"
// Java 11+ HttpClient
String secretKey = System.getenv("KT_SECRET_KEY");
String auth = "Basic " + Base64.getEncoder().encodeToString((secretKey + ":").getBytes());

String body = String.format(
  "{\"paymentKey\":\"%s\",\"orderId\":\"%s\",\"amount\":%d}", paymentKey, orderId, amount);

HttpRequest request = HttpRequest.newBuilder()
  .uri(URI.create("https://api.koratechit.com/v1/payments/confirm"))
  .header("Authorization", auth)
  .header("Content-Type", "application/json")
  .POST(HttpRequest.BodyPublishers.ofString(body))
  .build();

HttpResponse<String> response = HttpClient.newHttpClient()
  .send(request, HttpResponse.BodyHandlers.ofString());
<?php
$secretKey = getenv('KT_SECRET_KEY'); // test_sk_...
$payload = json_encode([
  'paymentKey' => $_POST['paymentKey'],
  'orderId'    => $_POST['orderId'],
  'amount'     => (int) $_POST['amount'],
]);

$ch = curl_init('https://api.koratechit.com/v1/payments/confirm');
curl_setopt_array($ch, [
  CURLOPT_POST           => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_USERPWD        => $secretKey . ':',
  CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
  CURLOPT_POSTFIELDS     => $payload,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
curl --request POST \
  --url https://api.koratechit.com/v1/payments/confirm \
  --user test_sk_KT2026xxxxxxxx: \
  --header 'Content-Type: application/json' \
  --data '{
    "paymentKey": "kt_pay_5EnNZRJGvaBX7zk2yd8ydw26XvwXkLrx9POLqKQjmAw4b0e1",
    "orderId": "ORDER_20261008_001",
    "amount": 39000
  }'

Quick integration guide

Complete a payment in four steps with the payment widget.

01Understand the payment flow

A KORATECH payment has three stages: request → authenticate → confirm. After the buyer authenticates, they're redirected to your successUrl; the payment completes only when your server calls the confirm API.

  1. RequestOpen checkout from the client with the SDK.
  2. AuthenticateBuyer completes card or wallet authentication.
  3. RedirectpaymentKey, orderId and amount are returned.
  4. ConfirmCall the confirm API — status becomes DONE.
💡If the confirm API isn't called within 10 minutes of authentication, the payment expires automatically (EXPIRED).

02API keys

Test keys unlock every feature, even before you sign a merchant contract. Use the client key in the browser and the secret key on your server only.

Client keytest_ck_KT2026D5GePWvyJnrK0W0k6gzMLv
Secret keytest_sk_KT2026zXLkKEypNArWmo50nmlJ4b
⚠️Never expose your secret key in client code or on GitHub. If it leaks, reissue it from the console immediately. (The keys above are demo values.)

03Request payment (SDK)

Add the SDK script to your checkout page and call requestPayment() when the pay button is clicked.

<script src="https://js.koratechit.com/v1/pay.js"></script>
<button id="payBtn">Pay now</button>
<script>
  const kt = KoratechPay('test_ck_KT2026D5GePWvyJnrK0W0k6gzMLv');
  document.getElementById('payBtn').addEventListener('click', () => {
    kt.requestPayment({
      method: 'CARD',            // CARD | EASY_PAY | TRANSFER | VIRTUAL_ACCOUNT
      amount: 39000,
      orderId: crypto.randomUUID(),
      orderName: 'Wool Blend Half Coat and 1 more',
      customerEmail: 'buyer@example.com',
      successUrl: location.origin + '/success',
      failUrl: location.origin + '/fail'
    });
  });
</script>
import { loadKoratechPay } from '@koratech/pay-sdk';

export default function CheckoutButton({ order }) {
  const onPay = async () => {
    const kt = await loadKoratechPay(process.env.NEXT_PUBLIC_KT_CLIENT_KEY);
    await kt.requestPayment({
      method: 'EASY_PAY',
      amount: order.amount,
      orderId: order.id,
      orderName: order.name,
      successUrl: `${window.location.origin}/success`,
      failUrl: `${window.location.origin}/fail`
    });
  };
  return <button onClick={onPay}>Pay now</button>;
}

04Confirm payment (API)

Validate the values passed to your successUrl on the server, then call the confirm API. Authenticate with Basic base64(secretKey:).

POSThttps://api.koratechit.com/v1/payments/confirm
ParameterTypeRequiredDescription
paymentKeystringYesUnique payment key. Up to 200 chars
orderIdstringYesYour order ID. Letters, digits, - _, 6–64 chars
amountintegerYesPayment amount. Must match the requested amount
GET/v1/payments/{paymentKey}— Retrieve payment
POST/v1/payments/{paymentKey}/cancel— Cancel (partial supported)

05Webhooks

Async events such as virtual account deposits and cancellations arrive via webhook. Verify the KT-Signature header on every request.

import crypto from 'crypto';

app.post('/webhooks/koratech', express.raw({ type: 'application/json' }), (req, res) => {
  const sig = req.header('KT-Signature');
  const expected = crypto.createHmac('sha256', process.env.KT_WEBHOOK_SECRET)
    .update(req.body).digest('hex');
  if (sig !== expected) return res.sendStatus(401);

  const event = JSON.parse(req.body);
  if (event.eventType === 'PAYMENT_STATUS_CHANGED') {
    // event.data.status: DONE | CANCELED | WAITING_FOR_DEPOSIT ...
  }
  res.sendStatus(200); // respond 200 within 10s; retried up to 7 times on failure
});
{
  "eventType": "PAYMENT_STATUS_CHANGED",
  "createdAt": "2026-10-08T10:30:00+09:00",
  "data": {
    "paymentKey": "kt_pay_5EnNZRJGvaBX7zk2yd8ydw26XvwXkLrx9POLqKQjmAw4b0e1",
    "orderId": "ORDER_20261008_001",
    "status": "DONE",
    "method": "CARD",
    "totalAmount": 39000,
    "approvedAt": "2026-10-08T10:29:58+09:00"
  }
}

06Payment status

Values of the status field on the payment object.

StatusDescription
READYPayment created, before buyer authentication
IN_PROGRESSAuthenticated, awaiting confirm API call
WAITING_FOR_DEPOSITVirtual account issued, awaiting deposit
DONEPayment approved
CANCELEDFully canceled
PARTIAL_CANCELEDPartially canceled
ABORTEDApproval failed
EXPIREDExpired after the validity window

07Error codes

Errors are returned as { "code": "...", "message": "..." }.

HTTPCodeMeaning · Action
400INVALID_REQUESTMissing or malformed parameter
400AMOUNT_MISMATCHRequested and confirmed amounts differ — check the order amount
401UNAUTHORIZED_KEYInvalid secret key — check the key and encoding
403REJECT_CARD_COMPANYDeclined by card issuer — offer another method
404NOT_FOUND_PAYMENTpaymentKey does not exist
409ALREADY_PROCESSEDPayment already confirmed or canceled
500PROVIDER_ERRORTemporary error — retry later (use an idempotency key)

08Fee calculator

Enter an amount and method to estimate fees and your settlement amount.

Applied rate-
Processing fee-
VAT (10%)-
Est. settlement-

* Sample rates. Actual rates vary by industry, volume and contract terms.

Start integrating
payments today