SME Differential Settlement API

SME Differential Settlement is the process of settling the difference between the preferential fee rate applied to small and medium-sized merchants and the fee actually applied by the PG company. Under government policy, small and medium-sized merchants with annual revenue below a certain threshold receive preferential fee rates from card companies, and PG companies are required to return the corresponding differential amount to those merchants.

In general, PG companies settle with merchants using their own fee rates. Subsequently, when the merchant creates a differential settlement request file containing sub-merchant business numbers for each sales amount and submits it to the PG company, the PG company requests settlement from the card issuer based on that data.

In this process, a difference arises between the preferential fee rate confirmed by the card issuer and the fee rate previously applied by the PG company. The Differential Settlement is the process of paying the confirmed differential amount to the merchant as the final settlement.

This document explains the file integration method and important notes for integration.


Notes

NOTE

SFTP File Transfer Method

This specification uses SFTP file transmission, not HTTP API. The file format is a fixed-length (400 bytes) format. SFTP connection information will be provided separately after the merchant ID is issued.

Communication Specification

ItemDescription
Data transmission methodSFTP file transmission
Access accountSFTP account created and provided separately upon firewall allowance request after merchant ID issuance
MAIN SFTP Server61.252.169.33 (port: 5210)
DR SFTP Server14.34.14.26 (port: 5210)
TEST/REAL distinctionDistinguished by access account or folder
Character encodingUTF-8

File Structure

START RECORD
  HEADER RECORD (per merchant ID) SEGMENT 1
    DATA RECORD
    ...
    DATA RECORD
    TOTAL RECORD
  HEADER RECORD (per merchant ID) SEGMENT 2
    DATA RECORD
    ...
    DATA RECORD
    TOTAL RECORD
  ...
  HEADER RECORD (per merchant ID) SEGMENT n
    DATA RECORD
    TOTAL RECORD
END RECORD

Field Types

TypeDescriptionAlignmentPadding
NNumeric fieldRight'0'
ACharacter fieldLeftSPACE

Differential & Refund Settlement Policy

Differential Settlement Transmission/Reception Schedule

FileSchedule
Differential settlement request fileUpload by 13:00 on D+1 based on transaction date (D) (transmitted 365 days a year)
Differential settlement result fileUploaded by 04:00 on business day +7 from the differential settlement request date
NOTE

Transmission/Reception Schedule Example

Transaction date (D): January 7, 2023 (Sat) → Differential settlement request file (Merchant → Hecto Financial): January 8, 2023 (Sun) → Differential settlement result file (Hecto Financial → Merchant): January 17, 2023 (Tue)

Differential Settlement Transmission Targets

  • As per the refund settlement policy effective from the second half of 2022 (September), transmission of differential settlement data for the general (4) sales tier is mandatory.
  • When cart sales occur, the final sub-merchant business number cannot be duplicated per PG transaction number.
  • When transmitting differential settlement data for cart sales, all final sub-merchant sales must be included, and the transaction amount per PG transaction number must match the sum of final sub-merchant sales amounts.

Cancellation Sales Omission/Delayed Submission

If cancellation sales are omitted or submitted late, they may be processed automatically based on the original approval differential settlement records. If the original approval differential settlement is not a cart sale, both full and partial cancellations are subject to automatic processing. If the original approval differential settlement is a cart sale, only full cancellations are subject to automatic processing. In such cases, the result will be included in the result file, and the merchant's reservation field will be set to an arbitrary key value by Hecto Financial.

Refund Settlement

  • First implemented in September 2022
  • For new merchants, initially classified as general (4) merchants; fee refund settlement is processed for sales that did not receive SME preferential fee rates during the half-year period
    • List of eligible merchants for refund is received from the Credit Finance Association
  • Example: For a business opened in February, if SME preferential fee is applied in July, the difference in fees (general - SME) from February to July is refunded

