Overview
Dodo Payments handles all subscription management, billing, and payment processing for your application. This guide walks you through setting up your account and obtaining the necessary API credentials.Create Your Dodo Payments Account
Sign up for Dodo Payments
Go to Dodo Payments Dashboard and create a new account.Fill in your business details and verify your email address.
Get your API key
Once logged in, navigate to Settings → API Keys.Copy your API key - this is your
DODO_PAYMENTS_API_KEY.Get your webhook secret
In the same Settings section, navigate to Webhooks.Copy the webhook secret - this is your
DODO_WEBHOOK_SECRET.You’ll use this secret to verify that webhook events are genuinely from Dodo Payments and haven’t been tampered with.
Environment Variables
Add these values to your.env.local file:
Create Subscription Products
Before your application can offer subscriptions, you need to create products in Dodo Payments.Configure product details
Fill in the basic product information:
- Product name: e.g., “Pro Plan”, “Enterprise Plan”
- Description: Brief description of what the plan includes
- Price: The recurring subscription price
- Currency: Select your currency (e.g., USD, EUR)
- Billing cycle: Choose the interval:
- Daily
- Weekly
- Monthly
- Yearly
Add product features via metadata
The starter kit uses product metadata to dynamically display features in the pricing UI.In the Metadata section, add a JSON object with a These features will automatically appear in your application’s pricing page.
features array:Product Metadata Structure
The application expects product metadata in this format:The
features array is required for the pricing page to display correctly. Without it, the product will still work but won’t show any features in the UI.Test vs Live Mode
Test Mode
- Use for development and testing
- No real payment processing
- Use test card numbers (provided by Dodo Payments documentation)
- All data is isolated from production
Live Mode
To switch to live mode, update your environment variable:Next Steps
Database Setup
Configure your database schema with Drizzle
Webhooks
Deploy webhook handlers to process payment events
