HTML Form Submit Integration API

This document explains how to invoke the Checkout by constructing an HTML Form directly. Integration is possible without any SDK dependency.


Basic Structure

<form id="paymentForm" method="POST" action="{BASE_URL}{ACTION_PATH}" target="{TARGET}">
    <input type="hidden" name="mchtId" value="merchant-id" />
    <input type="hidden" name="method" value="payment-method" />
    <!-- ... payment method-specific parameters -->
</form>

<script>
document.getElementById('paymentForm').submit();
</script>
ItemSandbox EnvironmentProduction Environment
BASE_URLhttps://tbnpg.settlebank.co.krhttps://npg.settlebank.co.kr

POST method is required

The Form's method must be POST. GET method is not supported.

Action URL by Payment Method

Payment MethodmethodAction URL
Credit Cardcard/card/main.do
Credit Card (Direct Call)card/card/cardDirect.do
Credit Card (International)card/card/abroad/main.do
Bank Transferbank/bank/main.do
Virtual Accountvbank/vbank/main.do
Virtual Account 010vbank010/vbank010/main.do
Mobile Paymentmobile/mobile/main.do
TeenCashteencash/gift/teenCash/main.do
CultureCashculturecash/gift/cultureCash/main.do
SmartCashsmartcash/gift/smartCash/main.do
BooknLifebooknlife/gift/booknlife/main.do
T-moneytmoney/tmoney/main.do
Pointpoint/point/main.do
Digital Walletcorp/corp/main.do

Implementation by UI Type

function openPaymentPopup() {
    const width = 430;
    const height = 660;
    const left = (screen.width - width) / 2;
    const top = (screen.height - height) / 2;

    const popup = window.open('', 'paymentPopup',
        `width=${width},height=${height},left=${left},top=${top},scrollbars=yes`
    );

    if (!popup) {
        alert('Popup was blocked. Please disable popup blocking and try again.');
        return;
    }

    document.getElementById('paymentForm').target = 'paymentPopup';
    document.getElementById('paymentForm').submit();
}

Current Window Method

<form id="paymentForm" method="POST"
      action="https://tbnpg.settlebank.co.kr/card/main.do"
      target="_self">
    <!-- parameters -->
</form>
  • Navigates to the Checkout within the current window
  • Redirects to nextUrl after payment completion

New Tab Method

<form id="paymentForm" method="POST"
      action="https://tbnpg.settlebank.co.kr/card/main.do"
      target="_blank">
    <!-- parameters -->
</form>
  • Displays the Checkout in a new tab
  • Uses the browser's default behavior

Differences from SDK

ItemSDKHTML Form Submit
Script LoadRequiredNot required
UI Typespopup, iframe, self, blankpopup, self, blank
Callback FunctionXX
Action URLHandled automaticallyMust be specified directly
Form CreationAutomaticManual
Popup HandlingAutomaticMust be implemented manually
NOTE

Receiving Payment Results

Both the SDK and HTML Form methods receive payment results via notiUrl (Server-to-Server). Actual order processing must be performed at notiUrl.

Server-Side Processing

The HTML Form Submit method also requires the backend to generate transaction amount encryption (AES-256) and request signature hash (SHA-256), the same as with the SDK.

NOTE

Encryption and Hash Generation Rules

Refer to the Before You Begin document for AES-256 encryption rules, SHA-256 hash generation order, and sandbox key information. Before You Begin — Encryption and Request Signature (pktHash)

Security Notice

Encryption keys and hash keys must only be used on the server. They must not be exposed to the client.

Payment Result Handling

After payment completion, the HTML Form Submit method redirects to the following URLs.

Result Reception Methods

URLDescriptionDelivery Method
nextUrlOn payment successResult parameters delivered via POST
cancUrlOn payment failure/cancellationResult parameters delivered via POST
notiUrlOn payment completion (server communication)Server-to-Server POST

Perform actual order processing at notiUrl

Because nextUrl is delivered through the browser, it may be missed due to network errors. Actual order processing (inventory deduction, DB updates) must be performed at notiUrl.

Response Parameters

Key parameters delivered to nextUrl after payment completion.

ParameterTypeDescription
outStatCdAN(4)Transaction status code
outRsltCdAN(4)Detailed result code (on failure)
outRsltMsgAHN(200)Result message
trdNoAN(40)Hecto Financial transaction number
mchtTrdNoAN(100)Merchant order number
trdAmtN(12)Transaction amount
methodA(10)Payment method

Key transaction status codes: 0021 (Success), 0031 (Failure), 0041 (Pending), 0051 (In Progress)

For detailed result handling, refer to the Webhooks (notiUrl) Integration Guide.


Payment Method-Specific Parameters

The HTML Form Submit integration method is the same for all payment methods. Refer to the Checkout Integration document for detailed parameters and Action URLs per payment method.

NOTE

Payment Method-Specific Parameters and Action URLs

Detailed parameters and Action URLs for 16 payment methods including credit card, bank transfer, virtual account, and mobile payment are available in the Checkout Integration document. Checkout Integration — Payment Method-Specific Parameters
💬

Need technical support?