Official SDKs
Production-ready SDKs for integrating t402 payments into your applications. Choose your language and start accepting payments in minutes.
Installation
$
npm install @t402/coreQuick Start
import { paymentMiddleware } from "@t402/core";
import { evm } from "@t402/evm";
app.use(paymentMiddleware({
"GET /api/data": {
price: "$0.01",
network: "base",
resource: "Premium API access",
accepts: [
evm({
address: "0x...",
network: "base",
}),
],
},
}));Features
- Server & Client support
- Express, Hono, Fastify middleware
- Next.js integration
- React hooks & components
- EVM, Solana, TON, TRON support
- TypeScript-first design
Packages
@t402/coreCore protocol types, utilities, and base functionality
@t402/evmEVM chain support (Ethereum, Base, Arbitrum, Optimism, etc.)
@t402/svmSolana Virtual Machine support
@t402/nextNext.js integration with App Router support
@t402/paywallDrop-in payment UI components
@t402/mcpModel Context Protocol for AI agent payments
Supported Chains
Ethereum
Base
Arbitrum
Optimism
Ink
Berachain
Unichain
Solana
TON
TRON
Ready to get started?
Follow our quickstart guide to integrate t402 payments in under 5 minutes.
Read the Quickstart Guide