헥토파이낸셜 개발자센터
ProductsProducts
Payment Gateway
Cards, bank & digital wallets
My Bank Pay
Open banking debit
Easy Cash Payment
Stored-account payments
White-Label Payments
White-label checkout
Cash Receipt
Firm Banking
VAN Virtual Account
Prepaid Wallet
Integrate with LLMs
MCP server & AI chatbot
API & SDKAPI & SDK
Payment Gateway
Cards, bank & digital wallets
My Bank Pay
Open banking debit
Easy Cash Payment
Stored-account payments
White-Label Payments
White-label checkout
Cash Receipt
Firm Banking
VAN Virtual Account
Prepaid Wallet
블로그Blog
Service Status
Payment Gateway
My Bank Pay
Easy Cash Payment
White-Label Payments
Cash Receipt
Firm Banking
VAN Virtual Account
Prepaid Wallet
Integrate with LLMs
MCP 서버 및 AI 챗봇
Payment Gateway
My Bank Pay
Easy Cash Payment
White-Label Payments
Cash Receipt
Firm Banking
VAN Virtual Account
Prepaid Wallet
Blog
Technical blog & news
Service Status
Incidents and scheduled maintenance
Payment Gateway
Before You BeginServers & NetworkIntegration OverviewWebhooksCancellations & RefundsGo Live
Checkout IntegrationJavaScript SDKForm-Based Checkout Integration
Credit Card CheckoutCredit Card Direct APICredit Card WebhookCredit Card Deferred CaptureRegister Card (Billkey Checkout)Charge with Payment TokenDelete Payment TokenCancel Charge
Bank Transfer CheckoutBank Transfer WebhookBank Transfer Deferred CaptureCancel Bank Transfer
Virtual Account CheckoutVirtual Account Deposit WebhookIssue Virtual AccountFixed/Unlimited Virtual AccountModify Virtual AccountCancel Virtual AccountDeposit LookupRefund Virtual AccountSimulate Deposit
010 Virtual Account Overview010 Virtual Account CheckoutPhone Ownership Verification — RequestPhone Ownership Verification — ConfirmDuplicate Amount CheckIssue 010 Virtual AccountCancel 010 Virtual AccountRefund 010 Virtual Account010 Virtual Account Deposit WebhookSimulate 010 Deposit
Mobile Payment CheckoutMobile Payment WebhookMobile Payment — Two-Step CaptureMobile Recurring PaymentCancel Mobile PaymentRefund Mobile Payment
Gift Card CheckoutGift Card WebhookCancel Gift Card Payment
T-money CheckoutT-money WebhookCancel T-money Payment
Point Damoa CheckoutPoint Damoa WebhookPoint Damoa Deferred CaptureCancel Point Damoa Payment
Digital Wallets OverviewPAYCO CheckoutPAYCO SandboxSamsung Pay CheckoutKakaoPay CheckoutNaverPay CheckoutTossPay CheckoutDigital Wallet WebhookCancel Digital Wallet PaymentWallet Recurring PaymentSubscription StatusCancel Subscription
Real-time Transaction LookupReceipt (Sales Slip) Inquiry (No Auth)Receipt (Sales Slip) Inquiry (Auth)Transaction ReconciliationSettlement ReconciliationSub-Merchant RegistrationPreferential Settlement (SME)SME Refund Adjustment
Error CodesCard Issuer CodesBank CodesPayment Method CodesVirtual Account Bank Codes
My Bank Pay
Before You BeginServers & NetworkIntegration Overview
Checkout SDK
My Bank Pay — AuthenticateMy Bank Pay — CaptureMy Bank Pay — CancelMy Bank Pay — Network Cancel
Transaction Result LookupTransaction HistoryCash Receipt Lookup
Create Recurring TokenCharge via Recurring TokenCancel Subscription
Error CodesBank CodesBank Maintenance Schedule
Easy Cash Payment
Before You BeginServers & NetworkFirm Banking Integration Flow
Mobile Identity Verification — RequestMobile Identity Verification — ConfirmAccount Holder Name Lookup IAccount Holder Name Lookup IIAccount Holder Name (with Amount)Account Ownership VerificationAccount Ownership — RequestAccount Ownership — ConfirmIVR Verification — RequestIVR Verification — ConfirmOwnership Verification HistoryPayment PIN Verification
Register AccountDeregister AccountSelf-Service Account RegistrationKFTC Deregistered Account Lookup
Capture PaymentCancel / Refund PaymentSend RemittanceRemittance Account Balance
Create Recurring TokenCharge via Recurring TokenCancel SubscriptionSubscription DetailsSubscription History
Transaction Result LookupTransaction HistoryAccount ListSupported BanksBank Maintenance CheckOwnership Verification Bank MaintenanceConnectivity Test
Before You BeginServers & NetworkOpen Banking Integration Flow
Register AccountRegister Open Banking AccountDeregister Open Banking Service
Capture PaymentCancel PaymentSend Remittance
Submit Refund ClaimRefund Claim Status
Transaction Result LookupTransaction HistoryAccount ListWithdrawal Limit
Decline Code ReferenceBank Code ReferenceBank Maintenance Schedule
White-Label Payments
Before You BeginServers & NetworkIntegration Overview
Payment CheckoutCapture PaymentCancellations & Refunds
Inquiry
Error CodesBank CodesBank Maintenance Schedule
Cash Receipt
Before You BeginServers & NetworkIntegration Overview
Issue Cash ReceiptCancel Cash Receipt
Issuance Error LookupIssuance Status Lookup
Reprocessing RegistrationReprocessing Result Lookup
Reference
Firm Banking
Before You BeginIntegration Overview
Connection Management
Interbank TransferCollection TransferCollection Account SetupReserve Transfer (SC Bank)Trust Deposit (Woori Bank)
Transfer Failure WebhookTransaction Statement WebhookBill Statement WebhookBill Statement — Missing SequenceReserve Transfer Result Webhook (SC)Transfer Failure — Missing SequenceTransaction Detail — Missing Sequence
Account Holder Name LookupTransfer Result LookupBalance LookupReserve Transfer Result (SC)Auto Transfer Result (SC)
Transfer ReconciliationCollection ReconciliationWebhook Delivery Status
Connection Management
FX RemittanceCancel FX RemittanceFX Remittance Result WebhookFX Remittance Result — Missing SequenceFX Remittance (MX)FX Remittance Result Webhook (MX)FX Remittance — Missing Sequence (MX)
FX Same-Bank Holder LookupFX Account Holder LookupExchange Rate LookupExchange Rate Lookup (KEB)FX Remittance Result LookupFX Balance Lookup
FX Remittance ReconciliationFX Auto Transfer ReconciliationFX Same-Bank Remittance Reconciliation
FX Transaction Statement WebhookFX Transaction Statement — Missing Sequence
VAN Virtual Account
Getting Started with VAVSCommunication and Message FormatCommon Header
Recipient InquiryDeposit and Cancellation
RemittanceDeposit Balance Inquiry
Reconciliation
Account Holder InquiryActual Depositor NotificationActual Depositor FileMissing Actual Depositor InquiryWithdrawal Account Registration
Bank CodesResponse CodesChannel CodesBank Operating Hours
Prepaid Wallet
Before You BeginServers & NetworkIntegration Overview
Member Registration UIMy Account UI
Spend BalanceVoid SpendSend Money GiftRevoke Points
Balance LookupBalance OptionsBalance DetailsBalance by Top-upWithdrawable BalanceTransaction ListTransaction DetailsTransaction Details by StoreMember DetailsExpiring PointsTop-up Methods
Top-upCancel Top-upWithdraw FundsPending Withdrawal
Error CodesTransaction Type Codes

