Choosing the Right T402 SDK
TL;DR: T402 offers official SDKs in TypeScript, Python, Go, and Java. All SDKs support the same 44 networks and payment schemes. Choose TypeScript for web apps, Python for AI/ML, Go for high-performance services, and Java for enterprise systems.
Overview
T402 provides four official SDKs to match your technology stack. Each SDK implements the full T402 protocol specification, supporting all 44 networks across 10 families with identical payment flows.
The core functionality is consistent across all SDKs: create payment requirements, sign payment payloads, verify signatures, and settle on-chain. The difference lies in language idioms, ecosystem integration, and performance characteristics.
SDK Comparison
TypeScript
v2.7.1Package Manager
npm / pnpm
Runtime
Node.js 18+, Bun, Deno
Best For
- Web applications
- React/Vue/Next.js
- Serverless functions
- Full-stack apps
Python
v1.12.1Package Manager
pip / uv
Runtime
Python 3.10+
Best For
- AI/ML backends
- FastAPI/Flask APIs
- Data pipelines
- Jupyter notebooks
Go
v1.12.1Package Manager
go modules
Runtime
Go 1.24+
Best For
- High-performance APIs
- Microservices
- CLI tools
- Infrastructure
Java
v1.12.1Package Manager
Maven / Gradle
Runtime
Java 21+
Best For
- Enterprise systems
- Spring Boot
- Android apps
- Large-scale backends
Feature Matrix
| Feature | TypeScript | Python | Go | Java |
|---|---|---|---|---|
| Supported Chains | 44 | 44 | 44 | 44 |
| HTTP Middleware | Express, Hono, Fastify, Next.js | FastAPI, Flask | Gin, Echo | Spring Boot |
| MCP Server | Yes (11 tools) | Yes (6 tools) | Yes (6 tools) | Yes (6 tools) |
| CLI Tool | @t402/cli | t402 CLI | t402 binary | N/A |
| Type Safety | Full (Zod) | Full (Pydantic) | Full (native) | Full (native) |
Recommendations
Choose TypeScript if...
- You’re building a web application (React, Vue, Next.js)
- You want the most complete ecosystem with 37 packages
- You need React/Vue components for payment UIs
- You’re deploying to serverless platforms (Vercel, Cloudflare Workers)
Choose Python if...
- You’re building AI/ML services that need payment capabilities
- Your backend is FastAPI or Flask
- You want easy integration with data science workflows
- You prefer async/await with native asyncio support
Choose Go if...
- Performance is critical (high-throughput APIs)
- You’re building microservices or infrastructure
- You want a single static binary deployment
- You need the lowest memory footprint
Choose Java if...
- You’re in an enterprise environment with existing Java infrastructure
- You’re using Spring Boot or Jakarta EE
- You need JVM ecosystem compatibility (Kotlin, Scala)
- You’re building Android applications
Get Started
All T402 SDKs are open source and available on their respective package registries. Start accepting stablecoin payments in minutes: