You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Payments - Payer is assigned to the Workspace Admin instead of the Workspace Owner #99464
Verify that the Add bank account row is displayed.
Complete the bank account connection process using the steps from TC-3390.
Verify that the connected bank account appears in a Payment account row.
Verify the Payer field displayed below the bank account.
Expected Result:
The Payer field is populated with the Workspace Owner by default.
Actual Result:
The Payer field is automatically populated with the Workspace Admin who added the bank account instead of the Workspace Owner. The issue is consistently reproducible on Web and iOS, in both Staging and Production.
Root Cause: This is a backend/internal issue, not an App bug. The App's Workflows page renders the Payer from policy.achAccount.reimburser and falls back to the workspace owner when that field is empty — it never uses the current user. So the Admin showing up as Payer means the backend already stored achAccount.reimburser as the connecting Admin's email during the bank-account connection, instead of the workspace owner. The frontend is faithfully displaying the wrong value it was handed.
Recommended Fix: The fix must be made outside the App repo. The backend command that populates the ACH account's reimburser when a bank account is connected assigns it to the acting user (the Admin who connected it) rather than the policy owner. This requires an internal engineer with access to the relevant backend repository to correct the default so the reimburser is set to the workspace owner on connect. No App-side change is warranted.
Investigation details (App-side evidence)
Every place the App resolves the Payer uses the same expression — policy?.achAccount?.reimburser ?? policy?.owner — with the owner as the only fallback. No frontend path ever writes the current session user into reimburser:
Because the only frontend fallback is the workspace owner, a frontend-side default would have shown the owner — never the Admin. The Admin value can only come from policy.achAccount.reimburser being populated with the Admin by the backend at connect time.
Alternative explanations considered & ruled out: (1) A frontend optimistic write setting reimburser to the current user — ruled out: no action file (Policy.ts, BankAccounts.ts, ReimbursementAccount.ts) writes the session user into reimburser. (2) Reading a different Onyx field (top-level policy.reimburser or reimbursementAccount.achData.reimburser) — ruled out: the Payer row reads policy.achAccount.reimburser only. Confidence is high that the wrong value originates on the backend.
Possibly related:#99272 — "The Payer row disappears after disconnecting the bank account" (same Payer row area; may share backend ownership of achAccount.reimburser).
Next Steps: This needs an internal engineer to correct the backend default for the ACH account reimburser on bank-account connect. Reply with @MelvinBot <your feedback> to refine this analysis.
We found the bug in the App, not the backend. In WorkspaceWorkflowsPayerPage.tsx:214, the onButtonPress() function passes authorizedPayerEmail (the selected Admin) instead of preserving selectedPayer (which correctly defaults to the owner). The frontend initialization is correct, but the save logic is wrong.
Do you have evidence that policy.achAccount.reimburser is already populated by the backend, or does this align with our frontend finding? Thank you.
WorkspaceWorkflowsPayerPage.tsx:107-108 — it's selectedPayer round-tripped through accountID → personalDetails.login, so it resolves to the same person. Swapping it for selectedPayer at :214 wouldn't change the saved value.
2. onButtonPress never runs in this repro. It only fires from the confirm button on the Payer selection RHP. Steps 1-9 never open that page — the Admin appears as Payer immediately after connecting the bank account, without anyone selecting a payer.
On your question: I could not read the backend code in this run, so I don't have a direct backend citation — my conclusion is by elimination on the App side. The decisive App-side fact is that SetWorkspacePayer (the Payer page) is the only command that can carry a payer email to the server. The bank-connect / payments-toggle path uses SetWorkspaceReimbursement, whose params are just {policyID, reimbursementChoice, bankAccountID} — no payer field at all (Policy.ts:1404-1410), and its optimistic write uses achAccount.reimburser ?? owner (WorkflowsPaymentsTab.tsx:280). So the Admin's email can only reach achAccount.reimburser via the server response.
Cheapest way to settle it: reproduce with the network tab open and inspect the onyxData in the response to the bank-connect / SetWorkspaceReimbursement call. If achAccount.reimburser comes back as the connecting Admin's email, it's server-set and the fix is backend-side.
Every App-side write path I checked
All of them fall back to the owner, never the session user:
SetWorkspacePayerParams is also the only file under src/libs/API/parameters/ that contains a reimburser field, which is what rules out any other command silently sending one.
Separate minor bug in the code you flagged: if personalDetails[accountID] is missing, authorizedPayerEmail is '' and onButtonPress silently closes the RHP without saving (:209-216). Using selectedPayer directly would be more robust there — but it's a different symptom from this issue.
Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.
We traced this to the backend — achAccount.reimburser appears to be set to the connecting Admin instead of the workspace owner during bank-account connect. Could you verify if this is where the issue originates?
I verified this originates from the backend, App only displays the payer it receives. The recent behavior is related to the preferred-payer work, not the later Workflows refactor.
We should confirm the intended behavior:
If the bank account owner should become payer, update the BrowserStack expectation.
If the workspace owner should become payer, this requires a backend change and potentially sharing the connected account with them.
Activity
applause-bot commentedon Aug 25, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/9a640702a4f733468ef4dbbb3cb7e5cbd9d1fe7a1391cc6132391efa879799ed
MelvinBot commentedon Aug 25, 2026
Issue Analysis
Root Cause: This is a backend/internal issue, not an App bug. The App's Workflows page renders the Payer from
policy.achAccount.reimburserand falls back to the workspace owner when that field is empty — it never uses the current user. So the Admin showing up as Payer means the backend already storedachAccount.reimburseras the connecting Admin's email during the bank-account connection, instead of the workspace owner. The frontend is faithfully displaying the wrong value it was handed.Recommended Fix: The fix must be made outside the App repo. The backend command that populates the ACH account's
reimburserwhen a bank account is connected assigns it to the acting user (the Admin who connected it) rather than the policy owner. This requires an internal engineer with access to the relevant backend repository to correct the default so the reimburser is set to the workspace owner on connect. No App-side change is warranted.Investigation details (App-side evidence)
Every place the App resolves the Payer uses the same expression —
policy?.achAccount?.reimburser ?? policy?.owner— with the owner as the only fallback. No frontend path ever writes the current session user intoreimburser:WorkflowsPaymentsTab.tsx:96, rendered atWorkflowsPaymentsTab.tsx:380-384.WorkflowsPaymentsTab.tsx:277.WorkspaceWorkflowsPayerPage.tsx:196-197.Because the only frontend fallback is the workspace owner, a frontend-side default would have shown the owner — never the Admin. The Admin value can only come from
policy.achAccount.reimburserbeing populated with the Admin by the backend at connect time.Alternative explanations considered & ruled out: (1) A frontend optimistic write setting
reimburserto the current user — ruled out: no action file (Policy.ts,BankAccounts.ts,ReimbursementAccount.ts) writes the session user intoreimburser. (2) Reading a different Onyx field (top-levelpolicy.reimburserorreimbursementAccount.achData.reimburser) — ruled out: the Payer row readspolicy.achAccount.reimburseronly. Confidence is high that the wrong value originates on the backend.Possibly related: #99272 — "The Payer row disappears after disconnecting the bank account" (same Payer row area; may share backend ownership of
achAccount.reimburser).Next Steps: This needs an internal engineer to correct the backend default for the ACH account reimburser on bank-account connect. Reply with
@MelvinBot <your feedback>to refine this analysis.view run
melvin-bot commentedon Aug 25, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (
External)melvin-bot commentedon Aug 25, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
melvin-bot commentedon Aug 28, 2026
@brunovjk Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
brunovjk commentedon Aug 29, 2026
Not overdue, reviewing ASAP
brunovjk commentedon Sep 1, 2026
@MelvinBot
We found the bug in the App, not the backend. In
WorkspaceWorkflowsPayerPage.tsx:214, theonButtonPress()function passesauthorizedPayerEmail(the selected Admin) instead of preservingselectedPayer(which correctly defaults to the owner). The frontend initialization is correct, but the save logic is wrong.Do you have evidence that
policy.achAccount.reimburseris already populated by the backend, or does this align with our frontend finding? Thank you.MelvinBot commentedon Sep 1, 2026
Thanks for digging in — but I don't think line 214 explains this one, for two reasons.
1.
authorizedPayerEmailisselectedPayer. It's derived from it two lines earlier:WorkspaceWorkflowsPayerPage.tsx:107-108— it'sselectedPayerround-tripped throughaccountID→personalDetails.login, so it resolves to the same person. Swapping it forselectedPayerat:214wouldn't change the saved value.2.
onButtonPressnever runs in this repro. It only fires from the confirm button on the Payer selection RHP. Steps 1-9 never open that page — the Admin appears as Payer immediately after connecting the bank account, without anyone selecting a payer.On your question: I could not read the backend code in this run, so I don't have a direct backend citation — my conclusion is by elimination on the App side. The decisive App-side fact is that
SetWorkspacePayer(the Payer page) is the only command that can carry a payer email to the server. The bank-connect / payments-toggle path usesSetWorkspaceReimbursement, whose params are just{policyID, reimbursementChoice, bankAccountID}— no payer field at all (Policy.ts:1404-1410), and its optimistic write usesachAccount.reimburser ?? owner(WorkflowsPaymentsTab.tsx:280). So the Admin's email can only reachachAccount.reimburservia the server response.Cheapest way to settle it: reproduce with the network tab open and inspect the
onyxDatain the response to the bank-connect /SetWorkspaceReimbursementcall. IfachAccount.reimbursercomes back as the connecting Admin's email, it's server-set and the fix is backend-side.Every App-side write path I checked
All of them fall back to the owner, never the session user:
WorkspaceWorkflowsPayerPage.tsx:96—useState(policy?.achAccount?.reimburser ?? policy?.owner)WorkflowsPaymentsTab.tsx:95— the displayed Payer nameConnectExistingBusinessBankAccountPage.tsx:79andWorkspaceUpgradePage.tsx:312— the other twosetWorkspaceReimbursementcallersresetUSDBankAccount.ts:35andresetNonUSDBankAccount.ts:21SetWorkspacePayerParamsis also the only file undersrc/libs/API/parameters/that contains areimburserfield, which is what rules out any other command silently sending one.Separate minor bug in the code you flagged: if
personalDetails[accountID]is missing,authorizedPayerEmailis''andonButtonPresssilently closes the RHP without saving (:209-216). UsingselectedPayerdirectly would be more robust there — but it's a different symptom from this issue.Next Steps: Reply with
@MelvinBot <your feedback>to refine this analysis.view run · view recording
brunovjk commentedon Sep 1, 2026
We traced this to the backend —
achAccount.reimburserappears to be set to the connecting Admin instead of the workspace owner during bank-account connect. Could you verify if this is where the issue originates?Thanks!
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon Sep 1, 2026
Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
AndrewGable commentedon Sep 1, 2026
I verified this originates from the backend,
Apponly displays the payer it receives. The recent behavior is related to the preferred-payer work, not the later Workflows refactor.We should confirm the intended behavior:
AndrewGable commentedon Sep 1, 2026
@NikkiWines @joekaufmanexpensify do you mind weighing in here? ☝️
joekaufmanexpensify commentedon Sep 2, 2026
Yeah, this is not a bug. If there's no payer set, the admin who connects the bank account to the workspace should become the payer.
AndrewGable commentedon Sep 2, 2026
I will handle making sure the test case gets updated
AndrewGable commentedon Sep 2, 2026
https://github.com/Expensify/Expensify/issues/678023
joekaufmanexpensify commentedon Sep 2, 2026
Thanks!