TypeScript
Type-safe SDK for Node.js with promise-based API and auto-pagination.
Python
Pythonic interface with async/await support for Python 3.9+.
Go
Idiomatic Go interface with context support and strong typing.
PHP
PSR-4 compliant SDK for PHP 8.1+.
Java
Thread-safe SDK for Java 8+ with Maven and Gradle support.
Kotlin
Kotlin SDK with coroutines and null safety.
C#
Type-safe SDK for .NET Standard 2.0+ with async Task-based API.
Ruby
Ruby SDK that follows Ruby conventions.
Rust
Async-first SDK built on Tokio and reqwest for Rust 1.75+.
Quick Start
1
Install the SDK
Install the SDK for your language with its package manager.For Maven coordinates and version-specific options, see each SDK’s page.
- TypeScript
- Python
- Go
- PHP
- Java
- Kotlin
- C#
- Ruby
- Rust
2
Initialize the Client
Read your API key from the For Java, Kotlin, C#, and Ruby, see the client setup on each SDK’s page.
DODO_PAYMENTS_API_KEY environment variable. The examples connect to test mode; see Test Mode vs Live Mode.- TypeScript
- Python
- Go
- PHP
- Rust
3
Create a Checkout Session
Create a checkout session and redirect the customer to the returned For the same call in other languages, and for payment links and webhooks, see the Integration Guide.
checkout_url.Key Features
All backend SDKs include:- Type Safety: Strong typing for compile-time safety and better IDE support.
- Error Handling: Typed errors that expose the HTTP status and the error body the API returned.
- Authentication: API key authentication, read from an environment variable.
- Async Support: Modern async/await patterns where applicable.
- Auto-Pagination: Automatic pagination for list responses.
- Usage Events: Methods to send usage events for usage-based billing.
- Test Mode: A setting that points the client at test mode, so no real money moves.
Mobile Checkout SDKs
For native Android, iOS, React Native, and Flutter apps, use the mobile checkout SDKs. They open Dodo’s hosted checkout page in the platform’s real browser surface (not a WebView), so Apple Pay and Google Pay work the same way they do on the open web. All four mobile SDKs share the same contract:start(...) returns a typed CheckoutResult, none of them hold an API key, and they never call the API directly.
Android
Kotlin SDK that opens a Chrome Custom Tab. Requires
minSdk 23.iOS
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
End-to-end mobile payment flow, from backend checkout session to callback scheme setup.
Command-Line Interface
The Dodo CLI manages payments, customers, and webhooks from your terminal. It includes an interactive TUI, an AI assistant, and webhook testing tools.CLI
Interactive terminal client with AI assistant and webhook testing.
Framework Adaptors
Adaptors add checkout, customer portal, and webhook handlers to your framework.Recommended Frameworks
Next.js
Route handlers for checkout, customer portal, and webhooks in the App Router.
Better Auth
Create a customer when a user signs up, and add checkout and the customer portal to your auth flow.
Supabase
Next.js and Supabase starter with auth, database schema, webhooks, and a pricing page.
Convex
Checkout, customer portal, and webhook functions for your Convex backend.
All Other Framework Adaptors
All Other Framework Adaptors
SvelteKit
Nuxt
Remix
Express
Fastify
Hono
Astro
TanStack
Bun
Migration from Node.js SDK
The TypeScript SDK replaces the legacy Node.js SDK. If you use the Node.js SDK, see the migration guide to update your integration.
Get Help
- 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 the API reference.
Contributing
Each SDK repository accepts contributions. Most have aCONTRIBUTING.md file with guidelines for reporting bugs, requesting features, submitting pull requests, running tests, and code style conventions.
Visit the individual SDK pages to access their GitHub repositories and contribution guidelines.