Cashu-paid download
Cashu Zine: Ecash for Builders
A tiny downloadable Markdown zine that demonstrates Cashu-native paid file delivery. No signup or account setup: mint a fresh 21 sat test token, paste it below, and unlock the sample file in about 60 seconds.
21 satsno signupfresh test tokenabout 60 secondstest mint only
What this is
A test-mint paid download, kept deliberately small.
Paste a fresh Cashu token from https://nofee.testnut.cashu.space. The server receives the token into the seller test wallet, records a short-lived grant, and returns the sample file link.
This is not a production checkout. It is the smallest hosted version of the payment-to-download handoff, using a test mint and sample file.
See the starter-kit code pathHow to try this in 60 seconds
Mint one fresh 21 sat test token, then paste it here.
- Open nofee.testnut.cashu.space and create or load a test wallet.
- Mint exactly 21 sats from that no-fee Testnut mint.
- Send/export the new token, copy the
cashuB... string, and paste it into the payment box.
Use a fresh token each time. Cashu proofs are bearer money, so a token that has already been redeemed will be rejected by the mint.
Proof boundary
What this proves — and what it does not.
Proves- A fresh Cashu token can unlock a hosted file.
- The server receives proofs into a seller test wallet.
- A short-lived grant gates the download link.
Does not prove- Production checkout, custody, or refund policy.
- Mainnet mint trust or buyer support workflow.
- A generalized marketplace or media paywall.
Implementation breadcrumbs
The copyable shape is small: page → receive API → grant-gated file.
The public source excerpt is now available as a clean, copyable map of the implementation seams without secrets, deployment notes, or production checkout claims.
Buyer pagepages/demo/downloads/[slug].tsxRenders the asset, accepts a Cashu token, posts it to the payment route, and shows the returned grant link.
Receive + grant APIpages/api/downloads/[assetId]/pay/cashu.tsVerifies mint and exact price, receives proofs into the seller test wallet, records payment metadata, then creates the unlock grant.
State + file gatelib/downloads/store.tsDefines asset/payment/grant records, persists demo wallet proofs, validates grant expiry, and marks delivered downloads.