Overview
This guide walks you through integrating Dodo Payments into your mobile applications, including Android, iOS, and Flutter. You’ll learn about prerequisites, dashboard setup, integration workflow, platform-specific code, best practices, and troubleshooting tips.Prerequisites
- Dodo Payments merchant account
- API credentials (API key and webhook secret key)
- Mobile app project (Android, iOS, or Flutter)
If you don’t have an account, get your business approved by contacting the founder or filling out this form.
Dashboard Setup
1
Access the Dashboard
Go to the Dodo Payments Dashboard.
2
Create a Product
Set up a one-time or subscription product.
3
Test the Checkout Flow
Share and open the product link, use test card
4242 4242 4242 4242
with any future expiry and 3-digit CVV.4
Generate API Key
Settings → API. See guide.
5
Configure Webhooks
Settings → Webhooks. See guide.
Integration Workflow
1
Create a Payment Link
You can create payment links either statically or dynamically:Static Payment LinksDynamic Payment Links
2
Open Payment Link in App
Open the payment link in your mobile app using a secure in-app browser or web view. This ensures a seamless and secure payment experience.See the Platform-Specific Integration section below for code examples.
Use Chrome Custom Tabs (Android), SFSafariViewController (iOS), or WebView (Flutter) for best results.
3
Handle Payment Completion Callback
After payment, Dodo Payments will redirect to your specified return URL. Handle this callback in your app to confirm payment status.Webhook Example (Node.js/Express):Test Webhook (Node.js):
Platform-Specific Integration
Best Practices
- Security: Never store API keys in your app code. Use secure storage and SSL pinning.
- User Experience: Show loading indicators, handle errors gracefully, and provide clear messages.
- Testing: Use test cards, simulate network errors, and test on various devices.
Troubleshooting
Common Issues
- WebView not opening payment link: Ensure the payment link is valid and uses HTTPS.
- Callback not received: Check your return URL and webhook configuration.
- API key errors: Verify that your API key is correct and has the necessary permissions.
Additional Resources
For questions or support, contact support@dodopayments.com.