Stripe web2 payments: feasibility note + Tier 1 prototype (WIP)#9
Open
dirtybits wants to merge 1 commit into
Open
Stripe web2 payments: feasibility note + Tier 1 prototype (WIP)#9dirtybits wants to merge 1 commit into
dirtybits wants to merge 1 commit into
Conversation
Adds docs/STRIPE_FEASIBILITY.md analyzing the effort to accept card payments alongside the USDC-native on-chain flow, split into an easy entitlement-only tier and the hard on-chain-economics tiers. Ships a feature-flagged Tier 1 prototype (off-chain entitlement only, no on-chain settlement or author/voucher payout): - web/lib/stripe.ts: REST + node:crypto webhook verification, no new deps - POST /api/stripe/checkout: create a Checkout Session from listing price - POST /api/stripe/webhook: mint entitlement on checkout.session.completed WIP / exploratory; identity, refunds, reconciliation and on-chain settlement are explicitly out of scope and documented as such.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exploratory work assessing how hard it would be to accept "web2-style" card
payments (Stripe) alongside the existing USDC-native, on-chain purchase flow.
Splits the problem into two tiers and ships a prototype for the easy one.
docs/STRIPE_FEASIBILITY.md— analysis: an easy entitlement-only tiervs. the hard tiers that preserve on-chain economics (author proceeds escrow
estimates, the three core obstacles, and open product questions.
web/lib/stripe.ts— Stripe REST API +node:cryptowebhook signatureverification. No new npm dependency, so the lockfile/build are
untouched.
POST /api/stripe/checkout— creates a Checkout Session from thelisting's
price_usdc_micros.POST /api/stripe/webhook— mints an entitlement via the existingrecordUsdcPurchaseReceiptoncheckout.session.completed.Deliberately out of scope (documented in the note)
No fiat→USDC conversion, no on-chain settlement, no author proceeds / voucher
reward funding, no real buyer identity (synthetic
stripe:<id>placeholder),no refund/chargeback handling or reconciliation. These are the Tier 2/3 hard
parts the note specifies.
Verification
tsc --noEmitis clean for all four added files. (The single reportederror is pre-existing and unrelated:
@/app/favicon.pnginAppNavbar.tsx.)next buildcould not complete in the sandbox only because it cannotreach Google Fonts — an environment limitation, not a code issue.
WIP / exploratory — intended for implementation and review agents to evaluate.
Generated by Claude Code