6.6 KiB
6.6 KiB
Billing and Invoices
Overview
This journey covers how customers view and manage their billing information in the portal. All billing data (invoices, payment methods, billing summary) comes from WHMCS -- the portal reads it but does not store it locally. Customers can browse invoices, filter and search them, view full invoice details, download PDF copies, and pay unpaid invoices through a secure WHMCS link.
Portal Flow
Viewing the Invoice List
- Navigate to Account > Billing > Invoices (URL:
/account/billing/invoices). - The page loads with the title "Invoices" and a subtitle "Manage and view your billing invoices."
- At the top, a summary statistics bar shows counts for:
- Total invoices
- Paid invoices (green)
- Unpaid invoices (amber) -- only shown when count is greater than zero
- Overdue invoices (amber) -- only shown when count is greater than zero
- Below the stats bar, a search and filter bar lets you:
- Search by invoice number or description (free-text search box)
- Filter by status: All Statuses, Paid, Unpaid, Cancelled, Overdue, or Collections
- A Clear Filters button appears when any filter is active
- The invoice table shows each invoice in a row with: invoice number, description, status badge, total amount, due date, and issued date.
- Pagination controls appear at the bottom of the table when there are more invoices than fit on one page (default 10 per page).
Invoice Status Badges
Invoices display color-coded status badges:
| Status | Color | Meaning |
|---|---|---|
| Paid | Green | Invoice has been fully paid |
| Unpaid | Amber | Payment is due but not yet overdue |
| Overdue | Red | Payment is past the due date |
| Draft | Grey | Invoice is in draft, not yet issued |
| Pending | Amber | Invoice is pending |
| Cancelled | Grey | Invoice was cancelled |
| Refunded | Blue | Invoice was refunded |
| Collections | Red | Invoice has been sent to collections |
Viewing Invoice Details
- Click any invoice row in the list to open the invoice detail page.
- The detail page shows:
- Summary bar at the top with: total amount (large, bold), currency code, status badge, due date, days overdue (shown only for overdue invoices), invoice number, and issued date.
- Download PDF button -- generates a secure WHMCS link and downloads the invoice as a PDF.
- Pay Now button -- appears only for Unpaid or Overdue invoices. Opens the WHMCS payment page in a new browser tab.
- If the invoice is Paid, a green "Payment received" banner appears showing the paid date.
- Below the summary bar, the line items section lists each item on the invoice: description, item type, and amount.
- At the bottom, the totals section shows subtotal, tax, and total.
Downloading an Invoice PDF
- From the invoice detail page, click Download PDF.
- The portal generates a secure single-sign-on (SSO) link to the WHMCS invoice page.
- The browser starts downloading the PDF. The customer does not need to log in to WHMCS separately.
Paying an Invoice
- From the invoice detail page for an Unpaid or Overdue invoice, click Pay Now.
- The portal generates a secure SSO link to the WHMCS payment page.
- A new browser tab opens with the WHMCS payment page, where the customer can complete payment using their saved payment methods.
- For overdue invoices, a warning message reads: "This invoice is overdue. Please pay as soon as possible to avoid service interruption."
Managing Payment Methods
- Payment methods are stored in WHMCS (typically via Stripe).
- From the invoice detail page, a Manage Payment Methods button opens the WHMCS payment methods page via SSO link.
- Customers can add, update, or remove payment methods directly in WHMCS.
Billing Summary on Dashboard
- The customer dashboard shows a Billing Summary card with:
- Outstanding amount and count of unpaid invoices
- Overdue amount and count of overdue invoices
- Paid This Period amount and count of paid invoices
- A View All link to the full invoices page.
What Happens in WHMCS
- Invoices: All invoices are stored in WHMCS under the Client's account. Navigate to Clients > [Client Name] > Invoices in WHMCS admin.
- Invoice statuses: WHMCS manages the status lifecycle (Draft, Unpaid, Paid, Overdue, Cancelled, Refunded, Collections). The portal reads these statuses directly.
- Transactions: When a customer pays an invoice, a Transaction record is created in WHMCS. You can find these under Billing > Transactions or under the specific Invoice in WHMCS admin.
- Payment Methods: Stored under Clients > [Client Name] > Pay Methods in WHMCS admin. These are typically Stripe-linked card details.
- SSO Links: The portal generates temporary WHMCS SSO links so the customer can view/download/pay invoices without needing separate WHMCS login credentials. These links expire after a short time.
What Happens in Salesforce
- Salesforce is not the system of record for billing data. Invoices and payments live entirely in WHMCS.
- Salesforce receives address snapshots only when orders are created, so order records show the billing address used at checkout time.
Key Things to Verify
- Invoice list loads correctly: Invoices appear sorted by date. Summary stats (total, paid, unpaid, overdue counts) match what you see in WHMCS admin.
- Filtering works: Selecting a status filter (e.g., "Unpaid") shows only invoices with that status. Search by invoice number returns the correct invoice.
- Invoice detail matches WHMCS: The total amount, line items, tax, due date, and status on the detail page all match the invoice in WHMCS admin.
- PDF download works: Clicking "Download PDF" downloads a valid PDF of the invoice.
- Pay Now opens WHMCS: Clicking "Pay Now" opens a new tab with the WHMCS payment page. The customer is already logged in (SSO). After payment, returning to the portal and refreshing shows the invoice as Paid.
- Status badges are accurate: A Paid invoice shows green, Unpaid shows amber, Overdue shows red.
- Pagination: If the customer has more than 10 invoices, pagination controls appear and navigate correctly.
- Error handling: If WHMCS is unavailable, the portal shows a friendly error message rather than broken or partial data.
- Dashboard billing summary: The billing summary card on the dashboard matches the overall totals from the invoices page.