Refund Settlement Method:

  • Merchants (2nd-tier PG) do not transmit a separate refund settlement request file to Hecto Financial
  • Refund settlement is requested from card companies based on previously transmitted differential settlement sales data (Hecto Financial internal processing)
  • Refund settlement is not possible for returned differential settlement records, so management of returned differential settlement records is essential

Differential Settlement Request (Merchant (2nd-tier PG) → Hecto Financial)

File Spec

ItemDescription
File nameST_PRFT_REQ_RequestDate (RequestDate: YYYYMMDD)
1 Record400 bytes
File path/edi_req
Test file path/edi_req/test

START RECORD

FieldPositionLengthTypeDescription
Record type12AN"01"
Request date38NYYYYMMDD
Business number1110AN2nd-tier PG business number
PG company identifier2110AN"SETTLEBANK"
FILLER31370ANSpace

HEADER RECORD

FieldPositionLengthTypeDescription
Record type12AN"10"
Merchant ID310ANMerchant ID issued by Hecto Financial
FILLER13388ANSpace

DATA RECORD

FieldPositionLengthTypeDescription
Record type12AN"11"
Approval/cancellation flag31AN0: Approval / 1: Cancellation
Transaction date48NTransaction date (YYYYMMDD). Approval or cancellation date
Intermediate sub-merchant number1210AN2nd-tier PG business number (10 digits)
Final sub-merchant number2210ANFinal sub-merchant business registration number (10 digits)
Original approval PG transaction number3240ANOriginal approval PG transaction number
Partial cancellation sequence722NApproval: 0, 1st partial or full cancellation: 1, Nth cancellation: N (required)
Merchant order number73100ANUnique order number generated by the merchant
Sub-merchant sales amount17315NFinal sub-merchant sales amount. Omit [-] sign for cancellations
Transaction acquiring amount18815NTransaction amount per PG transaction number. Omit [-] sign for cancellations
Approval date2038ANApproval date of original transaction (YYYYMMDD)
Merchant reservation field21140ANReceipt identification key. Value is set in result message as-is
Cancellation PG transaction number25140ANUsed when approval/cancellation flag is 1 (cancellation). Enter the cancellation PG transaction number; in this case, the entered partial cancellation sequence is not used
FILLER291109ANSpace

Cancellation PG Transaction Number Guide

The cancellation PG transaction number field is a required input for new integrations after August 2024. If it is difficult to accurately verify the partial cancellation sequence, please enter the cancellation PG transaction number.

TOTAL RECORD

FieldPositionLengthTypeDescription
Record type12AN"12"
Total record count37NNumber of DATA lines (approval + cancellation count)
Total sales amount1018ANSub-merchant sales amount in DATA (approval - cancellation amount). [-] sign can be shown
FILLER28373ANSpace

END RECORD

FieldPositionLengthTypeDescription
Record type12AN"02"
Total line count37NMatches total DATA record count for all merchant IDs
FILLER10391ANSpace

Differential Settlement Result (Hecto Financial → Merchant (2nd-tier PG))

File Spec

ItemDescription
File nameST_PRFT_RSP_FileCreationDate (FileCreationDate: YYYYMMDD)
1 Record400 bytes
Production file path/edi_rsp
Test file path/edi_rsp/test

START RECORD

FieldPositionLengthTypeDescription
Record type12AN"01"
Request date from38NDifferential settlement request start date (YYYYMMDD)
Request date to118NDifferential settlement request end date (YYYYMMDD)
File creation date198NYYYYMMDD
Business number2710AN2nd-tier PG business number
PG company identifier3710AN"SETTLEBANK"
FILLER47354ANSpace

HEADER RECORD

FieldPositionLengthTypeDescription
Record type12AN"10"
Merchant ID310ANMerchant ID issued by Hecto Financial
FILLER13388ANSpace

DATA RECORD

