Create Checkout Session
Create a Dodo Payments checkout session to start or upgrade a subscription
POST
Endpoint
Authentication
Requires a valid API key withbilling:write scope.
Request Body
Dodo Payments product ID for the subscription plan (e.g.,
dodo_pay_...)Plan name:
seed, sprout, harvest, grove, summitResponse
Returns a Dodo Payments checkout session URL.Dodo Payments checkout page URL to redirect user to
Errors
Bad Request - Missing required fields (priceId or plan)
Unauthorized - Missing or invalid API key
Internal Server Error - Failed to create Dodo Payments checkout session
How It Works
Checkout Flow:- API Call: Client sends priceId and plan name
- Customer Creation: If first subscription, creates Dodo Payments customer
- Session Creation: Dodo Payments checkout session created with:
- Subscription mode
- Card payment method
- Success/cancel redirect URLs
- User metadata
- Redirect: User redirected to Dodo Payments checkout page
- Payment: User enters payment details on Dodo Payments
- Webhook: Dodo Payments sends webhook to create subscription in database
- Redirect Back: User redirected to success URL
- Success:
https://www.wiseyield.co/dashboard/billing?success=true - Cancel:
https://www.wiseyield.co/pricing?canceled=true
- First checkout creates Dodo Payments customer
- Customer ID stored in
users.dodoCustomerId - Subsequent checkouts reuse same customer
Subscription Plans & Pricing
Seed Plan
- Price: €22/month
- Features:
- 1 farm
- 50 AI requests/month
- Email support
- Basic analytics
- Price ID: Contact support for production price IDs
Sprout Plan
- Price: €49/month
- Features:
- 3 farms
- 200 AI requests/month
- Team collaboration (5 members)
- Farm budgeting
- Price ID: Contact support for production price IDs
Harvest Plan
- Price: €89/month (recommended)
- Features:
- 7 farms
- 500 AI requests/month
- Vision AI Full (50 scans/mo)
- Market Intelligence (20 queries/mo)
- Price ID: Contact support for production price IDs
Grove Plan
- Price: €149/month
- Features:
- 15 farms
- 1,000 AI requests/month
- Financial AI Insights
- P&L reports, invoices
- Price ID: Contact support for production price IDs
Summit Plan
- Price: €299+/month (enterprise)
- Features:
- Unlimited farms
- Unlimited AI requests
- Dedicated support
- API access
- SLA guarantee
- Price ID: Contact support for production price IDs
Use Cases
Start Subscription Checkout
Upgrade Plan
Choose Plan with Price Selector
Handle Checkout Success
Best Practices
Integration Examples
Pricing Page Component
Upgrade Button Component
Related Endpoints
- Get Subscription - GET current subscription status
- Create Portal Session - POST to manage existing subscription
- Get Invoices - GET payment history
- Get Usage - GET current usage metrics