Selling Digital Goods on iOS
A comprehensive guide to selling digital goods and services on iOS apps using Dodo Payments
Introduction
Dodo Payments empowers developers to sell digital goods and services in iOS apps globally, handling complex aspects like tax compliance, currency conversion, and payouts. This comprehensive guide details how to integrate Dodo Payments into your iOS app, specifically for SaaS tools, content subscriptions, and digital utilities.
1. Overview
Dodo Payments serves as your Merchant of Record (MoR), managing critical aspects of your digital business:
What We Handle
- β Tax collection and remittance (VAT, GST, and other regional taxes)
- β Global payments and local payment methods
- β Currency conversion and foreign exchange
- β Chargebacks and fraud prevention
- β End-customer invoicing and receipts
- β Compliance with regional regulations
What You Get
- π A unified API for web and mobile platforms
- π³ Support for in-app checkouts (UPI, cards, wallets, BNPL)
- π Global payout support (Payoneer, Wise, local bank transfers)
- π Analytics and reporting dashboard
- π Secure payment processing
2. Use Cases
π± Subscriptions
- Premium content or feature access
- Recurring billing with flexible options:
- Free trials
- Proration
- Upgrades and downgrades
π Courses and Learning
- Pay-per-course access
- Bundled content packages
- Lifetime or renewable licenses
- Progress tracking integration
π΅ Digital Downloads
- One-time purchases (PDFs, music, tools)
- Digital asset delivery
- License key management
π οΈ SaaS Tools
- Software-as-a-Service subscriptions
- Usage-based billing
- Team and enterprise plans
3. Integration Flow
For a complete developer walkthrough, refer to our Mobile Integration Guide.
A. In-App Browser Integration
You can integrate Dodo Payments into your app using our hosted checkout or in-app browser solution.
Using WKWebView
Using SFSafariViewController
B. Handling Apple Pay Redirects in SFSafariViewController
When integrating Apple Pay via SFSafariViewController in iOS, you can automatically detect payment completion without requiring users to manually tap the βDoneβ button. This section explains how to implement this using custom URL schemes or Universal Links.
Implementation Steps
-
Configure the Redirect URL When generating the Dodo Payments payment link, set the
redirect_url
to a custom scheme or Universal Link: -
Handle the Redirect in AppDelegate For custom URL schemes, implement this method:
-
Add Notification Observer in View Controller
C. Creating Payment Links
You can create payment links either statically or dynamically:
1. Static Payment Links
Simple to create by appending your product ID to the base URL:
2. Dynamic Payment Links
Created via API call with customer details:
4. Platform Considerations
iOS Specific Guidelines
For digital goods sold outside the App Store, Dodo Payments enables:
- Web-based checkout via WebView
- Compliance with Appleβs reader app guidelines
- Support for cross-platform purchases
Permitted Use Cases
- E-learning platforms
- SaaS applications
- Digital content subscriptions
- Utility tools and services
Best Practices
- Implement proper receipt validation
- Handle network connectivity issues
- Provide clear purchase flow
Android Considerations
- Google Play Billing is required for in-app digital goods
- Dodo Payments is ideal for non-in-app purchases (e.g. via browser or emails)
5. Compliance and Security
Dodo Payments ensures:
- Automatic tax calculation & invoicing per region
- Support for customer refunds and dispute resolution
- Full audit logs for platform compliance (EU, UK, India, etc.)
- PCI DSS compliance
- GDPR and CCPA compliance
- Secure payment processing
- Data encryption at rest and in transit
6. Example Code
Create Checkout Session (Node.js)
Handle Webhooks (Node.js)
7. Resources
- π Dodo API Reference
- π± Mobile Integration Guide
- π Webhooks Setup Guide
- π³ Checkout Session Guide
- π₯ Customer Portal
- π Analytics Dashboard
8. Support and Community
- π¬ Discord Community for real-time help
- π§ Developer Success Team: dev@dodopayments.com
- π 24/7 Technical Support