This is a typical case related to offsetting, and I have previously stated the need for caution regarding the risks of this type of case via the link below.
Please refer to the content of the link below.
Reasons why offsetting accounts receivable and payable in transactions with overseas companies is risky in many ways
Additionally, please refer to the content below, which was answered by the Korea Customs Service through its FAQ.
◎According to Article 30 of the Customs Act (hereinafter referred to as the 'Act'), the dutiable value of imported goods shall be the transaction price adjusted by statutory additions such as commissions and brokerage fees (excluding 'buying commissions') borne by the buyer, freight and insurance costs to the port of importation, and other transportation-related expenses, to the price actually paid or payable by the buyer for goods sold for export to Korea (hereinafter referred to as the 'actual paid price').
◎The amount of a claim related to previous imports, which the exporter was obligated to bear, is a debt that the exporter must pay to the importer separately from the payment for subsequent imported goods, and since that debt was offset against a portion of the payment for subsequent imported goods, the corresponding offset amount (the claim amount) can be seen as constituting a part of the actual paid price. Therefore, the dutiable value of imported goods must be calculated based on the invoice price plus the offset amount (i.e., the original contract price).
[This content regarding export and import clearance regulations and their interpretations is based on the customs and trade laws of the Republic of Korea.]