Skip to content

example: x402 payment middleware#48

Draft
remorses wants to merge 1 commit into
mainfrom
example-x402-preserve
Draft

example: x402 payment middleware#48
remorses wants to merge 1 commit into
mainfrom
example-x402-preserve

Conversation

@remorses

@remorses remorses commented May 9, 2026

Copy link
Copy Markdown
Owner

Preserving the x402 payment protocol example app, removed from main to keep the repo lean.

Demonstrates how to protect a Spiceflow route with the x402 payment protocol using @x402/core. Each request costs $0.01, settled on Base Sepolia in USDC. Fresh deposit addresses are minted via Stripe PaymentIntents.

Architecture:

  • x402-middleware.ts — standalone Spiceflow middleware (~250 lines) wrapping @x402/core
  • main.tsx — root app with a paidApp sub-app protected by the middleware
  • paid-data.tsx — client component showing the 402 payment challenge in the browser

@vercel

vercel Bot commented May 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
integration-tests Ready Ready Preview, Comment May 9, 2026 8:50am

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