---
title: Build your own Billing Portal with the Advanced Billing API
url: https://docs.maxio.com/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api
applies_to: Advanced Billing
updated: 2026-08-27
---

# Build your own Billing Portal with the Advanced Billing API

Building your own subscription management experience against the Advanced Billing API gives you full control over what your customers see and do. Use the API resource tables below to find the endpoint for each action, then follow the walkthrough to assemble them into a working dashboard.

## Before you start

| Requirement | Detail |
| :--- | :--- |
| Feature | <a href="https://developers.maxio.com/http/getting-started/how-to-get-started" target="_blank" rel="noopener noreferrer">Advanced Billing API</a> |
| You need | Developers, an existing frontend UI for subscription management, and a backend that recognizes a signed-in user |
| Code | Yes |
| Difficulty | Medium |

## Core subscription management API resources

These are the API resources behind each subscription management action, grouped by the kind of change they make.

### Basic subscription and Customer actions

| **Resource** | **Description** |
| :--- | :--- |
| Read Customer’s Subscriptions | [GET /customers/:id/subscriptions.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/list-customer-subscriptions) |
| Read Customer Payment Profiles | [GET /payment\_profiles.json?customer\_id=:id](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/list-payment-profiles) |
| Update Customer | [PUT /customers/:id.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/update-customer) |
| Read Subscription | [GET /subscriptions/:id.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/read-subscription) |
| Read Subscription Invoices | [GET /invoices.json?subscription\_id=:id](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-invoices) |
| List Subscription’s Components (All) | [GET /components.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/list-subscription-components) |
| List Subscription’s Components (Only ones subscribed to) | [GET /components.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/list-subscription-components) > if allocated\_quantity > 0, show. if kind is metered\_component and price\_point\_id is not null, show. |
| Next billing amount and next renewal date | [GET /subscriptions/:id.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/read-subscription) > parse current\_billing\_amount\_in\_cents and next\_assessment\_at |

### Upgrade and downgrade actions

| **Resource** | **Description** |
| :--- | :--- |
| Read Products from Catalog | [GET product\_families/:product\_family\_id/products.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/list-products) |
| Preview Prorated Product U/D | [POST /migrations/preview.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-products/preview-subscription-product-migration) |
| Execute Prorated Product U/D | [POST /migrations.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-products/migrate-subscription-product) |
| Schedule Upgrade/Downgrade for Next Renewal | [PUT /subscriptions/:id.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/update-subscription) |
| Read Subscription’s Components | [GET /components.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/list-subscription-components) |
| Preview Component U/D | [POST /allocations/preview.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/preview-allocations) |
| Execute Component U/D | [POST /allocations.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/allocate-components) |
| Read Offers from Catalog | [GET /offers.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/offers/list-offers) |
| Preview Offer U/D | [POST /migrations/preview.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-products/preview-subscription-product-migration) |
| Execute Offer U/D | [POST /migrations.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-products/migrate-subscription-product) |
| Enforce upgrades only | In your UI, only allow changes if the total cost of the change is greater than the current cost. Additionally, if you do not want to display lower cost options at all, filter out what you display to the user, based on price. |

### Cancel and pause actions

| **Resource** | **Description** |
| :--- | :--- |
| View Invoices | [GET /invoices.json?subscription\_id=:id](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-invoices) |
| Cancel Subscription (immediate) | [DELETE /subscriptions/:id.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/cancel-subscription) |
| Reactivate Subscription | [PUT /reactivate.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/reactivate-subscription) |
| Create Pending Cancellation (delayed) | [POST /delayed\_cancel.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/initiate-delayed-cancellation) |
| Remove Pending Cancellation | [DELETE /delayed\_cancel.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/cancel-delayed-cancellation) |
| Pause Subscription | [POST /hold.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/pause-subscription) |
| Resume Paused Subscription | [PUT /resume.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/resume-subscription) |

### Payment method actions

