Create Portal Session
Create a Dodo Payments billing portal session for managing subscription
POST
Endpoint
Authentication
Requires a valid API key withbilling:write scope.
Request Body
No request body required.Response
Returns a Dodo Payments billing portal URL.Dodo Payments billing portal URL to redirect user to
Errors
Unauthorized - Missing or invalid API key
Not Found - User has no billing customer ID (never subscribed)
Internal Server Error - Failed to create Dodo Payments portal session
How It Works
Portal Flow:- API Call: Client requests portal session
- Customer Lookup: System finds user’s Dodo Payments customer ID
- Session Creation: Dodo Payments portal session created with return URL
- Redirect: User redirected to Dodo Payments portal
- Self-Service: User manages subscription on Dodo Payments
- Return: User clicks “Return to…” and comes back to app
https://www.wiseyield.co/dashboard/billing
Customer Requirement: User must have subscribed at least once. If no subscription history exists, returns 404 error.
Customer Portal Features
Dodo Payments portal allows users to:Subscription Management
- Change subscription plan (upgrade/downgrade)
- Cancel subscription
- Resume canceled subscription
- View upcoming invoice
Payment Methods
- Update credit card
- Add new payment method
- Set default payment method
- Remove old payment methods
Billing History
- View all past invoices
- Download invoice PDFs
- See payment history
Contact Information
- Update billing email
- Update billing address
- Update tax ID
Use Cases
Open Billing Portal
Manage Subscription Button
Check Before Opening Portal
Best Practices
Integration Examples
Billing Settings Page
Portal Button with Confirmation
Portal Link in Dropdown Menu
Portal in New Tab
Portal Return Handling
Related Endpoints
- Get Subscription - GET current subscription status
- Create Checkout Session - POST to start new subscription
- Get Invoices - GET payment history
- Get Usage - GET current usage metrics