FieldPositionLengthTypeDescription
Record type12AN"11"
Approval/cancellation flag31AN0: Approval / 1: Cancellation
Transaction date48NTransaction date (YYYYMMDD). Approval or cancellation date
Request date128NDifferential settlement request date (YYYYMMDD)
Intermediate sub-merchant number2010AN2nd-tier PG business number (10 digits)
Final sub-merchant number3010ANSub-merchant business registration number (10 digits)
PG transaction number4040ANPG transaction number (approval or cancellation transaction number)
Partial cancellation sequence802NApproval: 0, 1st partial or full cancellation: 1, Nth cancellation: N
Merchant order number82100ANUnique order number generated by the merchant
Sub-merchant sales amount18215NOmit [-] sign for cancellations
Original transaction acquiring amount19715NOmit [-] sign for cancellations
Approval date2128ANApproval date of original transaction (YYYYMMDD)
Merchant reservation field22040ANReceipt identification key. Value is set in result message as-is
Sub-merchant tier2601AN0: Micro / 1: Small1 / 2: Small2 / 3: Small3 / 4: General. Card company response sub-merchant tier; if null value received, responds as 4 (General)
Differential supply value26115NOmit [-] sign for cancellations
Differential VAT27615NOmit [-] sign for cancellations
Differential settlement amount29115NOmit [-] sign for cancellations
Differential settlement date3068NYYYYMMDD
Differential settlement result code3144ANHecto Financial validation result code before card issuer transmission (refer to differential settlement code table)
Card company result code3182ANCard issuer response code (refer to card issuer code table). May be null depending on the differential settlement result code
FILLER32081AN

TOTAL RECORD

FieldPositionLengthTypeDescription
Record type12AN"12"
Total record count37NNumber of sub-merchant records in DATA (approval + cancellation count)
Total sales amount1018ANSub-merchant sales amount in DATA (approval - cancellation amount). [-] sign can be shown
Differential supply value total2815AN[-] sign can be shown
Differential VAT total4315AN[-] sign can be shown
Differential settlement amount total5815AN[-] sign can be shown
FILLER73328ANSpace

END RECORD

FieldPositionLengthTypeDescription
Record type12AN"02"
Total line count37NTotal DATA record count
FILLER10391ANSpace

Code Tables

Differential Settlement Result Codes (Hecto Financial Validation Result Codes)

Error CodeError Message
0000Normal
1101Merchant ID does not exist
1102Merchant not eligible for differential settlement
1103Not an SME business number
1201Transaction does not exist
1202Original transaction acquiring amount mismatch
1203Original transaction acquiring amount and sub-merchant sales amount mismatch
1301Cancellation before acquiring
1302Same-day cancellation transaction
1401Differential settlement acquiring result not received
1501Completed differential settlement record exists
1502Differential settlement in progress
1601Final sub-merchant number format error
1602Cancellation final sub-merchant number approval record does not exist
1603No differential settlement information for original cancellation transaction
2101Duplicate final sub-merchant number sales in cart transaction
9999Other error (contact PG company) (e.g. duplicate transmission, final sub-merchant number error, etc.)

Card Issuer Result Codes

Error CodeError Message
00Normal
01Card issuer classification value error (does not exist or mismatch)
02Sales amount error (mismatch between original sales amount and sum of sub-merchant sales amounts)
03Duplicate submission (transmitting already processed records)
04Original acquiring returned (original sales does not exist or sales amount error, etc.)
05Acquiring cancellation type error (normal/cancellation mismatch between original and sub-merchant sales)
06Acquiring transmission date error
07Approval date error
08Approval number error (no sales corresponding to original approval number)
09Merchant number error 1 (merchant number is SPACE or unregistered merchant)
10Merchant number error 2 (not a differential settlement merchant number)
11Card number error
12Intermediate sub-merchant error (non-qualifying electronic financial business, etc.)
13Differential settlement delayed submission
14Card issuer classification value normal record returned. In a cart transaction consisting of A, B, C, if C's classification value is in error, C is returned with code 01. However, since A and B have correct classification values but are returned due to C, they are distinguished with code 14
15Returned when differential settlement is submitted after full sales cancellation. Additional return condition reason: to prevent delayed submission of differential settlement cancellation
99Other
💬

Need technical support?