How to test OFAC screening integration

A test plan for proving a screening integration blocks flagged counterparties and allows clean ones.

TL;DR

TL;DR: Test the integration with blocked and clean fixtures, cover the fail-closed path, and re-run the suite on a schedule against live data.

Fixture tests

Build a fixture set of known blocked and clean counterparties. Assert that a blocked SDN name or listed wallet returns BLOCK from sanctions_check and that a clean counterparty returns ALLOW. These fixtures make regressions obvious, since a single wrong result means the gate broke.

Fail-closed and edge tests

Test what happens when the screening service is unreachable. The integration should stop the payment, not allow it. Add edge cases too: name variants and near-misses that should still match, plus the 50 Percent Rule, where an entity owned 50 percent or more by a blocked person is itself blocked.

Scheduled re-validation

Sanctions lists change, so run the suite on a schedule and after every deployment. The sanctionsai.dev data set is synced hourly across 16 jurisdictions, so re-running against current data confirms the gate still reflects the latest SDN List. Record results as proof the screen was active and correct.

Screen your agent’s next payment

Free OFAC sanctions screening — 5 checks/day, no signup.

Check a wallet →