← Dashboard
Section 10 of 14

Verification

What This Does

After pushing corrected customs values to ShipStation, we read them back via the API and compare what we sent vs what ShipStation actually saved. This trust-but-verify approach catches any issues where ShipStation silently rejected or modified our values.

Why It Matters

Just because we sent corrected values doesn't mean ShipStation saved them. APIs can silently drop fields, round differently, or reject updates. Verification is our safety net — it confirms the customs forms will actually show the correct values when printed.

How It Works

  1. 1.We call getOrder() on ShipStation to read the customs items back.
  2. 2.We compare each item by matching on description + HS code + country of origin + quantity.
  3. 3.We compare the customs VALUE with a $0.02 tolerance (to allow for minor rounding differences in ShipStation's system).
  4. 4.If everything matches: VERIFIED. If any mismatch: MISMATCH. If the read-back API call fails: UNVERIFIED.
  5. 5.VERIFIED orders are marked COMPLETED. MISMATCH/UNVERIFIED orders are marked COMPLETED_UNVERIFIED.

The Code

Key Decisions

What Could Go Wrong