Available SDKs
Choose the SDK that matches your tech stack:TypeScript SDK
Type-safe integration for TypeScript and Node.js with promise-based API and auto-pagination
Python SDK
Pythonic interface with async/await support for Python 3.7+ applications
PHP SDK
PSR-4 compliant SDK for modern PHP 8.1+ applications
Go SDK
Idiomatic Go interface with context support and strong typing
Ruby SDK
Elegant Ruby interface following Ruby conventions and best practices
Java SDK
Robust and thread-safe SDK for Java 8+ with Maven and Gradle support
Kotlin SDK
Modern Kotlin SDK with coroutines, null safety, and extension functions
C# SDK
Type-safe SDK for .NET 8+ with async Task-based API (Beta)
Rust SDK
Async-first SDK built on Tokio and reqwest with strong typing for Rust 1.75+
CLI
Command-line interface for interacting with the API from your terminal
Quick Start
Get started with any SDK in minutes:1
Install the SDK
Use your language’s package manager to install the SDK
- TypeScript/Node.js
- Python
- PHP
- Go
- Rust
2
Initialize the Client
Configure the client with your API key
- TypeScript
- Python
- PHP
- Go
- Rust
3
Make Your First API Call
Create a checkout session or payment
You’re now ready to process payments! Visit the individual SDK pages for detailed guides and examples.
Key Features
All backend SDKs share these core capabilities. The mobile checkout SDKs below are deliberately narrower — they hold no API key and never call the API:- Type Safety:通过强类型提供编译时安全性,并改善 IDE 支持
- Error Handling:全面的异常处理,并提供详细的错误消息
- Authentication:简单的 API key Authentication,支持环境变量
- Async Support:在适用场景下采用现代 async/await 模式
- Auto-Pagination:对列表响应进行自动分页
- Usage-Based Billing:内置支持,用于跟踪和摄取使用量事件
- Testing:完整支持 Test Mode,用于开发和测试
Mobile Checkout SDKs
If you’d rather open Dodo’s hosted checkout page than build a native payment sheet, use the mobile checkout SDK for your platform. All four share the same one-call contract:start(...) returns a typed CheckoutResult,
none of them hold an API key, and Apple Pay/Google Pay work the same way they
do on the open web since checkout opens in the platform’s real browser surface
(SFSafariViewController / Custom Tabs), not a WebView:
Android
Kotlin SDK that opens a Chrome Custom Tab. Requires
minSdk 23iOS
Swift SDK that opens
SFSafariViewController. Requires iOS 16+React Native
Turbo Module over both native cores. Requires React Native 0.76+
Flutter
Pigeon channel over both native cores. Requires Flutter 3.44+
Mobile Integration Guide
The end-to-end mobile payment flow, from backend checkout session to callback scheme setup
Command-Line Interface
For terminal-based workflows and automation:CLI
支持 Dodo Payments API 的自动生成命令行界面
- Resource-based command structure for intuitive usage
- Multiple output formats (JSON, YAML, pretty, interactive)
- Shell completion for bash, zsh, and fish
- Perfect for scripting and CI/CD automation
Migration from Node.js SDK
We migrated from the Node.js SDK to the new TypeScript SDK. If you’re using the legacy Node.js SDK, see the migration guide to update your integration.
Framework Adapters
Integrate in under 10 lines of code with our framework adapters. Choose from our recommended frameworks or explore all supported options.Recommended Frameworks
Next.js
React-based full-stack framework with App Router support
Better Auth
Authentication framework with built-in integrations
Supabase
开源的 Firebase 替代方案,提供 Postgres 和 Auth
Convex
Backend-as-a-Service with real-time capabilities
Show other 8+ supported frameworks
Show other 8+ supported frameworks
SvelteKit
Nuxt
Remix
Express
Fastify
Hono
Astro
TanStack
Getting Help
Need assistance with any SDK?- Discord: Join our community server for real-time help
- Email: Contact us at support@dodopayments.com
- GitHub: Open an issue on the respective SDK repository
- Documentation: Visit our API reference
Contributing
We welcome contributions to all our SDKs! Each repository has aCONTRIBUTING.md file with guidelines for:
- Reporting bugs
- Requesting features
- Submitting pull requests
- Running tests locally
- Code style and conventions