Tools

Encryption Test
Payment Gateway
Before You BeginServers & NetworkIntegration OverviewWebhooksCancellations & RefundsGo Live
Checkout IntegrationJavaScript SDKForm-Based Checkout Integration
Credit Card CheckoutCredit Card Direct APICredit Card WebhookCredit Card Deferred CaptureRegister Card (Billkey Checkout)Charge with Payment TokenDelete Payment TokenCancel Charge
Bank Transfer CheckoutBank Transfer WebhookBank Transfer Deferred CaptureCancel Bank Transfer
Virtual Account CheckoutVirtual Account Deposit WebhookIssue Virtual AccountFixed/Unlimited Virtual AccountModify Virtual AccountCancel Virtual AccountDeposit LookupRefund Virtual AccountSimulate Deposit
010 Virtual Account Overview010 Virtual Account CheckoutPhone Ownership Verification — RequestPhone Ownership Verification — ConfirmDuplicate Amount CheckIssue 010 Virtual AccountCancel 010 Virtual AccountRefund 010 Virtual Account010 Virtual Account Deposit WebhookSimulate 010 Deposit
Mobile Payment CheckoutMobile Payment WebhookMobile Payment — Two-Step CaptureMobile Recurring PaymentCancel Mobile PaymentRefund Mobile Payment
Gift Card CheckoutGift Card WebhookCancel Gift Card Payment
T-money CheckoutT-money WebhookCancel T-money Payment
Point Damoa CheckoutPoint Damoa WebhookPoint Damoa Deferred CaptureCancel Point Damoa Payment
Digital Wallets OverviewPAYCO CheckoutPAYCO SandboxSamsung Pay CheckoutKakaoPay CheckoutNaverPay CheckoutTossPay CheckoutDigital Wallet WebhookCancel Digital Wallet PaymentWallet Recurring PaymentSubscription StatusCancel Subscription
Real-time Transaction LookupReceipt (Sales Slip) Inquiry (No Auth)Receipt (Sales Slip) Inquiry (Auth)Transaction ReconciliationSettlement ReconciliationSub-Merchant RegistrationPreferential Settlement (SME)SME Refund Adjustment
Error CodesCard Issuer CodesBank CodesPayment Method CodesVirtual Account Bank Codes
My Bank Pay
Before You BeginServers & NetworkIntegration Overview
Checkout SDK
My Bank Pay — AuthenticateMy Bank Pay — CaptureMy Bank Pay — CancelMy Bank Pay — Network Cancel
Transaction Result LookupTransaction HistoryCash Receipt Lookup
Create Recurring TokenCharge via Recurring TokenCancel Subscription
Error CodesBank CodesBank Maintenance Schedule
Easy Cash Payment
Before You BeginServers & NetworkFirm Banking Integration Flow
Mobile Identity Verification — RequestMobile Identity Verification — ConfirmAccount Holder Name Lookup IAccount Holder Name Lookup IIAccount Holder Name (with Amount)Account Ownership VerificationAccount Ownership — RequestAccount Ownership — ConfirmIVR Verification — RequestIVR Verification — ConfirmOwnership Verification HistoryPayment PIN Verification
Register AccountDeregister AccountSelf-Service Account RegistrationKFTC Deregistered Account Lookup
Capture PaymentCancel / Refund PaymentSend RemittanceRemittance Account Balance
Create Recurring TokenCharge via Recurring TokenCancel SubscriptionSubscription DetailsSubscription History
Transaction Result LookupTransaction HistoryAccount ListSupported BanksBank Maintenance CheckOwnership Verification Bank MaintenanceConnectivity Test
Before You BeginServers & NetworkOpen Banking Integration Flow
Register AccountRegister Open Banking AccountDeregister Open Banking Service
Capture PaymentCancel PaymentSend Remittance
Submit Refund ClaimRefund Claim Status
Transaction Result LookupTransaction HistoryAccount ListWithdrawal Limit
Decline Code ReferenceBank Code ReferenceBank Maintenance Schedule
White-Label Payments
Before You BeginServers & NetworkIntegration Overview
Payment CheckoutCapture PaymentCancellations & Refunds
Inquiry
Error CodesBank CodesBank Maintenance Schedule
Cash Receipt
Before You BeginServers & NetworkIntegration Overview
Issue Cash ReceiptCancel Cash Receipt
Issuance Error LookupIssuance Status Lookup
Reprocessing RegistrationReprocessing Result Lookup
Reference
Firm Banking
Before You BeginIntegration Overview
Connection Management
Interbank TransferCollection TransferCollection Account SetupReserve Transfer (SC Bank)Trust Deposit (Woori Bank)
Transfer Failure WebhookTransaction Statement WebhookBill Statement WebhookBill Statement — Missing SequenceReserve Transfer Result Webhook (SC)Transfer Failure — Missing SequenceTransaction Detail — Missing Sequence
Account Holder Name LookupTransfer Result LookupBalance LookupReserve Transfer Result (SC)Auto Transfer Result (SC)
Transfer ReconciliationCollection ReconciliationWebhook Delivery Status
Connection Management
FX RemittanceCancel FX RemittanceFX Remittance Result WebhookFX Remittance Result — Missing SequenceFX Remittance (MX)FX Remittance Result Webhook (MX)FX Remittance — Missing Sequence (MX)
FX Same-Bank Holder LookupFX Account Holder LookupExchange Rate LookupExchange Rate Lookup (KEB)FX Remittance Result LookupFX Balance Lookup
FX Remittance ReconciliationFX Auto Transfer ReconciliationFX Same-Bank Remittance Reconciliation
FX Transaction Statement WebhookFX Transaction Statement — Missing Sequence
VAN Virtual Account
Getting Started with VAVSCommunication and Message FormatCommon Header
Recipient InquiryDeposit and Cancellation
RemittanceDeposit Balance Inquiry
Reconciliation
Account Holder InquiryActual Depositor NotificationActual Depositor FileMissing Actual Depositor InquiryWithdrawal Account Registration
Bank CodesResponse CodesChannel CodesBank Operating Hours
Prepaid Wallet
Before You BeginServers & NetworkIntegration Overview
Member Registration UIMy Account UI
Spend BalanceVoid SpendSend Money GiftRevoke Points
Balance LookupBalance OptionsBalance DetailsBalance by Top-upWithdrawable BalanceTransaction ListTransaction DetailsTransaction Details by StoreMember DetailsExpiring PointsTop-up Methods
Top-upCancel Top-upWithdraw FundsPending Withdrawal
Error CodesTransaction Type Codes

