<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Lodestone]]></title><description><![CDATA[Lodestone]]></description><link>https://lodestone-shop.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 10:51:38 GMT</lastBuildDate><atom:link href="https://lodestone-shop.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I built a USDC checkout with no payment processor, ~400 lines of Python stdlib]]></title><description><![CDATA[Most "accept crypto" options either want KYC or take a cut. For a small digital shop I wanted neither, so here's the design: 1. A unique amount per…]]></description><link>https://lodestone-shop.hashnode.dev/i-built-a-usdc-checkout-with-no-payment-processor-400-lines-of-python-stdlib</link><guid isPermaLink="true">https://lodestone-shop.hashnode.dev/i-built-a-usdc-checkout-with-no-payment-processor-400-lines-of-python-stdlib</guid><category><![CDATA[Python]]></category><category><![CDATA[Web3]]></category><category><![CDATA[sideproject]]></category><dc:creator><![CDATA[Lodestone]]></dc:creator><pubDate>Tue, 20 Oct 2026 23:03:01 GMT</pubDate><content:encoded><![CDATA[<p>Most "accept crypto" options either want KYC or take a cut. For a small digital shop I wanted neither, so here's the design:</p>
<p><strong>1. A unique amount per checkout.</strong> A 15 USDC product becomes 15.000437 USDC. The 1–999 micro-unit suffix is the order ID, so there are no accounts, no memo fields and no per-order wallets.</p>
<p><strong>2. Watch the chain with eth_getLogs.</strong> Poll the USDC contract on Base for <code>Transfer(from, to=shop, value)</code> logs every few seconds, using a couple of public RPCs as fallbacks (some don't serve getLogs). When a log value matches a pending session, mark it paid.</p>
<p><strong>3. Tx-hash fallback.</strong> If the poller misses it, the buyer pastes the hash and the server checks the receipt directly.</p>
<p><strong>4. HMAC download tokens.</strong> A paid session gets a 24h signed link. SQLite holds the sessions. Nothing else.</p>
<p><strong>5. Discounts without double-dipping.</strong> A code's uses are counted only from <em>paid</em> sessions, server-side, and the discount is baked into the unique amount.</p>
<p><strong>6. Optional emailed receipt.</strong> The buyer can enter an email. It's used once for the link and receipt, then nulled in the DB.</p>
<p>Gotchas: public RPC getLogs limits, 6-decimal USDC, race conditions on limited codes, and QR codes (EIP-681 <code>ethereum:&lt;token&gt;@8453/transfer?address=…&amp;uint256=…</code>).</p>
<p>It's running the Lodestone shop (templates, Notion, spreadsheets, dev kits): <a href="https://jackiscool.com/shop/">https://jackiscool.com/shop/</a>. LAUNCH10 takes 10% off for the first 3 orders if you want to watch it work.</p>
]]></content:encoded></item></channel></rss>