Sanctions Compliance for Developers

Sanctions Compliance for Developers

As a developer building applications that move money — whether through payment APIs, agent frameworks, or smart contracts — sanctions compliance is part of your stack. This guide covers what you need to know, how to integrate screening, and what to test before shipping.

Step 1: Understand your exposure

If your application enables any of the following, you need sanctions screening:

Step 2: Pick your integration pattern

Pattern A: Pre-payment gate (recommended)

Screen every payment before it is authorized. The simplest pattern:

# Python example
import requests

def should_allow_payment(wallet_address, counterparty_name=None):
    resp = requests.get(
        "https://sanctionsai.dev/sanctions",
        params={"wallet": wallet_address, "name": counterparty_name}
    )
    data = resp.json()
    return data.get("clean", False)

# In your payment handler:
if not should_allow_payment(recipient_wallet, recipient_name):
    raise PaymentBlockedError("Sanctions match detected")

Pattern B: MCP integration

For AI agent frameworks, use the SanctionsAI MCP server:

# MCP tool call
sanctions_check(name="Counterparty Inc", wallet="0x...") 
# Returns: {"clean": false, "matches": [...]}

Pattern C: CLI-based

For scripts and CI/CD pipelines:

agentmail check --wallet 0x098B716B8Aaf21512996dC57EB0615e2383E2f96

Step 3: Test before production

Use these known sanctioned wallets to verify your blocking works:

# Tornado Cash (SDN-listed)
0x098B716B8Aaf21512996dC57EB0615e2383E2f96

# Garantex (SDN-listed exchange)
1Hf2CKoVD15iYfcVpzMGZm6L5VhDjZq1Qk

Confirm your integration returns "clean: false" for these addresses before shipping.

Step 4: Audit logging

Log every screening result: timestamp, inputs, result, and agent identity. This audit trail is your primary defense in any OFAC inquiry.

Try SanctionsAI →