Check the payee before your AI agent pays it (x402, Node and Python) A developer published an open-source pattern, with Node and Python examples, for screening an x402 payee address against OFAC SDN, UN, EU and UK sanctions lists before an AI agent sends USDC. The code calls a paid screening endpoint (0.01 USDC per call over x402 on Base or Solana) and treats any response that is not an explicit clean verdict — including a 400, 5xx, timeout, or an unavailable OFAC feed — as a refusal to pay. The author notes their first draft incorrectly returned "pay" when the OFAC feed was down, calling it "the worst possible failure for a check like this. An AI agent that pays over x402 reads a payTo address from a 402 response and sends USDC to it. Some agent wallets already let the owner set a daily budget, a per transaction limit and approved domains. A check on the address itself is a separate question: is the wallet you are about to pay on a sanctions list? This post shows a small pattern for that, with working Node and Python examples. The full code is here: https://github.com/Nikoble1926/sanctions-check-before-pay https://github.com/Nikoble1926/sanctions-check-before-pay One paid call screens a wallet address against four lists: OFAC SDN, UN Consolidated, EU and UK. The response is signed and reports each list separately, matched or clear, with that list's version date. It costs 0.01 USDC per call, paid over x402 itself, on Base or Solana. No account, no API key. GET https://sanctions.nsgoods.org/screen-multi?address=