TypeScript
Node.js के लिए type-safe SDK, जिसमें promise-based API और auto-pagination है।
Python
Python 3.9+ के लिए async/await support वाला Pythonic interface।
Go
context support और strong typing वाला idiomatic Go interface।
PHP
PHP 8.1+ के लिए PSR-4 compliant SDK।
Java
Maven और Gradle support वाला Java 8+ के लिए thread-safe SDK।
Kotlin
Coroutines और null safety वाला Kotlin SDK।
C#
.NET Standard 2.0+ के लिए async Task-आधारित API वाला Type-safe SDK।
Ruby
Ruby conventions का पालन करने वाला Ruby SDK।
Rust
Rust 1.75+ के लिए Tokio और reqwest पर निर्मित async-first SDK।
त्वरित शुरुआत
1
Install the SDK
अपने language के लिए उसके package manager से SDK इंस्टॉल करें.Maven coordinates और version-specific विकल्पों के लिए, प्रत्येक SDK का पेज देखें।
- TypeScript
- Python
- Go
- PHP
- Java
- Kotlin
- C#
- Ruby
- Rust
2
Initialize the Client
अपनी API key को Java, Kotlin, C#, और Ruby के लिए, प्रत्येक SDK के पेज पर client setup देखें.
DODO_PAYMENTS_API_KEY environment variable से पढ़ें। उदाहरण test mode से connect होते हैं; Test Mode vs Live Mode देखें.- TypeScript
- Python
- Go
- PHP
- Rust
3
Create a Checkout Session
checkout session बनाएं और customer को लौटाए गए अन्य languages में इसी call के लिए, और payment links तथा webhooks के लिए, Integration Guide देखें।
checkout_url पर redirect करें.मुख्य सुविधाएं
सभी backend SDKs में शामिल हैं:- Type Safety: compile-time safety और बेहतर IDE support के लिए मजबूत typing।
- Error Handling: Typed errors, जो API द्वारा लौटाए गए HTTP status और error body उपलब्ध कराते हैं।
- Authentication: environment variable से पढ़ा जाने वाला API key authentication।
- Async Support: जहां लागू हो, आधुनिक async/await patterns।
- Auto-Pagination: list responses के लिए automatic pagination।
- Usage Events: usage-based billing के लिए usage events भेजने की methods।
- Test Mode: ऐसी setting जो client को test mode पर point करती है, ताकि वास्तविक धन का लेन-देन न हो।
Mobile Checkout SDKs
Native Android, iOS, React Native और Flutter apps के लिए mobile checkout SDKs का उपयोग करें। ये platform के वास्तविक browser surface (WebView नहीं) में Dodo का hosted checkout page खोलते हैं, इसलिए Apple Pay और Google Pay उसी तरह काम करते हैं जैसे open web पर करते हैं। सभी चार mobile SDKs एक ही contract साझा करते हैं:start(...) एक typed CheckoutResult लौटाता है, इनमें से कोई भी API key नहीं रखता, और ये सीधे API को कभी call नहीं करते।
Android
Chrome Custom Tab खोलने वाला Kotlin SDK।
minSdk 23 आवश्यक है।iOS
SFSafariViewController खोलने वाला Swift SDK। iOS 16+ आवश्यक है।
React Native
दोनों native cores पर Turbo Module। React Native 0.76+ आवश्यक है।
Flutter
दोनों native cores पर Pigeon channel। Flutter 3.44+ आवश्यक है।
Mobile Integration Guide
backend checkout session से callback scheme setup तक end-to-end mobile payment flow।
Command-Line Interface
Dodo CLI आपके terminal से payments, customers और webhooks का प्रबंधन करता है। इसमें एक interactive TUI, एक AI assistant और webhook testing tools शामिल हैं।CLI
AI assistant और webhook testing के साथ interactive terminal client।
Framework Adaptors
Adaptors आपके framework में checkout, customer portal और webhook handlers जोड़ते हैं।अनुशंसित Frameworks
Next.js
App Router में checkout, customer portal और webhooks के लिए route handlers।
Better Auth
user के sign up करने पर customer बनाएं और अपने auth flow में checkout तथा customer portal जोड़ें।
Supabase
auth, database schema, webhooks और pricing page के साथ Next.js और Supabase starter।
Convex
आपके Convex backend के लिए checkout, customer portal और webhook functions।
All Other Framework Adaptors
All Other Framework Adaptors
SvelteKit
Nuxt
Remix
Express
Fastify
Hono
Astro
TanStack
Bun
Node.js SDK से Migration
TypeScript SDK legacy Node.js SDK का स्थान लेता है। यदि आप Node.js SDK का उपयोग करते हैं, तो अपना integration अपडेट करने के लिए migration guide देखें।
सहायता प्राप्त करें
- Discord: real-time सहायता के लिए हमारे community server से जुड़ें।
- Email: support@dodopayments.com पर हमसे संपर्क करें।
- GitHub: संबंधित SDK repository में issue खोलें।
- Documentation: API reference पर जाएं।
योगदान
हर SDK repository contributions स्वीकार करती है। अधिकांश में दिशानिर्देशों वालीCONTRIBUTING.md file होती है, जिसमें bugs report करने, features का अनुरोध करने, pull requests सबमिट करने, tests चलाने और code style conventions की जानकारी होती है।
उनके GitHub repositories और contribution guidelines देखने के लिए अलग-अलग SDK pages पर जाएं।