How un-tariff computes refunds.
Every classification, every interest computation, every validation rule — what source we consult and how we derive the answer. No black boxes.
Data sources
un-tariff consumes four primary reference datasets, all versioned:
- IEEPA HTS registry — derived from the Harmonized Tariff Schedule Chapter 99 subheadings published by the USITC, cross-referenced to the executive orders that imposed them (EO 14193, 14194, 14195, 14245, 14257, 14323, 14329, 14380, 14382 — see Federal Register Vol. 90, No. 226). Each row has
effective_fromandeffective_todates, asource_citationfield, and never overwrites. Historical classifications remain reproducible. - CBP quarterly interest rates — published under 19 CFR 24.3a, stored quarter by quarter with effective dates. The current rates are confirmed against CBP's IEEPA FAQ.
- CAPE excluded-entry types — the categories of entries CBP has explicitly excluded from CAPE Phase 1, per the CAPE Trade Information Notice.
- IEEPA exclusions (USMCA, CAFTA-DR, etc.) — preferential-trade programs that exempted qualifying entries from some IEEPA tranches. Flagged per rule IEEPA-006 for human review.
Classification (rule IEEPA-001 through IEEPA-004)
For every line in your ACE Entry Summary export, the classifier:
- Looks up the HTS subheading in the IEEPA registry with the line's entry-filing date. If no registry row matches the date, the line is NOT_IEEPA and drops out of the refund.
- If multiple rows match (overlapping executive orders), selects the most specific row by
effective_fromproximity to the filing date. Ties go to the later row. - Confirms the paid-duty amount on the line is consistent with the registry row's expected rate. Material deviations (> 0.5%) flag for human review.
- Records the rule ID, registry row version, and deviation amount in the audit log.
Stacking (rule IEEPA-005)
Where an entry line paid IEEPA alongside Section 232 or Section 301, the classifier separates the paid duty into three buckets using the applied-rate breakdown from the ACE export:
- IEEPA principal — flows to the refund
- Non-IEEPA principal — stays with CBP
- Applied rate — the ratio used for reconciliation
Only the IEEPA bucket is summed into the claim.
USMCA / preferential-trade exclusions (rule IEEPA-006)
For entries with a country of origin matching a preferential program (USMCA for Canada/Mexico, CAFTA-DR for Central America, etc.), the classifier checks whether the executive order that imposed IEEPA on that entry's HTS subheading had an explicit preferential-program carve-out. If yes, the line is flagged PREFERENTIAL_EXCLUSION_CANDIDATE — refund path may be reconciliation, not CAPE. Human review decides.
Cliff check (rule CAPE-002 / CAPE-003)
For each classified entry:
- If Liquidation Status = Unliquidated, the entry is CAPE-eligible (no cliff).
- If Liquidation Status = Liquidated, compute
Liquidation Date + 80 days. If the result is in the past, the entry is classified PROTEST_REQUIRED_OUT_OF_SCOPE and dropped from the CAPE file. - Entries within 14 days of the cliff are flagged for immediate filing.
Interest computation (CBP 19 CFR 24.3a)
For each CAPE-eligible entry:
- Identify the payment date of the entry from the ACE record (date of entry summary submission / duty payment, not liquidation).
- Walk daily from payment date to the refund-issue date (defaulted to "today + 60 days" for forecasting).
- At each day, apply the CBP quarterly overpayment rate in effect on that date. Rates change on the first day of each calendar quarter.
- Compound daily:
balance = balance × (1 + rate/365). - Record the per-quarter rate walked and the resulting principal-plus-interest number.
Validation (CBP VAL-F / VAL-E / VAL-I)
Before the CAPE CSV is downloadable, the tool runs every CBP-published validation rule locally:
- VAL-F — file encoding (UTF-8), line endings (LF), no BOM, with CBP's required header row, row count ≤ 9,999 data rows, no duplicate entry numbers, single-column format, 11-character CBP entry numbers only.
- VAL-E — each entry exists in CBP records (verified via ACE export), entry filing date within the IEEPA window, liquidation date either absent or within the 80-day window.
- VAL-I — attached IOR number, filer code, and ACH payer ID match active CBP registrations (verified at upload time via ACE Portal handshake).
Any failure blocks generation. The file you download is one that will pass CBP validation.
Audit trail
Every entry's classification, stacking separation, cliff check, and interest computation is logged with:
- Rule ID (e.g. IEEPA-005, CAPE-003)
- Reference-data version (registry row PK + effective-from)
- Source file + row number from your ACE export
- Computed result + intermediate values
If CBP questions a number, the chain is reconstructable end-to-end.
What we do not do
- Argue classification. If the HTS subheading is disputed, that goes to counsel. The classifier assumes your ACE data is correct.
- Adjust dutiable value. We use CBP's recorded dutiable value. Value corrections are a separate reconciliation process.
- Handle protests. Entries past the cliff are flagged and dropped.
- Assert guarantees. CBP determines the refund. We prepare the filing.
Every source cited on this page resolves to a live URL. If you want to dig further, the SCOTUS guide consolidates the primary and secondary citations.