Full Integration Flow
Real-Time Firm Banking operates via TCP/IP socket connection → message send/receive → immediate processing.
Overview
Real-Time Processing
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.
| Step | Stage | Direction |
|---|---|---|
| 1 | Socket connection | Merchant → Hecto Financial |
| 2 | Send transaction message | Merchant → Hecto Financial |
| 3 | Receive transaction response | Hecto Financial → Merchant |
| 4 | Close socket | Merchant → Hecto Financial |
| Item | Details |
|---|---|
| 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.
| Step | Stage | Message Code | Direction | Notes |
|---|---|---|---|---|
| 1 | Socket connection | - | Merchant → Hecto Financial | Once |
| 2 | Send transaction message | Payment, collection, inquiry, etc. | Merchant → Hecto Financial | Repeated |
| 3 | Receive transaction response | - | Hecto Financial → Merchant | Repeated |
| 4 | Send polling message | - | Merchant → Hecto Financial | Every 5 minutes |
| 5 | Receive polling response | - | Hecto Financial → Merchant | Every 5 minutes |
| Item | Details |
|---|---|
| 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 |
Polling Interval
Step 1: Socket Connection
The merchant server establishes a TCP/IP socket connection to the Hecto Financial firm banking server.
Connection Information
| Item | Details |
|---|---|
| Protocol | TCP/IP |
| Server IP | Provided by Hecto Financial (after contract) |
| Port | Provided 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 Code | Business Type | Transaction Type |
|---|---|---|
| 2000 | 100 | Payment transfer (same-bank/inter-bank remittance) |
| 2000 | 200 | Collection transfer (withdrawal transfer) |
| 2000 | 550 | Auto-transfer account registration |
| 6000 | 100 | Account holder inquiry |
| 7000 | 100 | Transfer result inquiry |
| 7000 | 200 | Balance inquiry |
| 7000 | 300 | Transfer summary |
| 7000 | 400 | Collection transfer summary |
| 3000 | 100 | Inter-bank transfer failure notification |
| 3000 | 200 | Inter-bank transfer failure notification missing sequence |
| 4000 | 100 | Deposit transaction detail notification |
| 4000 | 200 | Deposit transaction detail notification missing sequence |
Foreign Currency Firm Banking Key Transaction Types
| Message Code | Business Type | Transaction Type |
|---|---|---|
| 2000 | 400 | Foreign currency remittance |
| 2000 | 401 | Foreign currency remittance (MX) |
| 2000 | 420 | Foreign currency auto-transfer |
| 2000 | 520 | Foreign currency auto-transfer agreement registration |
| 2000 | 600 | Foreign currency remittance cancellation |
| 3000 | 700 | Foreign currency remittance result notification |
| 3000 | 701 | Foreign currency remittance result notification (MX) |
| 3000 | 800 | Foreign currency remittance result notification missing sequence |
| 3000 | 801 | Foreign currency remittance result notification missing sequence (MX) |
| 6000 | 450 | Domestic foreign currency account holder inquiry |
| 6000 | 521 | Exchange rate inquiry |
| 7000 | 800 | Foreign currency remittance summary |
| 7000 | 900 | Foreign currency balance inquiry |
| 7000 | 950 | Domestic foreign currency remittance/auto-transfer result inquiry |
| 8000 | 601 | Foreign currency transaction statement notification |
| 8000 | 701 | Foreign currency transaction statement notification missing sequence |
Message Structure
Transaction-Specific Documentation
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 Code | Meaning | Action |
|---|---|---|
| 0000 | Normal | Transaction successful |
| Other | Error | Check bank-specific error message (refer to bank error code list) |
Response Code Examples
| Code | Description |
|---|---|
| 0000 | Normal processing |
| 9999 | System failure |
| 1001 | Invalid account number |
| 1002 | Insufficient funds |
| 1003 | Account holder mismatch |
Response Code Verification Required
Step 4: Receiving Notifications (If Applicable)
For some transactions, the bank sends notification messages to the merchant.
Notification-Eligible Messages
| Notification Type | Message Code | Description |
|---|---|---|
| Transaction detail notification | 4000/100 | Payment/collection transaction details |
| Transfer failure notification | 3000/100 | Transfer failure notice |
Notification Receiving Process
| Step | Stage | Direction | Description |
|---|---|---|---|
| 1 | Send notification message | Bank → Merchant | Transaction result notification |
| 2 | Send notification response | Merchant → Bank | Acknowledge receipt |
Notification Receiving Server Required
Notification Message Documentation
Error Handling
Communication Errors
| Error Situation | Resolution |
|---|---|
| Response timeout | Verify using the transfer result inquiry |
| Message error | Check response code and reprocess |
Using Transfer Result Inquiry
Summary Inquiry
You can query daily transaction summaries.
Summary Inquiry Documentation
Documentation by Feature
Select Feature
Need technical support?
Code Samples
HectoFinancial GitHub