Tools

Encryption Test

Webhooks (notiUrl)

When a payment is completed, Hecto Financial's server sends the result directly to your server. This is called a webhook.

Webhook Integration is Required

Since nextUrl is delivered through the browser, it may be missed due to network errors. Actual order processing (inventory deduction, DB updates, etc.) must always be performed in the webhook handler (notiUrl).

How Webhooks Work

There are two ways to receive payment results.

Customer
Merchant
Hecto Financial
1Payment Request
Payment Request
2Launch Checkout
Launch Checkout
3Payment Processing
Payment Processing
4Webhook (notiUrl)
Webhook (notiUrl)
5Result Page (nextUrl)
Result Page (nextUrl)
6Redirect
Redirect
Delivery MethodDescriptionReliability
nextUrlBrowser redirectLow (network errors possible)
notiUrlDirect server-to-server communication (S2S)High (retry supported)
NOTE

Webhooks vs. Browser Redirect

Since notiUrl is sent directly from Hecto Financial's server to your server, results can be reliably received regardless of the customer's network status.

Communication Specification

All payment methods use the same specification.

ItemDetails
MethodPOST
Content-Typeapplication/x-www-form-urlencoded; charset=UTF-8
Response FormatPlain Text (OK or FAIL)
NOTE

Character Set Change Available

