Repository navigation
[CFI] Add a "View payment history" page with historical billing receipts and monthly user activity #101649
Description
Coming from here.
Problem
In Expensify Classic, a billing owner can see every historical billing receipt and the users who were active in each month under Account > Subscription > Payment history.
In New Expensify there is no consolidated view. Account > Subscription > View payment history just routes you to the Expenses (Spend) page filtered by merchant Expensify, Inc., so admins have to open each receipt one by one to piece together what they were billed and who was active. That makes it slow and confusing to review past billing or to decide what subscription size to commit to.
Solution
Build a real View payment history page in the RHP, plus a Payment details page and an Activity list, bringing Classic's payment history into New Expensify.
1. Entry point
Account > Subscription > View payment history opens a new "View payment history" page in the RHP instead of navigating to Search.
2. Payment history page
A table of all past payments. Each row shows the billing period, the amount, the billing state badge, and an indicator when sales tax was included (for example incl. tax as supporting text under the amount).
Badges on the table:
| Badge | Colour |
|---|---|
Paid |
Green |
Cleared |
Grey |
Failed |
Red |
Balance transfer |
Grey |
Disputed |
Red |
Refunded |
Grey |
Notes agreed during design review:
- The total number of active users belongs under the
Activityheader — not next to the amount. The amount billed and the active-user count are not the same number (for example, a 40-seat annual commitment billed in full with only 25 users active), so pairing them causes confusion. - Activity must be available for every row, including
Failedmonths. In Classic,Failedrows show only "View activity" andClearedrows show only "View receipt"; here,Clearedrows should show both.
3. Payment details page
Tapping a row opens a Payment details page with the full breakdown for that bill.
Some states carry extra detail that only renders on this page:
Balance transfer to <userEmail>Balance transfer from <userEmail>Disputed on <date> (Pending)Disputed on <date> (Refunded)Disputed on <date> (Closed)Refunded on <date>Refunded <amount> on <date>— partial refund
4. View receipt (in-product billing)
For accounts on in-product billing, View receipt opens the billing receipt in the attachment modal in place — it does not navigate to the Spend page — and is downloadable from there.
Only certain purchase/billing-history types have a receipt. When there is no receipt for that row, hide the button entirely and shift the remaining content up.
5. View invoice (invoice billing)
For accounts on invoice billing, View invoice opens the invoice summary PDF in the same attachment modal, also downloadable. This PDF is generated separately from the expense on the Spend page, so there is nowhere else to navigate to for a copy of it — it must open in place.
6. Collect plan copy
On the new Collect plan there is no concept of "active users", so the copy on these pages must say members instead of active users.
Out of scope
- Export / Download CSV of the billing table. Deliberately punted to reduce scope. If the table content is selectable and copyable, most of the need is covered.
- Attaching the invoice summary to the invoice expense on the Spend page. Tracked separately.
- Charting billing spend over time — already possible on the Spend page by filtering merchant to
Expensify.
Context for C+
What exists today
- The menu item is rendered in
src/pages/settings/Subscription/CardSection/CardSection.tsx:286-296, gated onaccount?.hasPurchases. - It calls
viewPurchases(), which builds a Search query (type:expense,merchant:"Expensify, Inc.",from:me, all statuses includingDeleted) and navigates to the Expenses page. That whole navigation is what this issue replaces. - Related past work on the current behaviour: [Due for payment 2026-05-26] [CFI] [$250] "View payment history" shows billing receipts for all users instead of just the billing owner and [Due for payment 2026-06-11] [$250] View payment history from:me is being passed to the backend literally.
What's new
- Three new RHP screens (payment history table, payment details, activity list) plus routes, and the attachment-modal flow for receipts and invoice summaries.
- New Onyx data and an API command to fetch billing history are required — none of this data is in NewDot today. The backend piece is being scoped alongside this work; the frontend should be built against the agreed shape rather than the existing Search results.
- Copy needs two variants throughout (active users vs members) driven by the subscription plan.
Things that are easy to get wrong
- Rendering the badge as a plain status when it actually carries dynamic text (dates, amounts, emails) on the details page.
- Assuming every row has a receipt. It doesn't — hide the button and reflow.
- Showing the active-user count next to the billed amount. It was explicitly rejected in design review.
- Using navigation for receipts instead of opening the attachment modal in place.
Sub-tasks
To be added by the issue owner.
Issue Owner
Current Issue Owner: @nkdengineerMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsHIGH
Activity
17 remaining items
dukenv0307 commentedon Oct 3, 2026
not overdue
melvin-bot commentedon Oct 6, 2026
@nkdengineer 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
dukenv0307 commentedon Oct 8, 2026
Not overdue
melvin-bot commentedon Oct 8, 2026
@nkdengineer Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
melvin-bot commentedon Oct 12, 2026
@nkdengineer 12 days overdue. Walking. Toward. The. Light...
nkdengineer commentedon Oct 13, 2026
Not overdue.
dukenv0307 commentedon Oct 14, 2026
@MelvinBot Which issue we should add Billed to section?
MelvinBot commentedon Oct 14, 2026
Add the Billed to section in [CFI][FE 4/7] Payment history: Payment details page. That page is where the full breakdown for one bill lives.
None of the 7 sub-issues mention Billed to yet. Add it to the FE 4/7 scope and acceptance criteria.
Keep it out of these two sub-issues:
incl. tax.I can't open the Figma file, so check that the section sits on the Payment details frame there.
view run
melvin-bot commentedon Oct 16, 2026
@nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Oct 20, 2026
@nkdengineer Still overdue 6 days?! Let's take care of this!
nkdengineer commentedon Oct 21, 2026
Not overdue.