Selling Digital Files for USDC Using One Cloudflare Worker, No Stripe or Database
A developer built a store to sell small PDF files for USDC without a payment processor, database, or server-side wallet. Each order is assigned a random four-digit tag added to the price, so an exact-amount USDC transfer on Base can be matched to a specific purchase. Orders are stored as HMAC-signed tokens, and the Worker verifies payments by reading public blockchain data before issuing a short-lived download link. The design also supports the x402 protocol, using a facilitator to settle payments without the server holding private keys. The author notes limitations, including a best-effort replay guard, file size limits of roughly 3 MB on the free plan, and the need for manual refunds on mismatched amounts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in