Skip to main content

Backend

Backend integrations protect resources and coordinate settlement. Use backend middleware when you are the seller, and direct SDK operations when you need wallet, collateral, or operator-facing actions.

TypeScript

Use @4mica/x402 for Express middleware and server-side 4Mica x402 support. It wires protected routes, guarantee verification, facilitator calls, and scheme registration.

Python

Use 4mica-x402 for FastAPI or Flask middleware. Use sdk-4mica for collateral management, balances, and on-chain operations.

Rust

Use sdk-4mica for collateral and wallet operations. HTTP server middleware is planned, so use TypeScript or Python when you need production x402 middleware today.