Skip to main content

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/core

Quick 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/core

Core protocol types, utilities, and base functionality

@t402/evm

EVM chain support (Ethereum, Base, Arbitrum, Optimism, etc.)

@t402/svm

Solana Virtual Machine support

@t402/next

Next.js integration with App Router support

@t402/paywall

Drop-in payment UI components

@t402/mcp

Model 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