The character set can be provided as UTF-8 or EUC-KR. If you need a change, please contact our technical support at pgsupport@hecto.co.kr.

Response Handling

ResponseDescription
OKSuccess. Processed as webhook received.
FAIL or othersFailure. Resent up to the configured number of times.

Response Format Note

The response must be Plain Text 'OK' only. If spaces, line breaks, HTML tags, etc. are included, it will be considered a failure.

Hash Verification

Hash verification is required to prevent data tampering.

Hash Generation Rules

Webhook Hash VerificationpktHash

FieldParameter
Transaction status codeoutStatCd
Transaction date (first 8 digits of trdDtm)trdDt
Transaction time (last 6 digits of trdDtm)trdTm
Merchant IDmchtId
Merchant order numbermchtTrdNo
Transaction amounttrdAmt
License keylicenseKey
SHA256(outStatCd + trdDt + trdTm + mchtId + mchtTrdNo + trdAmt (unencrypted) + licenseKey)
NOTE

Extracting trdDt / trdTm

The webhook payload includes trdDtm (14 digits). When generating the hash, extract trdDt (first 8 digits) and trdTm (last 6 digits) from it.

Verification Example (Node.js)

const crypto = require('crypto');

function verifyNoti(data, licenseKey) {
  const { outStatCd, trdDtm, mchtId, mchtTrdNo, trdAmt, pktHash } = data;

  // Split date/time from trdDtm
  const trdDt = trdDtm.substring(0, 8);   // YYYYMMDD
  const trdTm = trdDtm.substring(8, 14);  // HHmmss

  // Generate hash
  const hashString = outStatCd + trdDt + trdTm + mchtId + mchtTrdNo + trdAmt + licenseKey; // trdAmt must be the plaintext (unencrypted) amount
  const calculatedHash = crypto.createHash('sha256').update(hashString, 'utf8').digest('hex');

  return pktHash === calculatedHash;
}

