01 Understand 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.
Request Open checkout from the client with the SDK.
Authenticate Buyer completes card or wallet authentication.
Redirect paymentKey, orderId and amount are returned.
Confirm Call the confirm API — status becomes DONE.
💡 If the confirm API isn't called within 10 minutes of authentication, the payment expires automatically (EXPIRED).
02 API 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 key test_ck_KT2026D5GePWvyJnrK0W0k6gzMLvCopy
Secret key test_sk_KT2026zXLkKEypNArWmo50nmlJ4bCopy
⚠️ 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.)
03 Request payment (SDK)
Add the SDK script to your checkout page and call requestPayment() when the pay button is clicked.
HTML
React
<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>;
}
04 Confirm payment (API)
Validate the values passed to your successUrl on the server, then call the confirm API. Authenticate with Basic base64(secretKey:).
POST https://api.koratechit.com/v1/payments/confirm
Parameter Type Required Description
paymentKeystring Yes Unique payment key. Up to 200 chars
orderIdstring Yes Your order ID. Letters, digits, - _, 6–64 chars
amountinteger Yes Payment amount. Must match the requested amount
GET /v1/payments/{paymentKey}— Retrieve payment
POST /v1/payments/{paymentKey}/cancel— Cancel (partial supported)
05 Webhooks
Async events such as virtual account deposits and cancellations arrive via webhook. Verify the KT-Signature header on every request.
Node.js
Payload
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"
}
}
06 Payment status
Values of the status field on the payment object.
Status Description
READY Payment created, before buyer authentication
IN_PROGRESS Authenticated, awaiting confirm API call
WAITING_FOR_DEPOSIT Virtual account issued, awaiting deposit
DONE Payment approved
CANCELED Fully canceled
PARTIAL_CANCELED Partially canceled
ABORTED Approval failed
EXPIRED Expired after the validity window
07 Error codes
Errors are returned as { "code": "...", "message": "..." }.
HTTP Code Meaning · Action
400 INVALID_REQUESTMissing or malformed parameter
400 AMOUNT_MISMATCHRequested and confirmed amounts differ — check the order amount
401 UNAUTHORIZED_KEYInvalid secret key — check the key and encoding
403 REJECT_CARD_COMPANYDeclined by card issuer — offer another method
404 NOT_FOUND_PAYMENTpaymentKey does not exist
409 ALREADY_PROCESSEDPayment already confirmed or canceled
500 PROVIDER_ERRORTemporary error — retry later (use an idempotency key)
08 Fee calculator
Enter an amount and method to estimate fees and your settlement amount.
Amount (KRW)
Method
Credit / Debit card (3.2%)
Easy Pay (3.4%)
Bank transfer (2.0%)
Virtual account (₩300 / txn)
Settlement cycle
D+3 (standard)
D+1 (+0.2%)
Instant settlement (+0.5%)
Applied rate -
Processing fee -
VAT (10%) -
Est. settlement -
* Sample rates. Actual rates vary by industry, volume and contract terms.