> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dodopayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Portal

> Empower customers to self-serve and manage their subscriptions, billing history, license keys, and profile securely.

<Info>
  The Customer Portal is a secure, hosted area where your customers can manage subscriptions, view invoices and access license keys details—without contacting support.
</Info>

<CardGroup cols={2}>
  <Card title="Create Portal Session (API)" icon="code" href="/api-reference/customers/create-customer-portal-session">
    Programmatically create secure, time‑bound portal sessions.
  </Card>

  <Card title="Subscriptions" icon="repeat" href="/features/subscription">
    Manage recurring plans, upgrades, downgrades, and add‑ons.
  </Card>
</CardGroup>

<br />

<Frame>
  <img src="https://mintcdn.com/dodopayments/kCngKZVrb0rZMS1f/images/customer-portal/new-portal.png?fit=max&auto=format&n=kCngKZVrb0rZMS1f&q=85&s=9431b2e24142e47cb39dc84c1a0303fe" alt="Revamped Customer Portal showing active subscriptions, payment methods, and billing history" style={{ maxHeight: '500px', width: 'auto' }} width="2876" height="1568" data-path="images/customer-portal/new-portal.png" />
</Frame>

## What Is the Customer Portal?

The portal provides a trusted, branded self‑service experience for customers to:

* **Access billing history**: View invoices and download receipts.
* **Manage subscriptions**: View subscription details, cancel subscriptions immediately or at the next billing date.
* **Update payment methods**: Change payment methods for active subscriptions or reactivate subscriptions on hold.
* **Retrieve license keys**: Access all keys tied to purchases.
* **Navigate with ease**: Use the back button to move between portal sections without losing context.

## Key Benefits

* **Lower support volume**: Customers resolve common billing requests on their own
* **Faster time‑to‑value**: Immediate access to invoices and keys
* **Reduced churn risk**: Clear visibility into renewals and plan details
* **Secure by design**: Tokenized access with expiring links
* **Localized experience**: Portal is available in 21 languages, with automatic detection based on the customer's browser preferences

## Access Methods

Customers can reach the portal using either a static link or a one‑time dynamic link.

### Static link (email‑based access)

Customers can request portal access by entering their email at a static link that never expires.

The static portal link format varies by environment:

**Test Mode** (for testing and development):

```bash theme={null}
https://test.customer.dodopayments.com/login/{business_id}
```

**Live Mode** (for production with real transactions):

```bash theme={null}
https://customer.dodopayments.com/login/{business_id}
```

Replace `{business_id}` with your actual business identifier, then share the appropriate link with customers so they can enter their email and receive secure access to the portal.

<Frame>
  <img src="https://mintcdn.com/dodopayments/kIuKVjhdOQFWlzSx/images/customer-portal/email-login.png?fit=max&auto=format&n=kIuKVjhdOQFWlzSx&q=85&s=bd8ee54177bc23e12e3657c87f487bae" alt="Email-based login screen" style={{ maxHeight: '500px', width: 'auto' }} width="2880" height="1550" data-path="images/customer-portal/email-login.png" />
</Frame>

<Steps>
  <Step title="Merchant flow">
    1. Go to Sales → Customer.
    2. Click <i>Share invite</i>.
    3. Copy the <i>Static link</i> and share it with your customer.
  </Step>

  <Step title="Customer flow">
    1. Open the static link.
    2. Enter the email used at purchase.
    3. Receive a secure login link to access the portal.

    <Check>
      Existing customers are recognized automatically.
    </Check>
  </Step>
</Steps>

### Dynamic link (magic link)

A personalized, one‑time magic link that sends customers directly into the portal. The link expires in 24 hours.

<Warning>
  Dynamic links expire after 24 hours. If it expires, generate and send a new link.
</Warning>

<Frame>
  <img src="https://mintcdn.com/dodopayments/kIuKVjhdOQFWlzSx/images/customer-portal/magic-link.png?fit=max&auto=format&n=kIuKVjhdOQFWlzSx&q=85&s=8e63714f40468bd6e42c811e194f2698" alt="Magic link direct access" style={{ maxHeight: '500px', width: 'auto' }} width="2880" height="1554" data-path="images/customer-portal/magic-link.png" />
</Frame>