// Usage example
app.post('/noti/hecto', (req, res) => {
  if (!verifyNoti(req.body, HECTO_LICENSE_KEY)) {
    console.error('Hash verification failed');
    return res.send('FAIL');
  }

  // Payment processing logic...

  res.send('OK');
});

After Successful Verification

Once hash verification passes, your webhook handler should:

  1. Check outStatCd — 0021 means payment succeeded; 0031 means payment failed. Always return OK for both outcomes to prevent re-delivery.
  2. Prevent duplicate processing — Check mchtTrdNo against your database before updating order status.
  3. Update order status — On 0021, mark the order as paid and trigger fulfillment (inventory, shipping, email confirmation).
  4. Handle failures gracefully — On 0031, update the order status to failed and notify the customer if needed.
app.post('/noti/hecto', (req, res) => {
  if (!verifyNoti(req.body, HECTO_LICENSE_KEY)) {
    console.error('Hash verification failed');
    return res.send('FAIL');
  }

  const { outStatCd, mchtTrdNo } = req.body;

  // Prevent duplicate processing
  if (await isAlreadyProcessed(mchtTrdNo)) {
    return res.send('OK');
  }

  if (outStatCd === '0021') {
    await markOrderAsPaid(mchtTrdNo);
    await triggerFulfillment(mchtTrdNo);
  } else {
    await markOrderAsFailed(mchtTrdNo);
  }

  // Always return OK to stop retry attempts
  res.send('OK');
});

notiUrl Requirements

  • HTTPS is required (HTTP is not supported)
  • URL must be accessible from external networks
  • Notification server IPs must be allowed through the firewall — see Servers & Network > Webhook for the IP list

Both Primary and Secondary must be allowed

The Hecto Financial PG system runs across a primary and a secondary data center. Allow inbound access for both production IPs — if either is missing, notifications sent from that center will not be received during a failover.

Frequently Asked Questions

Webhooks are not being received

  1. Verify that the notiUrl is accessible from external networks
  2. Verify that the HTTPS certificate is valid
  3. Check firewall settings
  4. Verify that OK is returned as Plain Text in the response

Receiving duplicate webhooks

If OK is not returned in the response, the webhook will be resent. Check the response format.

When are cancellation webhooks sent?

Cancellation webhooks are not sent by default.

Since the result is received immediately in the response when calling the cancellation API, a separate webhook is not needed.

However, when cancellation is performed directly from the merchant admin panel, your server has no way of knowing the payment status, so it is possible to configure cancellation webhooks to be sent. If you need to receive cancellation webhooks, please request the configuration from your sales representative.

When cancellation webhook delivery is configured, it is sent to the notiUrl of the original transaction by default. If notiUrl was not set for the original transaction, please also provide a URL for cancellation webhooks.

💬

Need technical support?

Code Samples

HectoFinancial GitHub