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>
| Item | Sandbox Environment | Production Environment |
|---|---|---|
| BASE_URL | https://tbnpg.settlebank.co.kr | https://npg.settlebank.co.kr |
POST method is required
Action URL by Payment Method
| Payment Method | method | Action URL |
|---|---|---|
| Credit Card | card | /card/main.do |
| Credit Card (Direct Call) | card | /card/cardDirect.do |
| Credit Card (International) | card | /card/abroad/main.do |
| Bank Transfer | bank | /bank/main.do |
| Virtual Account | vbank | /vbank/main.do |
| Virtual Account 010 | vbank010 | /vbank010/main.do |
| Mobile Payment | mobile | /mobile/main.do |
| TeenCash | teencash | /gift/teenCash/main.do |
| CultureCash | culturecash | /gift/cultureCash/main.do |
| SmartCash | smartcash | /gift/smartCash/main.do |
| BooknLife | booknlife | /gift/booknlife/main.do |
| T-money | tmoney | /tmoney/main.do |
| Point | point | /point/main.do |
| Digital Wallet | corp | /corp/main.do |
Implementation by UI Type
Popup Method
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
nextUrlafter 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
| Item | SDK | HTML Form Submit |
|---|---|---|
| Script Load | Required | Not required |
| UI Types | popup, iframe, self, blank | popup, self, blank |
| Callback Function | X | X |
| Action URL | Handled automatically | Must be specified directly |
| Form Creation | Automatic | Manual |
| Popup Handling | Automatic | Must be implemented manually |
Receiving Payment Results
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.
Encryption and Hash Generation Rules
Security Notice
Payment Result Handling
After payment completion, the HTML Form Submit method redirects to the following URLs.
Result Reception Methods
| URL | Description | Delivery Method |
|---|---|---|
nextUrl | On payment success | Result parameters delivered via POST |
cancUrl | On payment failure/cancellation | Result parameters delivered via POST |
notiUrl | On payment completion (server communication) | Server-to-Server POST |
Perform actual order processing at notiUrl
Response Parameters
Key parameters delivered to nextUrl after payment completion.
| Parameter | Type | Description |
|---|---|---|
outStatCd | AN(4) | Transaction status code |
outRsltCd | AN(4) | Detailed result code (on failure) |
outRsltMsg | AHN(200) | Result message |
trdNo | AN(40) | Hecto Financial transaction number |
mchtTrdNo | AN(100) | Merchant order number |
trdAmt | N(12) | Transaction amount |
method | A(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.
Payment Method-Specific Parameters and Action URLs
Need technical support?
Code Samples
HectoFinancial GitHub