| **Resource** | **Description** |
| :--- | :--- |
| Collect Payment Information | Docs: [Maxio.js](https://developers.maxio.com/http/development-tools/maxio-js-formerly-chargify-js) Guide: [Collect Payment Methods in your App with Maxio.js](https://docs.maxio.com/getting-started/quick-start-guides/subscription-management/collect-payment-methods-in-your-app-with-maxiojs) |
| Read Customer’s Payment Profiles | [GET /payment\_profiles.json?customer\_id=:id](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/list-payment-profiles) |
| Create Payment Profile for Customer | [POST /payment\_profiles.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/create-payment-profile) |
| Set Default Payment Method on Subscription | [POST /change\_payment\_profile.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/change-subscription-default-payment-profile) |

### Group and hierarchy actions

| **Resource** | **Description** |
| :--- | :--- |
| Cancel a Group (immediate) | [POST /subscription\_groups/:uid/cancel.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-status/cancel-subscriptions-in-group) |
| Cancel a Group (delayed) | [POST /subscription\_groups/:uid/delayed\_cancel.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-status/initiate-delayed-cancellation-for-group) |
| Read Consolidated Invoices for Group | [GET /invoices.json?subscription\_group\_uid=:uid](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-invoices) |
| Read Child Invoices | [GET /invoices.json?subscription\_id=:child\_subscription\_id](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-invoices) |
| Remove Canceled Subscription from Group | [DELETE /subscriptions/:id/group.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/remove-subscription-from-group) |

## Create a subscription management dashboard

The dashboard lets your customers view their Subscription and Invoices, add or update payment methods, and act on the Subscription. The examples below are visual only, and no sample code accompanies them.

### Display a subscription dashboard

Read the Subscription so you can display it in your UI.

1. **Read the subscription**  
   You’ll need the subscription id, and then perform [GET /subscriptions/:id.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/read-subscription).
2. **Parse the data you want to display**  
   For example, the subscription id sits at `response.subscription.id`, and the customer organization at `response.subscription.customer.organization`.
3. **Pass the data to your frontend, and display it**  
   A finished screen might look like this.

   ![a self-built portal's plan panel showing the current plan, its included add-ons, payment details and invoice history](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181259555853_image4.png)

### Display an invoices page

Let’s read the subscription’s invoices, so you can display them.

1. **Read the subscription’s invoices**  
   You’ll need the subscription id, and then perform [GET /invoices.json?subscription\_id=:id](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-invoices)
2. **Parse the data you want to display**  
   For example, the invoice uid sits at `response.invoice.uid`, the invoice number at `response.invoice.number`, and the invoice URL at `response.invoice.public_url`.
3. **Pass the data to your frontend, and display it**  
   Here is a sample image that shows what an end result might look like in a basic table/list layout:  

   ![a portal invoice list, each row with its number, amount, issue and due dates and a view link](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181287989133_image12.png)

### Let customers add and update payment information

On your subscription dashboard, you may provide a link to let users add/update their payment information. That link takes them to an edit-payment-information page. Use the guide called [Collect Payment Methods in your App with Maxio.js](https://docs.maxio.com/getting-started/quick-start-guides/subscription-management/collect-payment-methods-in-your-app-with-maxiojs).

### Add component changes

Component changes let customers update their add-ons directly in your web application.

1. **Display the components to change**  
   Read the subscription’s components by performing [GET /components.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/list-subscription-components).
2. **Parse the data you want to display**  
   For example, the component name sits at `response[0].component.name`.
3. **Pass the data to your frontend, and display it**  
   A finished component-change screen might look like this.  

   ![an add-on configuration screen with a live preview of the charges and today's total before confirming](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181265829773_image7.png)
4. **Add a preview changes section**  
   Make a POST to [/allocations/preview.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/preview-allocations), parse the result, and display it. This shows the customer what the change costs.
5. **Submit the form with a “Change Add Ons” button**  
   Make the API call with [POST /allocations.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/allocate-components)
6. **Test your subscription dashboard**  
   Your subscription dashboard should now reflect the changes of the subscription.

### Allow cancellations

Cancellations let customers end a Subscription from your web application.

1. **Add a cancel action**  
   It might look like this:  

   ![a portal Manage panel offering to change the plan, configure add-ons, change the offer, pause or cancel](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181243908749_image6.png)
2. **Add a page in your UI, with a preview, confirmation, and submit button**  
   It might look like this. This is a good place to state the terms of cancellation and tell the customer what happens next.  

   ![a Cancel Subscription screen previewing the effect above a confirm button](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181264915853_image1.png)
3. **Upon submit, cancel the subscription**  
   Choose which method you prefer:

   | Method | Description | Endpoint |
   | :--- | :--- | :--- |
   | Cancel Subscription (Immediate) | The user can cancel their subscription, and the cancellation takes effect immediately. | [DELETE /subscriptions/:id.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/cancel-subscription) |
   | Cancel Subscription (Delayed) | The user can schedule their subscription to cancel at the end of the current billing period. | [POST /delayed\_cancel.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/initiate-delayed-cancellation) |

4. **Test your subscription dashboard**  
   On your subscription dashboard, if you show the subscription state, it should now reflect the changes of the subscription. If there are certain actions that need to be shown/removed for a canceled subscription, or a subscription that is scheduled to cancel, do those in your UI.

### Allow reactivations of a canceled subscription

Reactivations let customers restart a canceled Subscription from your web application.

1. **Add a reactivation action, and only show it when a subscription is canceled**  
   It might look like this:  

   ![a Manage panel for a canceled subscription, offering only Reactivate](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181260599437_image13.png)
2. **Add a page in your UI, with a preview, confirmation, and submit button**  
   It might look like this. This is a good place to state the terms of reactivation, including how much the customer is charged, if anything.  

   ![a Reactivate Subscription screen showing the total reactivation cost before confirming](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181265706637_image8.png)
3. **Upon submit, reactivate the subscription**  
   Do this by performing a [/subscriptions/:id/reactivate.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/reactivate-subscription)
4. **Test your subscription dashboard**  
   On your subscription dashboard, if you show the subscription state, it should now reflect the changes of the subscription. If there are certain actions that need to be shown/removed for an active subscription, do those in your UI.

**Optional - Allow Pausing**

Let’s add pausing a subscription to your web application.

1. **Add a pause action**  
   It might look like this:  

   ![a portal Manage panel offering to change the plan, configure add-ons, change the offer, pause or cancel](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181243908749_image6.png)
2. **Add a page in your UI, with a preview, confirmation, and submit button**  
   It might look like this. This is a good place to state the terms of pausing and tell the customer what happens next.  

   ![a Pause Subscription screen explaining that billing stops while paused, above a confirm button](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181287783309_image9.png)
3. **Upon submit, cancel the subscription**  
   Do this with [POST /subscriptions/:id/hold.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/pause-subscription)
4. **Test your subscription dashboard**  
   On your subscription dashboard, if you show the subscription state, it should now reflect the changes of the subscription. If there are certain actions that need to be shown/removed for a paused subscription, do those in your UI.

Optional - Allow Resuming a Paused Subscription

Let’s add resuming to your web application.

1. **Add a resume action, and only show it when a subscription is paused**  
   It might look like this:  

   ![a Manage panel for a paused subscription, offering only Resume](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181276650253_image10.png)
2. **Add a page in your UI, with a preview, confirmation, and submit button**  
   It might look like this. This is a good place to state the terms of resuming and tell the customer what happens next.  

   ![a Resume Subscription screen confirming that resuming carries no charge](https://docs.maxio.com/content-images/getting-started/quick-start-guides/subscription-management/build-your-own-billing-portal-with-the-advanced-billing-api/24181266541069_image11.png)
3. **Upon submit, resume the subscription**  
   Do this by performing [/subscriptions/:id/resume.json](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/resume-subscription)
4. **Test your subscription dashboard**  
   On your subscription dashboard, if you show the subscription state, it should now reflect the changes of the subscription. If there are certain actions that need to be shown/removed for an active Subscription, do those in your UI.
