Skip to main content
The Customer Portal is a hosted, self-service interface that gives your customers access to their own billing data and payment actions. Customers view subscriptions, invoices, wallet balances and usage, pay outstanding invoices, top up credits, save a card and turn on automatic top-ups, without going through your support or sales team. The portal authenticates with a short-lived session token that you generate from your backend. You control which sections a customer sees, and the portal renders in your brand colour. Benefits:
  • Fewer billing tickets - Customers answer their own questions about balances, invoices and usage
  • Faster collection - An unpaid invoice carries a Pay now button instead of a support thread
  • Uninterrupted service - Automatic top-ups refill a wallet before the balance runs out
  • No card data on your side - Cards are collected and stored by the payment provider’s hosted page, never by Flexprice or by you
  • Tenant-controlled surface - Each section is switched on or off per environment
Customer Portal Overview showing the amount due, the credit balance, saved payment methods and subscriptions

What customers can do

The portal is organised into sections shown as tabs across the top. Which sections appear is configurable; the defaults are below. Actions available to a customer:
  • View and download invoices with their status and line-item breakdown
  • Pay an outstanding invoice through a hosted checkout page
  • Top up a wallet by card, or by raising an invoice to settle later
  • Configure auto top-up with a threshold, an amount and an optional cooloff
  • Add, remove and set a default card through the provider’s hosted card form
  • Track usage and cost per feature over a chosen date range
Payment actions depend on a payment provider being connected for the environment. See Portal payments for the provider capability matrix and the full flow of each action.
Session tokens expire after 1 hourThe portal reads a session token from the URL. Generate a fresh session each time a customer needs access rather than storing the token.

Generating a portal session

To give a customer access, generate a session token from your backend using your API key. The token names one customer and carries the tenant and environment, so it grants access to that customer’s data only. Endpoint: GET /v1/customers/portal/{external_id} Authentication: your Flexprice API key in the x-api-key header Path parameters:

Example request

Response

Redirecting a customer

Send the customer to the url field. The portal reads the token from the query string and authenticates on load.
Do not put the portal URL in a shared or logged locationThe URL carries the session token. Anyone holding it can act as that customer until it expires. Generate the link at the moment the customer clicks through to it, and do not email a raw portal URL to a shared inbox.

Handling expiry

Read expires_at and generate a new session when the token has passed it:

Embedding the portal

The portal renders inside an iframe:
Hosted checkout pages open in a new browser tab, not inside the iframe. Payment providers block being framed. The portal handles the hand-off and the return automatically, described in Portal payments.

Opening the portal from the dashboard

You can open a customer’s portal from the Flexprice dashboard without writing any code.

From the Customers page

  1. Go to Customers
  2. Find the customer in the table
  3. Click the ⋯ menu at the end of the row
  4. Select Open customer portal
A session is generated and the portal opens in a new tab.
Customers Page with Portal Option

From the customer details page

  1. Go to Customers and click a customer
  2. Click the ⋯ menu at the top right of the customer’s page
  3. Select Copy portal link
Customer page menu with Copy portal link
The copied link contains a session token that expires after 1 hour. Share it through a channel the customer controls, and generate a new one if they come back later.

Section reference

Overview

The default landing section. It answers three questions in one screen: what the balance is, how it gets paid, and what the customer is signed up to.
  • Next billing date and plan, with a link to the usage so far
  • Amount due with Pay now, and a banner with a Pay button when the last payment failed
  • Available balance in money and credits, or Credits owed when the balance is below zero, with Add credits
  • Payment methods listing saved cards, with Add card, and Make default and Remove card in each card’s menu
  • Subscriptions showing plan, status, current period and next billing date
A banner appears across portal pages when the backend reports a configured low-balance alert for an active wallet; healthy, inactive, or alert-disabled wallets do not trigger one. When more than one active wallet has an alert, the banner shows the most severe one. On Overview, the selected active wallet’s badge shows Running low, Almost out, or Out of credits when it has an alert; see Low Balance Alert for threshold settings.
Saved payment methods on Overview, with the default card marked and a card's menu open on Make default and Remove card

Usage

Feature-level consumption and cost over a date range. When features are assigned to groups, the usage breakdown is grouped accordingly.
  • Date range presets (Today, 7d, 30d, This month, Last month) and a custom range
  • Spend, Largest cost and Daily average cards, with spend compared to the previous period and a projection to the next billing date
  • Usage trend chart of cost or quantity per day, for all features or one
  • Usage quota showing how much of each allowance is used this billing period, and when it resets
  • Usage breakdown table of feature, usage, unit cost, cost and share of spend, grouped by group (called tags in the dashboard). A commitment true-up amount appears beside an item’s cost when the response includes it.
Customer Portal Usage tab with spend cards, the usage trend, usage quota and the usage breakdown grouped by tag

Credits

The prepaid wallet in full.
  • Available balance in money and credits, or Credits owed when the balance is below zero
  • Wallet balance in money and credits, the ledger total of top-ups and transactions
  • Accrued usage in money and credits, usage already counted against the available balance but not yet deducted
  • Auto top-up status and settings
  • Top-ups, listing each top-up with its credits, what remains, how much is consumed and when it expires, and All transactions for the full history
Customer Portal Credits

Invoices

Every invoice raised against the customer.
  • Invoice table with invoice number, issue date, billing period, status and amount, and a row menu with View invoice, Pay now and Download
  • Detail drawer showing amount due, billing period, issue and due dates, line items, subtotal, discount, prepaid credits applied when present, tax and total
  • Download as PDF, available once an invoice is finalized
  • Pay now, shown when the invoice is awaiting payment and a provider is connected
  • Open link appears in the detail drawer when a hosted invoice URL is available. It opens the hosted invoice page.
  • A Releases X credits badge appears when pending wallet credits are linked to the invoice. Those credits become available once the invoice is paid.
Invoice rows show each invoice in its own currency, so a customer billed in more than one currency reads the correct symbol on every row.
Customer Portal Invoices with a row menu open on View invoice, Pay now and Download
Invoice detail drawer showing amount due, billing period, line items, totals, and the Pay and Download actions

Security model

Portal payments

Invoice payment, top-ups, auto top-up and saved cards

Portal configuration

Control which sections appear and how the portal looks

Portal API reference

Every endpoint under /v1/customer/portal

Wallet top-ups

How wallet top-ups work outside the portal

Auto top-up

Threshold-based automatic top-ups

Checkout sessions

The checkout session model the portal builds on