Tip link unlock
someone wants a tip jar that actually unlocks something. not a newsletter. not a dao. a tip.
the k4d pay example app this recipe once walked through is retired. read it as a pattern for your own app; the reference implementation lives on in the k4d repo's git history.
stack
- a tip-link UI + link store in your app
- moonx session for creators; tippers pay USDC from a moonx wallet
- an unlock cookie per link (the reference used
k4d_pay_<payLinkId>) - reference API shape:
POST /api/pay,GET /api/pay/[id], tip viaPATCH /api/pay/[id]with{ action: "tip", payerWallet, txHash }
this MVP is not paybox and not x402. it is direct USDC + cookie unlock. x402 is a future rail if you want HTTP 402 semantics. see x402-paywalled-api.
steps
1. create a link
signed-in creator posts to your create endpoint with tip amount, title, unlock body (and related fields). give it a form.
2. share
send the public pay link. strangers tip. strangers should not see creator email on public GET responses. that is not "transparency", that is a privacy failure.
3. tip + unlock
tipper signs in (moonx), sends USDC to creatorWallet, then PATCH tip with txHash. your server records the tip and sets the unlock cookie so unlock content renders.
pitfalls
- do not market this as paybox. wrong product.
- cookie unlock is browser-local trust. it is fine for tips. it is not a fortress.
- public payloads must strip PII for non-creators.