Menu

Explorer & Settings

Tempo Explorer Submit Project
Back to all projects

x402-api-middleware

by emfidev · Updated 8 months ago

This repository is the umbrella for the X402 middleware family: a framework and set of reference implementations that enable the X402 Payment Protocol across API gateways and web frameworks.

In the AI payments ecosystem

x402-api-middleware is an early-stage project in the AI payments / x402 ecosystem. It currently has 0 GitHub stars and 0 forks.

README.md View on GitHub →

X402 — API Middleware Framework (umbrella project)

This repository is the umbrella for the X402 middleware family: a framework and set of reference implementations that enable the X402 Payment Protocol across API gateways and web frameworks.

The project started during the Solana X402 hackathon (https://solana.com/es/x402/hackathon) and the initial, runnable reference adapter was implemented for the Tyk API Gateway. The purpose of this repository is to:

  • Present the high-level project vision (a framework composed of gateway adapters, client SDKs and a protocol spec),
  • Point evaluators to the runnable Tyk demo (the x402-tyk-middleware repository), and
  • Provide links and guidance for integrators and contributors.

Why this is a framework

X402 is intentionally designed as a reusable middleware framework rather than a single, gateway-specific product. The pieces are split so implementers can:

  • Reuse the protocol (x402-oas-spec) to verify compliance,
  • Plug in gateway-specific adapters (Tyk is the first), and
  • Reuse client SDKs across applications and demos.

Primary repositories

What evaluators should inspect (quick guide)

  1. Clone and run x402-tyk-middleware (it includes a Docker Compose demo): this is the runnable demo used for the hackathon evaluation.
  2. Use the x402-client-sdk examples to create and attach payment proofs to requests.
  3. Compare request/response shapes against x402-oas-spec for protocol conformance.

Basic evaluation checklist

  • Tyk demo boots and exposes demo endpoints
  • A protected endpoint returns a 402 challenge when requested without a payment proof
  • Providing a valid signed payment in the X-Payment-x402 header returns the protected content (HTTP 200)
  • Logs surface verification and async settlement activity

Getting started (for evaluators and contributors)

  1. Clone the three repositories listed above.
  2. Follow the README.md in x402-tyk-middleware to run the Docker Compose demo locally.
  3. Run the example client in x402-client-sdk to exercise the full flow.

Roadmap and priorities

  • Short term: stabilize and document the Tyk adapter; provide step-by-step demo instructions for evaluators.
  • Medium term: add at least one more gateway adapter, build certification tests against the spec, and expand client SDKs.

Contributing

Contributions are welcome. Please open an issue first describing the intended change, then follow the contribution guidelines in each repository (each adapter and SDK maintains its own CONTRIBUTING.md).

License

MIT — see the top-level LICENSE in the project root.

Support and contact

Open issues or pull requests in the corresponding repositories. For quick help during the hackathon, check the Tyk middleware README (it includes runnable examples and minimal troubleshooting steps).


Created for the Solana X402 Hackathon

All SDKs & Clients SDKs →