Full Integration Flow

Real-Time Firm Banking operates via TCP/IP socket connection → message send/receive → immediate processing.


Overview

Merchant
Hecto Financial
Bank
11. TCP/IP socket connection
22. Send transaction message (payment/collection/inquiry)
33. Forward message to bank
44. Receive bank response
55. Return transaction result
66. Send notification message (if applicable)
77. Forward notification message

Real-Time Processing

Real-Time Firm Banking communicates with the bank immediately upon receiving a transaction request and returns the result. Check bank maintenance windows and business hours.

Selecting a Communication Method

Real-Time Firm Banking supports two communication methods.

Synchronous Communication (Per-Transaction Connection)

Opens and closes a socket connection for each transaction.

StepStageDirection
1Socket connectionMerchant → Hecto Financial
2Send transaction messageMerchant → Hecto Financial
3Receive transaction responseHecto Financial → Merchant
4Close socketMerchant → Hecto Financial
ItemDetails
Advantages• Simple to implement
• No session management required
Disadvantages• Connection/close overhead per transaction
Suitable For• Low transaction frequency
• Preference for a simple architecture

Asynchronous Communication (Session Maintenance)

Maintains a session to process multiple transactions.

StepStageMessage CodeDirectionNotes
1Socket connection-Merchant → Hecto FinancialOnce
2Send transaction messagePayment, collection, inquiry, etc.Merchant → Hecto FinancialRepeated
3Receive transaction response-Hecto Financial → MerchantRepeated
4Send polling message-Merchant → Hecto FinancialEvery 5 minutes
5Receive polling response-Hecto Financial → MerchantEvery 5 minutes
ItemDetails
Advantages• Reduced connection overhead
• Efficient for bulk transaction processing
Disadvantages• Polling management required
• Increased session management complexity
Suitable For• High transaction frequency
• Bulk transaction processing requirements
NOTE

Polling Interval

When using the session maintenance method, send a polling message every 5 minutes (300 seconds) to keep the session alive. Hecto Financial polling occurs when there are no transactions for 5 minutes.

Step 1: Socket Connection

The merchant server establishes a TCP/IP socket connection to the Hecto Financial firm banking server.

Connection Information

ItemDetails
ProtocolTCP/IP
Server IPProvided by Hecto Financial (after contract)
PortProvided by Hecto Financial (after contract)

Business Start Message

Send the business start message (1000/100) before starting operations each day.

Management Message Documentation


Step 2: Send and Receive Transaction Messages

Once connected, send and receive various transaction messages.

KRW Firm Banking Key Transaction Types

Message CodeBusiness TypeTransaction Type
2000100Payment transfer (same-bank/inter-bank remittance)
2000200Collection transfer (withdrawal transfer)
2000550Auto-transfer account registration
6000100Account holder inquiry
7000100Transfer result inquiry
7000200Balance inquiry
7000300Transfer summary
7000400Collection transfer summary
3000100Inter-bank transfer failure notification
3000200Inter-bank transfer failure notification missing sequence
4000100Deposit transaction detail notification
4000200Deposit transaction detail notification missing sequence

Foreign Currency Firm Banking Key Transaction Types

Message CodeBusiness TypeTransaction Type
2000400Foreign currency remittance
2000401Foreign currency remittance (MX)
2000420Foreign currency auto-transfer
2000520Foreign currency auto-transfer agreement registration
2000600Foreign currency remittance cancellation
3000700Foreign currency remittance result notification
3000701Foreign currency remittance result notification (MX)
3000800Foreign currency remittance result notification missing sequence
3000801Foreign currency remittance result notification missing sequence (MX)
6000450Domestic foreign currency account holder inquiry
6000521Exchange rate inquiry
7000800Foreign currency remittance summary
7000900Foreign currency balance inquiry
7000950Domestic foreign currency remittance/auto-transfer result inquiry
8000601Foreign currency transaction statement notification
8000701Foreign currency transaction statement notification missing sequence

Message Structure

Firm Banking Message Structure (KRW)304 bytes
Length header4B · offset 0
Message length4 · 0
Common header100B · offset 4
Identification code9 · 4
Merchant ID12 · 13
Bank code3 · 25
Message type code4 · 28
Business type code3 · 32
Message sequence number6 · 35
Transmission date8 · 41
Transmission time6 · 49
Response code4 · 55
Reserved area44 · 59
Individual body200B · offset 104
Transaction-specific details200 · 104
필수
선택
응답전용 / 예비
길이 · 위치
Firm Banking Message Structure (Foreign Currency)2004 bytes
Length header4B · offset 0
Message length4 · 0
Common header100B · offset 4
Identification code9 · 4
Merchant ID12 · 13
Bank code3 · 25
Message type code4 · 28
Business type code3 · 32
Message sequence number6 · 35
Transmission date8 · 41
Transmission time6 · 49
Response code4 · 55
Reserved area44 · 59
Individual body1900B · offset 104
Transaction-specific details1900 · 104
필수
선택
응답전용 / 예비
길이 · 위치

Step 3: Receive and Process Response

After sending a transaction message, receive the response immediately.

Checking Response Codes

Check the response code in the common header (position 52, 4 digits).

Response CodeMeaningAction
0000NormalTransaction successful
OtherErrorCheck bank-specific error message (refer to bank error code list)

Response Code Examples

CodeDescription
0000Normal processing
9999System failure
1001Invalid account number
1002Insufficient funds
1003Account holder mismatch

Response Code Verification Required

Transaction success must always be determined by checking the response code. Receiving a socket response itself does not indicate transaction success.

Step 4: Receiving Notifications (If Applicable)

For some transactions, the bank sends notification messages to the merchant.

Notification-Eligible Messages

Notification TypeMessage CodeDescription
Transaction detail notification4000/100Payment/collection transaction details
Transfer failure notification3000/100Transfer failure notice

Notification Receiving Process

StepStageDirectionDescription
1Send notification messageBank → MerchantTransaction result notification
2Send notification responseMerchant → BankAcknowledge receipt
NOTE

Notification Receiving Server Required

To receive notifications, the merchant server must run a TCP/IP receiving server. Provide the IP and Port of the notification receiving server to Hecto Financial.

Error Handling

Communication Errors

Error SituationResolution
Response timeoutVerify using the transfer result inquiry
Message errorCheck response code and reprocess

Using Transfer Result Inquiry

If a response was not received due to a communication error, you must confirm transaction success using the transfer result inquiry (7000/100). This is mandatory for preventing duplicate transactions.

Summary Inquiry

You can query daily transaction summaries.


Documentation by Feature

💬

Need technical support?