<Steps>
  <Step title="Merchant flow">
    1. Go to Sales → Customer.
    2. Click <i>Share invite</i>.
    3. Copy the <i>Dynamic link</i> and share it with your customer.
  </Step>

  <Step title="Customer flow">
    1. Open the dynamic link.
    2. Access the Customer Portal directly without entering an email.
  </Step>
</Steps>

## Portal Features

The revamped Customer Portal provides a clean, unified interface with a left sidebar and organized sections for all account management needs.

<CardGroup cols={2}>
  <Card title="Active Subscriptions" icon="repeat">
    View all active subscriptions with plan name, price, renewal date, and validity. Click "Manage subscription" to view details, edit billing info, or cancel.
  </Card>

  <Card title="Payment Methods" icon="credit-card">
    View all saved payment methods (cards, UPI, etc.) at a glance. Edit payment methods directly from subscription details.
  </Card>

  <Card title="Billing History" icon="file-invoice">
    View all transactions in a detailed table with date, status, pricing type, entitlements, and downloadable invoices.
  </Card>

  <Card title="Billing Information" icon="user">
    View and edit your name, email, phone number, and billing address from the subscription details page.
  </Card>
</CardGroup>

### Portal Overview

The main portal page displays all active subscriptions, saved payment methods, and billing history in a single scrollable view.

<Frame>
  <img src="https://mintcdn.com/dodopayments/kCngKZVrb0rZMS1f/images/customer-portal/new-portal.png?fit=max&auto=format&n=kCngKZVrb0rZMS1f&q=85&s=9431b2e24142e47cb39dc84c1a0303fe" alt="Customer Portal main page showing active subscriptions and payment methods" style={{ maxHeight: '500px', width: 'auto' }} width="2876" height="1568" data-path="images/customer-portal/new-portal.png" />
</Frame>

### Payment Methods & Billing History

Scroll down to view saved payment methods and a complete billing history with status indicators and downloadable invoices.

<Frame>
  <img src="https://mintcdn.com/dodopayments/kCngKZVrb0rZMS1f/images/customer-portal/payment-methods-invoices.png?fit=max&auto=format&n=kCngKZVrb0rZMS1f&q=85&s=1aed6644dbb338cda755798eda99a6f2" alt="Payment methods and billing history with invoice downloads" style={{ maxHeight: '500px', width: 'auto' }} width="2880" height="1560" data-path="images/customer-portal/payment-methods-invoices.png" />
</Frame>

## Language Support

The Customer Portal is available in **21 languages**, so your customers can manage their subscriptions, payment methods, and billing history in the language they're most comfortable with.

### How language selection works

* **Automatic detection**: On first visit, the portal detects the customer's preferred language from their browser settings and loads the matching translation if available. English is used as the fallback.
* **Manual override**: Customers can change the active language at any time from the language selector in the portal header (available on both desktop and mobile).
* **Persisted preference**: The selected language is stored in the `NEXT_LOCALE` cookie (valid for 1 year) so the portal remembers the choice across sessions.

### Supported languages

| Language          | Code | Language   | Code |
| ----------------- | ---- | ---------- | ---- |
| English (default) | `en` | Indonesian | `id` |
| Arabic            | `ar` | Italian    | `it` |
| Catalan           | `ca` | Japanese   | `ja` |
| Chinese           | `zh` | Korean     | `ko` |
| Dutch             | `nl` | Malay      | `ms` |
| French            | `fr` | Polish     | `pl` |
| German            | `de` | Portuguese | `pt` |
| Hebrew            | `he` | Romanian   | `ro` |
| Russian           | `ru` | Spanish    | `es` |
| Swedish           | `sv` | Thai       | `th` |
| Turkish           | `tr` |            |      |

## Plan Changes (Upgrade/Downgrade)

When products are organized into **Product Collections**, customers can upgrade or downgrade between plans directly from the Customer Portal.

<Tip>
  **Want to enable upgrade/downgrade for existing subscriptions?** Add your subscription products to a Product Collection. Once grouped, customers can switch between plans in the same collection via the Customer Portal.
</Tip>

### Available Actions

| Action        | Description                                       | When Available                            |
| ------------- | ------------------------------------------------- | ----------------------------------------- |
| **Upgrade**   | Move to a higher-tier plan in the same collection | Business has enabled subscription updates |
| **Downgrade** | Move to a lower-tier plan in the same collection  | Business has enabled subscription updates |

### How Plan Changes Work

1. Customer views their current subscription in the portal
2. Available upgrade/downgrade options are shown based on the product collection
3. Customer selects the new plan
4. Proration is calculated and payment is processed immediately (if applicable)
5. Subscription is updated to the new plan

<Info>
  Plan changes are only available between products within the same collection. Products must be subscription or usage-based billing types.
</Info>

### Business Controls

Businesses can configure plan change behavior in Subscription Settings:

* **Allow Subscription Updates**: Enable or disable the ability for customers to upgrade or downgrade their subscriptions

<Card title="Product Collections" icon="layer-group" href="/features/product-collections">
  Learn how to set up product collections and configure upgrade/downgrade paths.
</Card>

## Subscription Details

When customers click "Manage subscription" on any active subscription, they are taken to the subscription details page. This page shows:

* **Plan details**: Subscription name, price, renewal date, and validity period
* **Payment method**: The card or payment method linked to the subscription, with an "Edit" button
* **Billing information**: Name, email, phone number, and billing address with an "Edit" button
* **Billing history**: A detailed table of all payments for this subscription
* **Cancel Subscription**: A prominent button to cancel the subscription

<Frame>
  <img src="https://mintcdn.com/dodopayments/kCngKZVrb0rZMS1f/images/customer-portal/subscription-details.png?fit=max&auto=format&n=kCngKZVrb0rZMS1f&q=85&s=4ae46f6878c9343b2e963c516952c9d3" alt="Subscription details page showing plan info, payment method, billing information, and cancel option" style={{ maxHeight: '500px', width: 'auto' }} width="2880" height="1560" data-path="images/customer-portal/subscription-details.png" />
</Frame>

## Cancelling a Subscription

Customers can cancel their subscription directly from the subscription details page. Clicking "Cancel Subscription" opens a confirmation dialog with two options:

* **Cancel at next billing date**: The subscription remains active until the current billing period ends, then cancels automatically.
* **Cancel now**: The subscription is cancelled immediately.

<Frame>
  <img src="https://mintcdn.com/dodopayments/kCngKZVrb0rZMS1f/images/customer-portal/cance-sub.png?fit=max&auto=format&n=kCngKZVrb0rZMS1f&q=85&s=66eb6e380c991826c431fd0c563cbfa6" alt="Cancel subscription dialog with options to cancel at next billing date or cancel immediately" style={{ maxHeight: '500px', width: 'auto' }} width="2880" height="1550" data-path="images/customer-portal/cance-sub.png" />
</Frame>

### Cancellation Reasons

Before confirming cancellation, customers are asked **"Why are you cancelling?"** and prompted to pick a reason from a curated list. The reason is stored on the subscription and surfaced in webhook payloads and the API, so you can analyze churn drivers and tailor your win-back flows.

<Frame>
  <img src="https://mintcdn.com/dodopayments/RlXcM7JO-E_w40Np/images/customer-portal/cancellation-reasons.png?fit=max&auto=format&n=RlXcM7JO-E_w40Np&q=85&s=979394da2a9aa3907cbf9f4e225f9a4b" alt="Cancellation modal with the 'Why are you cancelling?' dropdown showing reasons like Too expensive, Missing features, and Other" style={{ maxHeight: '500px', width: 'auto' }} width="2880" height="1564" data-path="images/customer-portal/cancellation-reasons.png" />
</Frame>

| Value              | Customer-facing label       |
| ------------------ | --------------------------- |
| `too_expensive`    | Too expensive               |
| `missing_features` | Missing features            |
| `switched_service` | Switched to another service |
| `unused`           | Not using it enough         |
| `customer_service` | Poor customer service       |
| `low_quality`      | Low quality                 |
| `too_complex`      | Too complex                 |
| `other`            | Other                       |

The selected value is written to the subscription's `cancellation_feedback` field. An optional free-text `cancellation_comment` can also be captured.

```typescript theme={null}
// Read the captured feedback after a customer cancels
const subscription = await client.subscriptions.retrieve('sub_123');
console.log(subscription.cancellation_feedback); // e.g., "too_expensive"
console.log(subscription.cancellation_comment);  // e.g., "Switching to a competitor"
```

Both fields are also included in the `subscription.cancelled` webhook payload, and you can populate them programmatically on `PATCH /subscriptions/{id}` when scheduling or executing a cancellation through the API.

<Tip>
  Combine `cancellation_feedback` with [Subscription Dunning](/features/recovery/subscription-dunning) to tailor win-back emails — for example, send a discount code to `too_expensive` cancellers and a "what's missing?" survey to `missing_features` cancellers.
</Tip>

## Updating Payment Methods

Customers can update their payment methods directly from the subscription details page by clicking "Edit" next to the payment method. This feature is especially important for reactivating subscriptions that have been placed on hold due to failed payments.

### Reactivating Subscriptions on Hold

When a subscription is placed on `on_hold` state due to a failed payment, customers must update their payment method to reactivate it. The update process automatically:

1. **Creates a charge** for remaining dues
2. **Generates an invoice** for the charge
3. **Processes the payment** using the new payment method
4. **Reactivates the subscription** to `active` state upon successful payment

<Warning>
  Subscriptions in `on_hold` state will not renew automatically. Customers must update their payment method to clear dues and reactivate the subscription.
</Warning>

<Info>
  After successfully updating the payment method for an `on_hold` subscription, customers will see a confirmation page and receive email notifications about the successful payment and subscription reactivation.
</Info>

### Payment Method Update Flow

<Steps>
  <Step title="Access subscription details">
    Click "Manage subscription" on any active subscription from the portal home page.
  </Step>

  <Step title="Click Edit on payment method">
    Click the "Edit" button next to the payment method to open the payment method update interface.
  </Step>

  <Step title="Select or add payment method">
    Choose an existing saved payment method or add a new one by entering card details securely.
  </Step>

  <Step title="Confirm changes">
    Confirm the update. For `on_hold` subscriptions, this will automatically create a charge for remaining dues.
  </Step>

  <Step title="Complete payment (if on hold)">
    If the subscription is on hold, customers will be redirected to complete the payment for remaining dues. Upon successful payment, the subscription is automatically reactivated.
  </Step>

  <Step title="Confirmation">
    Customers receive confirmation that the payment method has been updated and, if applicable, that the subscription has been reactivated.
  </Step>
</Steps>

## Integration Examples

Create a time‑bound Customer Portal session for a specific customer via API, then redirect the user to the session URL.

<CodeGroup>
  ```typescript Node.js theme={null}
  const session = await client.customers.customerPortal.create('cus_123');

  // Redirect the user to the hosted Customer Portal
  window.location.href = session.link;
  ```
</CodeGroup>

## Unified Customer Portal

In addition to business-specific customer portals, Dodo Payments offers a **Unified Customer Portal** at [customer.dodopayments.com](https://customer.dodopayments.com) where customers can view and manage all their purchases and subscriptions across different businesses using Dodo Payments.

<Frame>
  <img src="https://mintcdn.com/dodopayments/eNGWg9ca-WxQ9nMf/images/changelog/unified-customer-portal.png?fit=max&auto=format&n=eNGWg9ca-WxQ9nMf&q=85&s=bceabb06ca0f00aa2a458f4af95a5cda" alt="Unified Customer Portal" style={{ maxHeight: '500px', width: 'auto' }} width="1640" height="953" data-path="images/changelog/unified-customer-portal.png" />
</Frame>

### Unified Portal Features

* **Cross-business visibility**: View all purchases and subscriptions from any Dodo Payments merchant in one place
* **Centralized management**: Manage subscriptions across different businesses from a single dashboard
* **Unified billing history**: Access invoices and payment history from all purchases
* **Single sign-on**: Log in once with email to access purchases from all Dodo Payments merchants

<Tip>
  The Unified Customer Portal complements business-specific portals. Customers can use either the branded merchant portal or the unified portal based on their preference.
</Tip>

## Troubleshooting

* **Link expired**: Generate and send a new dynamic link.
* **Email not recognized**: Ask the customer to use the email associated with their purchase
* **Subscription on hold**: If a subscription is on hold, customers must update their payment method through the portal to clear dues and reactivate the subscription. The update process will automatically charge for remaining dues.
* **Payment method update failed**: If payment fails during the update process for an `on_hold` subscription, the subscription will remain on hold. Customers can try again with a different payment method.

<Card title="Design & Theme Customization" icon="palette" href="/features/design">
  Customize your customer portal appearance with pre-built themes, typography, colors, and live preview from the Design page.
</Card>
