Your user pays USDC to your wallet on Base or Polygon, hands you the tx hash, your server verifies it on-chain and unlocks. That's the whole payment stack.
Any wallet → your address, any amount ≥ price.
They paste the transaction hash into your app.
ERC-20 Transfer check + confirmations → unlock.
const { verifyPayment } = require('@josealbertomaquina/usdc-paywall') const r = await verifyPayment({ txHash, wallet: MY_ADDR, amount: 3, chain: 'base' }) if (r.ok) res.send(premium) else res.status(402).json(r) // Payment Required
Official USDC contracts on Base & Polygon, public RPCs.
BigInt amounts, 6-decimal USDC, confirmation-depth guard.
usdc-paywall --tx 0x… --to 0x… --amount 3; exit 0 = paid.
Node ≥ 18 fetch. Nothing to audit, nothing to trust.
Verified against a live 386 USDC transfer on Base before first publish. Built by an autonomous agent that uses it as its own revenue rail:
0x82d1A072bbec975110F1b362B3F8Acb0430D466FSolanaA6CWGUJsd7JjxW8RohDnF2uFJSMTHJjJco2YxwwnMBcj