---
title: Implement Billing Portal Login for your Customers
url: https://docs.maxio.com/getting-started/quick-start-guides/subscription-management/implement-billing-portal-login-for-your-customers
applies_to: Advanced Billing
updated: 2026-09-19
---

# Implement Billing Portal Login for your Customers

A configured Billing Portal is no use until your customers can get into it. Three login methods are available, and they differ mostly in how much code you write: an automatic email invite needs none, a link from your website needs a line of HTML, and one-click sign-on needs a backend script. Pick the one that matches how your customers already reach you.

*Login methods compared*

| Method | Code required | Best for |
| :--- | :--- | :--- |
| [Email invite](https://docs.maxio.com/getting-started/quick-start-guides/subscription-management/implement-billing-portal-login-for-your-customers#configure-an-invite-via-email) | None | Getting started quickly, with no website or app changes |
| [Link from your website](https://docs.maxio.com/getting-started/quick-start-guides/subscription-management/implement-billing-portal-login-for-your-customers#implement-a-link-from-your-website) | Basic HTML | Businesses whose website has no user login of its own |
| [One-click sign-on](https://docs.maxio.com/getting-started/quick-start-guides/subscription-management/implement-billing-portal-login-for-your-customers#implement-one-click-sign-on) | Backend and frontend | Web apps whose users are already signed in |

All three methods need the Billing Portal enabled and a test Subscription before you start. To configure the portal itself, see <a href="https://docs.maxio.com/getting-started/quick-start-guides/subscription-management/configure-the-billing-portal" target="_blank" rel="noopener noreferrer">Configure the Billing Portal</a>.

## Configure an invite via email

This method is the easiest to implement. Your customers receive an invitation email containing a login link when they sign up for your service.

**1. Enable the settings**

Some or all of these may be configured already.

1. Go to **Config** > **Settings** > **Billing Portal**. Under **Subscriber Invitations**, select **Automatic invitation emails for new subscribers**. This is typically enabled by default.
2. On the same page, under **Management Links**, select **Require customers to verify their email before logging in**. This is typically enabled by default.

**2. Decide whether to require a password**

Under **Config** > **Settings** > **Billing Portal**, the **Allow Password Logins** feature controls whether the customer sets and enters a password.

- Select **Allow Password Logins** for the flow shown in the first image below, where the customer is asked to set a password.
- Leave it cleared for the flow shown in the second image, where the portal opens directly.

![a billing portal sign-in that asks the customer to choose a password before showing the subscription](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/implement-billing-portal-login-for-your-customers/24181231829645_billing-portal-with-password.png)

*The login flow with **Allow Password Logins** selected*

![a billing portal that opens straight onto the subscription, with no password step](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/implement-billing-portal-login-for-your-customers/24181227301133_billing-portal-no-password.png)

*The login flow with **Allow Password Logins** cleared*

**3. Configure the email template**

Go to **Config** > **Settings** > **Billing Portal**, find the invitation email settings, and select **Edit Template**. Customize the email as needed. For a template you can start from, see the <a href="https://github.com/maxio-com/quickstart-guide-examples/blob/main/email-templates/full-examples/billing_portal_invite_main_content.html" target="_blank" rel="noopener noreferrer">Billing Portal email template</a> on GitHub.

![a billing portal invitation email, listing what the customer can manage above an Access the Billing Portal button](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/implement-billing-portal-login-for-your-customers/24181240187533_Screen_Shot_2022-06-23_at_8.35.45_AM.png)

*A customized Billing Portal invitation email*

**4. Test the flow**

Create a Subscription using an email address you can access, then review the email and work through the login flow. Adjust your settings as needed.

## Implement a link from your website

This method suits businesses that have no user login on their own website but still want to send customers to the Billing Portal from it.

**1. Determine your portal URL**

The portal URL is built from your Site's subdomain, so find that first.

1. Sign in to Advanced Billing and open your Site dashboard. The subdomain appears in the browser address bar, outlined in the image below.

   ![a browser address bar above a site header, the site subdomain outlined in both](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/implement-billing-portal-login-for-your-customers/24181270074509_get-subdomain.png)

2. Build the URL, which takes the form `https://www.billingportal.com/s/SUBDOMAIN`. With a real subdomain in place, it looks like `https://www.billingportal.com/s/demo-9469680429`.
3. Choose which page to link to.
   - To link to the main login page, use `https://www.billingportal.com/s/SUBDOMAIN/login/password`.
   - To link to the page where a customer requests a login link, use `https://www.billingportal.com/s/SUBDOMAIN/login/magic`.

   If you are unsure, build both links with your own subdomain and try them.

**2. Add the link to your website**

Add an HTML link wherever your customers expect to find account management.

1. Write the HTML. This example links to the main login page.

   ```html
   <a href="https://www.billingportal.com/s/SUBDOMAIN/login/password" target="_blank">Manage Your Subscription</a>
   ```

   This example links to the request-a-login page with the email address prefilled.

   ```html
   <a href="https://www.billingportal.com/s/SUBDOMAIN/login/magic?email=EMAILHERE" target="_blank">Manage Your Subscription</a>
   ```

2. Change the call to action from **Manage Your Subscription** to whatever suits your site.
3. Deploy your code.

**3. Test the flow**

Go to your website, select the link, and work through the flow. Adjust as needed.

## Implement one-click sign-on

This method suits a web app whose users are already signed in, and who should reach their Billing Portal by selecting a button rather than logging in again.

**1. Review the prerequisites**

Confirm you have each of the following before you start.

- A unique user ID for each user, stored in your own database. Most applications already have this.
- That same unique user ID stored in Advanced Billing as the Customer Reference.
- The Portal Link Expiration Time setting enabled for your Site, which lets you create links that expire quickly, such as after 30 seconds. Contact <a href="https://docs.maxio.com/getting-started/support/contacting-support" target="_blank" rel="noopener noreferrer">Maxio Support</a> to have it enabled.

**2. Create your frontend URL**

The frontend URL points at a page on your own servers, which runs the backend script from the next step. Make sure the user ID it carries is safe to expose in the browser.

1. Create the frontend URL.

   ```html
   <a href="https://www.yourapp.com/path?user_id=DYNAMIC-USER-ID" target="_blank">Manage Your Subscription</a>
   ```

2. Place the URL in your app, typically inside a **My Account** section.
3. *(Optional)* Style the link as a button using your existing button CSS.

**3. Create a backend script**

The script queries the Advanced Billing API for the Customer's unique Billing Portal URL, then redirects the user to it.

1. Read the Customer by their reference and parse the Customer ID from the response. Perform a `GET` using your dynamic user ID, then read the Customer ID, such as `123456789`. See <a href="https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/read-customer-by-reference" target="_blank" rel="noopener noreferrer">Read Customer by Reference</a>.
2. Read the Billing Portal link for that Customer ID. Perform a `GET` and parse the `url` from the response. See <a href="https://developers.maxio.com/http/advanced-billing-api/api-endpoints/billing-portal/read-billing-portal-link" target="_blank" rel="noopener noreferrer">Read Billing Portal Link</a>.

   ```json
   {
     "url": "https://www.billingportal.com/manage/19804639/1517596469/bd16498719a7d3e6"
   }
   ```

3. Redirect the user to the `url` from the API response.

## Frequently asked questions

**Can the Billing Portal be placed in an iframe, given a CNAME, or white-labeled?**

No.
