Skip to content

Add Pay via ABA option - #104460

Merged
arosiclair merged 65 commits into
Expensify:mainfrom
jjcoffee:add-pay-via-aba-option
Nov 17, 2026
Merged

arosiclair merged 65 commits into
Expensify:mainfrom
jjcoffee:add-pay-via-aba-option

Conversation

@jjcoffee

@jjcoffee jjcoffee commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

This PR adds a "Pay via ABA" option for admins on AUD workspaces. Choosing the option calls a new BE command which generates an ABA file and marks the reports as paid. If a report has held expenses, we show the usual popup to ask if all expenses should be paid or only unheld and pass that option to BE.

Pay via ABA shows for workspace admins when the workspace’s currency is AUD and has an open AU withdrawal account. It is disabled offline (since we need to be online to download the file), so there is no optimistic data. It shows in all the usual places you can pay:

  • Pay button in a report header, report preview in chat, on a report in Search
  • Under the More button (this shows up when all expenses on a report are on hold or if a report's export failed)
  • When you select some expenses on a report, the Pay option in the floating bar
  • Search bulk pay, only when the reports are all from one workspace (since an ABA file can only be generated for one withdrawal account at a time), and not when “select all” is used (this will be added in a later release)

To work out whether a workspace has an AU withdrawal account (and thus if we should show the ABA option), the app loads it with a new OpenPaymentMethods command when the payment options open (for an AUD workspace only).

We also add support for a new flag isForABA, which indicates accounts that are only for paying via ABA. These are hidden from the business bank account options, because Expensify can’t pay from them directly. This depends on an upcoming backend change, but since nothing has that flag we can safely push it now.

Fixed Issues

$ #104144
PROPOSAL: N/A

Tests

  • Verify that no errors appear in the JS console

Offline tests

Follow the setup in QA steps and have at least one expense from the employee with an AUD bank account.

  1. As the admin, open an approved report on the AUD workspace
  2. Disconnect from the internet
  3. Open the Pay button dropdown
  4. Verify Pay via ABA is disabled
  5. Reconnect to the internet and verify Pay via ABA is enabled again

QA Steps

Setup

  1. Log in to OD with an account that doesn’t have the globalReimbursements beta (follow up to step 4 to check this).
  2. Create a Collect or Control workspace, and set its default currency to AUD.
  3. Go to Settings > Workspaces > [workspace] > Workflows, scroll to the Payments card and choose Direct.
  4. Click Add Business Bank Account. If the form does not shows “BSB Number”, “Bank User Identification Number” and “Company Name” fields, this means you probably have the globalReimbursements beta and cannot use this account. You can try following the alternative steps below instead.
  5. Enter BSB 762-133, account number 01234567, Bank User Identification Number 1122, and company name ABA Company (or anything). Accept the terms and submit.
  6. Check that the account shows in the Payments section “Default Business Bank Account” dropdown.
  7. Invite an employee to the workspace.
  8. As the employee, in NewDot, go to Account > Wallet and add an Australian bank account with BSB 762133 and account number 01234560. Set the bank name to Commonwealth Bank and address to 1 George Street, Sydney. You can enter any (sane) details for the account holder. When/if you get the message that the details may be wrong just resubmit the form.

Alternative steps for adding an account via Dev Tools:

  1. Follow steps 1-3 above.
  2. Open Dev Tools and in the console, switch the context dropdown from "top" to iframe_withdrawalAccount.
image
  1. Copy the following into the console, replacing POLICY_ID with the AUD workspace's ID and press enter.
API.BankAccount_Create({
    allowDebit: true,
    routingNumber: '762-133',
    accountNumber: '01234567',
    isSavings: false,
    additionalData: JSON.stringify({
        country: 'AU',
        currency: 'AUD',
        fieldsType: 'local',
        companyName: 'ABA Company',
        branchID: '1122',
        acceptTerms: true,
        policyID: 'POLICY_ID',
    }),
}).done((response) => console.log(response));
  1. Continue with step 6 above.

Single report

  1. As the employee submit an expense of A$10 on the workspace.
  2. Log in to NewDot as the admin.
  3. Open the employees expenses and approve the report
  4. Verify that the report preview has the pay button, and that clicking it reveals a "Pay via ABA" option, with the paycheck icon.
  5. Go to Spend -> Reports and verify that Pay button there (on wide desktop views only) also shows the same option.
  6. Go back to the workspace chat, open the report, click the Pay button and verify the same option is present.
  7. Click "Pay via ABA".
  8. Verify that a file named ABA_Report_<reportID>.aba downloads, and that the report shows as paid.
  9. Open the file in a text editor. Check that it has a line for the name you entered for the employee, with details matching their account (BSB 762-133, account 01234560) and the amount 0000001000.

Held expenses

  1. As the employee, create a report with two expenses and submit it.
  2. As the admin, open the report and hold both expenses.
  3. Go to Workspaces -> [workspace] -> Workflows and turn off approvals.
  4. Open the report, go to the More menu and verify that Pay via ABA shows up under Pay there.
  5. Unhold one of the expenses.
  6. Go to Pay -> Pay via ABA.
  7. Verify that the hold menu appears giving the option to pay all the expenses or only the unheld ones.
  8. Click "Pay only".
  9. Verify that the file only includes the expense that isn’t held, and that the held expense moves to a new report.

Bulk pay

  1. As the employee create two reports and submit them
  2. As the admin approve both reports
  3. In Spend, select both reports and open the bulk action menu’s Pay options. Verify that Pay via ABA is listed.
  4. Click Pay via ABA.
  5. Verify that one file named ABA_Report_Bulk_<today's date>.aba downloads, that it has a line for each employee, and that both reports show as paid.
  6. Select reports from two different workspaces and verify that Pay via ABA doesn't show as an option.
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
android-app.mov
Android: mWeb Chrome
android-chrome.mov
iOS: Native
ios-app.mov
iOS: mWeb Safari
ios-safari.mov
MacOS: Chrome / Safari

Single report

Screen.Recording.2026-10-22.at.16.59.56.mov

Held expense

Screen.Recording.2026-10-22.at.17.07.40.mov

Search/bulk selection

Screen.Recording.2026-10-22.at.17.12.26.mov

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/SENTRY_LABEL.ts 100.00% <ø> (ø)
src/CONST/index.ts 96.15% <ø> (ø)
...c/components/Modal/Global/HoldMenuModalWrapper.tsx 92.50% <100.00%> (+0.19%) ⬆️
src/components/MoneyReportHeaderModalsContext.tsx 20.00% <ø> (ø)
...Item/MoneyRequestReportPreview/PayActionButton.tsx 96.84% <100.00%> (+0.03%) ⬆️
...h/SearchList/ListItem/ActionCell/PayActionCell.tsx 95.78% <100.00%> (+0.13%) ⬆️
src/components/SettlementButton/index.tsx 87.74% <100.00%> (+1.15%) ⬆️
src/hooks/useBulkPayOptions.ts 70.00% <100.00%> (+3.67%) ⬆️
src/hooks/useHoldMenuSubmit.ts 96.25% <100.00%> (+96.25%) ⬆️
src/hooks/usePayViaABA.ts 100.00% <100.00%> (ø)
... and 19 more
... and 8 files with indirect coverage changes

@jjcoffee
jjcoffee force-pushed the add-pay-via-aba-option branch from 644059b to fc213e6 Compare October 20, 2026 11:00
@jjcoffee jjcoffee changed the title add OpenPaymentMethods read command Add Pay via ABA option Oct 20, 2026
@melvin-bot

melvin-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@jjcoffee

Copy link
Copy Markdown
Contributor Author

Just pulling out some screenshots here so it's easy to review the design.

image image

@jjcoffee
jjcoffee marked this pull request as ready for review October 26, 2026 09:01
@jjcoffee
jjcoffee requested review from a team as code owners October 26, 2026 09:01
@melvin-bot
melvin-bot Bot requested review from DylanDylann and removed request for a team October 26, 2026 09:01
@jjcoffee

Copy link
Copy Markdown
Contributor Author

@arosiclair All yours, I think!

Comment thread src/hooks/usePayViaABA.ts Resolved
Comment thread src/libs/PolicyUtils/payments.ts Resolved
Comment thread src/hooks/useBulkPayOptions.ts Resolved
@jjcoffee
jjcoffee requested a review from arosiclair November 17, 2026 09:00
@arosiclair
arosiclair merged commit 97eb893 into Expensify:main Nov 17, 2026
39 of 41 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 arosiclair has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@jjcoffee
jjcoffee deleted the add-pay-via-aba-option branch November 17, 2026 15:53
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/arosiclair in version: 9.5.41-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #107211 was identified to be related to this PR.

@jponikarchuk

Copy link
Copy Markdown

This PR failing because of the issue #107211
This issue is reproducible in: All platforms

@jjcoffee

jjcoffee commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

@jponikarchuk It looks like you haven't selected the admin's AU bank account as the Default Business Bank Account here (see step 6):

image

(Sorry, I know the instructions are a bit convoluted for this 😅 )

@jponikarchuk

Copy link
Copy Markdown

@jjcoffee Thanks. It works fine now

@Chandkia24

Copy link
Copy Markdown

This PR failing because of the regression issue #107302

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.41-2 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants