Skip to content

Stripe web2 payments: feasibility note + Tier 1 prototype (WIP)#9

Open
dirtybits wants to merge 1 commit into
mainfrom
claude/stripe-integration-feasibility-FVSUA
Open

Stripe web2 payments: feasibility note + Tier 1 prototype (WIP)#9
dirtybits wants to merge 1 commit into
mainfrom
claude/stripe-integration-feasibility-FVSUA

Conversation

@dirtybits
Copy link
Copy Markdown
Owner

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 tier
    vs. the hard tiers that preserve on-chain economics (author proceeds escrow
    • 60/40 author/voucher split, disputes, refunds). Includes effort
      estimates, the three core obstacles, and open product questions.
  • Tier 1 prototype (feature-flagged, off-chain entitlement only):
    • web/lib/stripe.ts — Stripe REST API + node:crypto webhook signature
      verification. No new npm dependency, so the lockfile/build are
      untouched.
    • POST /api/stripe/checkout — creates a Checkout Session from the
      listing's price_usdc_micros.
    • POST /api/stripe/webhook — mints an entitlement via the existing
      recordUsdcPurchaseReceipt on checkout.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 --noEmit is clean for all four added files. (The single reported
    error is pre-existing and unrelated: @/app/favicon.png in
    AppNavbar.tsx.)
  • Full next build could not complete in the sandbox only because it cannot
    reach Google Fonts — an environment limitation, not a code issue.

WIP / exploratory — intended for implementation and review agents to evaluate.


Generated by Claude Code

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant