Official SDKs

One frozen contract.Every stack.

Add one middleware to your API and any route returns a signed x402 challenge — agents pay per call in USDC, settled on-chain. Nine official SDKs, byte-identical signing across languages.

Source is public on GitHub — official registry packages (npm · PyPI · Packagist · Go · Maven Central · NuGet · RubyGems) are coming. Each SDK implements the same frozen X402v1 wire contract.

Node.js
x402 Express SDK

Express

Express middleware for pay-per-request access control using the x402 protocol. Drop one middleware in front of any route — agents pay in USDC, keys/fees/settlement live on the platform. Thin client: signs requests, interprets challenge/verify, fails closed.

View SDK
Next.js
x402 Next.js SDK

Next.js App Router (Edge-safe)

Thin x402 payment gate for Next.js (App Router). Edge-runtime safe — Web Crypto / fetch only, no node:*. Relays to the platform's signed challenge/verify and fails closed: if the platform is unreachable the route returns 502 and never serves paid content.

View SDK
Python
x402 FastAPI SDK

FastAPI (Python ≥ 3.10)

Thin FastAPI client for the x402 paywall platform. Implements the frozen X402v1 wire contract. No settlement logic — relays to the platform's signed challenge/verify and fails closed: if the platform is unreachable the gated route returns 502 and never serves paid content.

View SDK
PHP
x402 Laravel SDK

Laravel 10 (PHP ≥ 8.1)

Thin x402 payment-gate middleware for Laravel apps. Implements the frozen X402v1 wire contract. A client SDK for your Laravel app — distinct from the platform backend. Relays to the platform's signed challenge/verify and fails closed: if the platform is unreachable the route returns 502 and never serves paid content.

View SDK
Go
x402 Go SDK

Go ≥ 1.21 (stdlib net/http)

Thin stdlib-only net/http x402 payment gate for Go. Implements the frozen X402v1 wire contract. Zero external dependencies. Relays to the platform's signed challenge/verify and fails closed: if the platform is unreachable the route returns 502 and never serves paid content.

View SDK
Java
x402 Spring Boot SDK

Spring Boot 3 (Java 17+)

Thin x402 payment-gate filter for Spring Boot. Implements the frozen X402v1 wire contract. No payment logic in your app; relays to the platform's signed challenge/verify and fails closed (502, never serves paid content if the platform is unreachable).

View SDK
C#
x402 ASP.NET Core SDK

ASP.NET Core (.NET 8)

Thin x402 payment-gate middleware for ASP.NET Core. Implements the frozen X402v1 wire contract. No payment logic in your app; relays to the platform's signed challenge/verify and fails closed (502, never serves paid content if the platform is unreachable).

View SDK
Ruby
x402 Rails SDK

Ruby on Rails (Rack)

Thin x402 payment-gate Rack middleware for Rails. Implements the frozen X402v1 wire contract. No payment logic in your app; relays to the platform's signed challenge/verify and fails closed (502, never serves paid content if the platform is unreachable).

View SDK
Python
x402 Django SDK

Django (Python ≥3.10)

Thin x402 payment-gate middleware for Django. Implements the frozen X402v1 wire contract. No payment logic in your app; relays to the platform's signed challenge/verify and fails closed (502, never serves paid content if the platform is unreachable).

View SDK