[Due for payment 2026-11-22] [$175] Wallet - Going back from the international bank account success page lets the same account be submitted again
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Action Performed:
- Go to Account > Wallet > Add bank account.
- Select a non-US country (e.g. United Kingdom) and press Next.
- Fill in every step with valid details.
- On the confirmation page, tick the terms and press Confirm.
- On the success page, press the browser Back button (web) or the device Back button (Android).
- Press Confirm again.
Expected Result:
The flow closes, or the success page stays. The same bank account cannot be submitted twice.
Actual Result:
The confirmation page for the account just added opens with every detail filled in and the terms ticked. Pressing Confirm submits the same account again.
Workaround:
Unknown.
Platforms:
- Android: App (reported)
- Web (reported)
Screenshots/Videos
https://github.com/user-attachments/assets/8331300f-9e6c-48a3-a3f7-fc9d7968f306
Issue Owner
Current Issue Owner: @mallenexpensifyUpwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022121112976100450700
- Upwork Job ID: 2121112976100450700
- Last Price Increase: 2026-11-13
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/922f8851f57ce4d2c9ce8cd61b187498bdd773ae0071eda7e7135f12c604739e
Proposal
What is the root cause of that problem?
The "IFSC Code is invalid" string is not an App string — it comes from Corpay via the backend and the App renders it verbatim.
When you pick a bank country, the App calls GetCorpayBankAccountFields and stores the response in the corpayFields Onyx key. Each field carries validationRules[].errorMessage, already rendered in English by the provider. Client-side validation just passes it straight through:
src/pages/settings/Wallet/InternationalDepositAccount/utils.ts:144-154 — only common.error.fieldRequired and the one SWIFT/BIC case added by Fix misleading SWIFT validation guidance for international bank accounts go through translate(). Every other rule, IFSC included, falls through to rule.errorMessage.
Two things make it impossible for this string to be Spanish today:
- The App never sends the user's locale on that request —
GetCorpayBankAccountFieldsParams.tsonly carriescountryISO,currency,isWithdrawal,isBusinessBankAccount.preferredLocaleis sent on sign-in commands only. - There is no IFSC translation key anywhere in
src/languages/—grep -i ifsc src/returns nothing.
So this is a systemic gap, not a one-off. The same Corpay strings are rendered raw in several other places, which is why the form already looks half-translated: the field label is English with a Spanish (opcional) suffix at subPages/BankAccountDetails.tsx:102, and dropdown option text and region names are raw too.
What changes do you think we should make in order to solve the problem?
The complete fix is backend-side and outside this repo: send the user's preferredLocale on GetCorpayBankAccountFields and have the backend return localized label, valueSet[].text, and validationRules[].errorMessage. That needs Web-Expensify/Auth changes (and confirmation that Corpay's upstream API accepts a locale), so it should be escalated to an internal engineer rather than solved here.
An App-only mitigation is available following the precedent this team already accepted in #101772, if a full fix isn't wanted now:
- Add an
addPersonalBankAccount.ifscFormatErrorkey to allsrc/languages/*.tsfiles describing the real IFSC format (11 characters: 4 letters, then0, then 6 alphanumerics). - Generalize the hard-coded SWIFT branch in
getValidationErrorsinto a small lookup keyed by bank country plus field name, so the IFSC rule forINresolves to that key and SWIFT keeps its current behavior.values.bankCountryis already available inside that function, and scoping by country is required becauseroutingCodeis reused for UK sort codes, AU BSB, and others. - Apply the same treatment to the two workspace (NonUSD) copies of this logic, which never received the #101772 fix at all and still render
rule.errorMessageraw with no special cases:NonUSD/BankInfo/subSteps/BankAccountDetails.tsx:73andAccountHolderDetails.tsx:92. Best done by having both call the sharedgetValidationErrorsinstead of duplicating it. - Update
tests/unit/InternationalDepositAccountUtilsTest.ts:47-62, which currently asserts that non-SWIFT fields preserve the provider message.
Be aware this mitigation only fixes the strings we enumerate. The English field label sitting right above the error stays English either way, so the screen still reads as partly untranslated.
What alternative solutions did you explore? (Optional)
- Map Corpay's English message text to translation keys. Rejected: keying on provider prose breaks the moment Corpay rewords anything, and there are ~100+ country/currency combinations.
- Translate everything client-side with a full Corpay string table. Rejected: unbounded maintenance for labels, options, and region names across every supported country.
Verification details and an unverified assumption
Verified from code (App at 05d0f31ea045bcdf2f91b774033bfce870d31ba3):
corpayFields.formFields[]is written only by the server'sonyxData; the client never populates it. Both entry points areBankAccounts.ts:1479(fetchCorpayFields, used by this Wallet flow) andBankAccounts.ts:825.- Nothing localizes the string downstream:
addErrorMessageconcatenates it as-is andFormProviderrenders it aserrorText. - The IFSC field lands in the
ACCOUNT_DETAILSbucket viautils.ts:34-37, which matches the reported screen.
Not verified: I did not reproduce against the live Corpay response, so I don't know India's exact field id and regex. routingCode is the most likely id — India's IFSC is the routing code, and ReimbursementAccountForm.ts:104-106 notes it pairs with the SWIFT/BIC input. Whoever implements this should confirm the id and regex from an actual GetCorpayBankAccountFields response for countryISO=IN before wiring up the lookup.
Alternative explanation considered and ruled out: that the message is the top-level field.errorMessage or a backend error surfaced on the Confirmation step. Neither fits — field.errorMessage is declared in the type but never read by any App code, and the reported repro shows the error inline on blur, which is the client-side getValidationErrors path.
Related: Wallet- SWIFT code field validation error persist after enter valid code for International BA is the same underlying gap for the SWIFT field, fixed narrowly by #101772. No open duplicate of this IFSC report exists.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/102213) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the user's language is set to Spanish and they navigate to Account > Wallet > Add International account for India, entering an invalid IFSC code (e.g. 2–4 characters) and blurring the field displays the error message "IFSC Code is invalid" in English instead of Spanish.
What is the root cause of that problem?
Dynamic form fields and validation rules for international bank accounts are returned by Corpay via the GetCorpayBankAccountFields API command.
In src/pages/settings/Wallet/InternationalDepositAccount/utils.ts (lines 144–154), getValidationErrors() checks input values against each rule's regular expression (rule.regEx):
for (const rule of field.validationRules) {
const regExpCheck = new RegExp(rule.regEx);
if (!regExpCheck.test(values[fieldName])) {
// Corpay's strict SWIFT rule also requires a six-letter prefix, which its message may omit.
const errorMessage =
fieldName === INPUT_IDS.ADDITIONAL_DATA.CORPAY.SWIFT_BIC_CODE && rule.regEx === CONST.CORPAY_FIELDS.STRICT_SWIFT_BIC_REGEX
? translate('addPersonalBankAccount.swiftBicFormatError')
: rule.errorMessage;
addErrorMessage(errors, fieldName, errorMessage);
}
}
For India (bankCountry === 'IN'), the IFSC field uses the routingCode field name. When the regex check fails, it falls through to rule.errorMessage. Because rule.errorMessage is supplied directly by Corpay in English ("IFSC Code is invalid"), the app renders the unlocalized English string regardless of the user's selected language.
While PR #101772 solved this exact problem for swiftBicCode by introducing translate('addPersonalBankAccount.swiftBicFormatError'), no localized translation key or mapping was added for the Indian IFSC routing code validation.
What changes do you think we should make in order to solve the problem?
- Add localized IFSC error messages to
src/languages/en.tsandsrc/languages/es.ts:
In src/languages/en.ts:
addPersonalBankAccount: {
swiftBicFormatError: 'SWIFT/BIC must be 8 or 11 characters long, with 6 letters followed by 2 or 5 letters or numbers.',
ifscFormatError: 'IFSC Code is invalid.',
In src/languages/es.ts:
addPersonalBankAccount: {
swiftBicFormatError: 'El SWIFT/BIC debe tener 8 u 11 caracteres, con 6 letras seguidas de 2 o 5 letras o números.',
ifscFormatError: 'El código IFSC no es válido.',
- In
src/pages/settings/Wallet/InternationalDepositAccount/utils.ts: UpdategetValidationErrorsto translate the error when validating the Indian IFSC routing code:
diff --git a/src/pages/settings/Wallet/InternationalDepositAccount/utils.ts b/src/pages/settings/Wallet/InternationalDepositAccount/utils.ts
--- a/src/pages/settings/Wallet/InternationalDepositAccount/utils.ts
+++ b/src/pages/settings/Wallet/InternationalDepositAccount/utils.ts
@@ -145,10 +145,13 @@ function getValidationErrors(values: FormOnyxValues<typeof ONYXKEYS.FORMS.INTER
for (const rule of field.validationRules) {
const regExpCheck = new RegExp(rule.regEx);
if (!regExpCheck.test(values[fieldName])) {
+ const isIndianIFSC = values.bankCountry === 'IN' && (fieldName === INPUT_IDS.ROUTING_CODE || fieldName === 'routingCode');
// Corpay's strict SWIFT rule also requires a six-letter prefix, which its message may omit.
const errorMessage =
fieldName === INPUT_IDS.ADDITIONAL_DATA.CORPAY.SWIFT_BIC_CODE && rule.regEx === CONST.CORPAY_FIELDS.STRICT_SWIFT_BIC_REGEX
? translate('addPersonalBankAccount.swiftBicFormatError')
+ : isIndianIFSC
+ ? translate('addPersonalBankAccount.ifscFormatError')
: rule.errorMessage;
addErrorMessage(errors, fieldName, errorMessage);
}
- Update
tests/unit/InternationalDepositAccountUtilsTest.ts: Add unit test cases verifying that whenbankCountry === 'IN'and theroutingCodefails validation,translateLocal('addPersonalBankAccount.ifscFormatError')is returned.
What alternative solutions did you explore? (Optional)
- Translating Corpay error messages on the backend: While passing
preferredLocaleupstream to Corpay or translating on the Web-Expensify backend would be ideal long-term, Corpay's upstream API is third-party and may not support localized validation errors. Handling known provider validation format errors client-side follows the exact architectural precedent established in PR #101772 forswiftBicCode.
Compare branch: https://github.com/ashusatyarthi-wq/App/compare/fix/ifsc-spanish-error-102213
Proposal
What is the root cause of that problem?
Dynamic form fields and validation rules for international bank accounts are returned from Corpay via the GetCorpayBankAccountFields API.
In src/pages/settings/Wallet/InternationalDepositAccount/utils.ts (lines 144–154), getValidationErrors() iterates over each field's validationRules and evaluates input values against rule.regEx:
- When input validation fails, it defaults to Corpay's raw provider message:
rule.errorMessage. - For Indian bank accounts (
bankCountry === 'IN'), the IFSC field uses theroutingCodefield, and Corpay provides the error message in English as"IFSC Code is invalid.". - Because
rule.errorMessageis passed directly toaddErrorMessage(errors, fieldName, errorMessage)without translation, the error message remains in English even when the app language is set to Spanish (or any non-English locale).
Recently merged PR #101772 solved this exact problem for swiftBicCode by introducing a localized translation key (addPersonalBankAccount.swiftBicFormatError) and mapping Corpay's strict SWIFT validation failure in getValidationErrors(). However, no corresponding localized translation or mapping was added for the Indian IFSC routing code validation rule.
What changes do you think we should make in order to solve the problem?
Following the exact architectural pattern established in PR #101772:
-
Add localized IFSC error messages across all language files in
src/languages/: AddifscFormatErrorunderaddPersonalBankAccountinsrc/languages/en.ts,src/languages/es.ts, and the remaining supported locale files (de.ts,fr.ts,it.ts,ja.ts,nl.ts,pl.ts,pt-BR.ts,zh-hans.ts,el.ts):- English (
en.ts):'IFSC Code is invalid.' - Spanish (
es.ts):'El código IFSC no es válido.'
- English (
-
In
src/pages/settings/Wallet/InternationalDepositAccount/utils.ts: IngetValidationErrors(), check when the Indian routing code IFSC rule fails (e.g.fieldName === INPUT_IDS.ROUTING_CODE || fieldName === 'routingCode'for Indian bank accounts or matching the IFSC rule identifier) and map the message totranslate('addPersonalBankAccount.ifscFormatError')instead of falling back to the raw Englishrule.errorMessage. -
Add unit test coverage in
tests/unit/InternationalDepositAccountUtilsTest.ts: Add test cases verifying that when an Indian international deposit account routing code fails validation,translateLocal('addPersonalBankAccount.ifscFormatError')is returned in the errors object.
What alternative solutions did you explore? (Optional)
- Translating provider error strings on the Web-Expensify backend: Third-party provider APIs like Corpay return static English validation strings. Handling known provider field format errors on the client aligns directly with the established pattern in PR #101772 for
swiftBicCodeand avoids backend dependency.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01f9f6e0f44dbc3e49
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@situchan Huh... This is 4 days overdue. Who can take care of this?
@situchan 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@situchan 10 days overdue. Is anyone even seeing these? Hello?
The error is coming from backend
@situchan this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@situchan Eep! 4 days overdue now. Issues have feelings too...
@situchan 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@situchan Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
@situchan 12 days overdue. Walking. Toward. The. Light...
@situchan this issue is now 4 weeks old, please consider:
- Finding a contributor to fix the bug
- Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
- If you have any questions, don't hesitate to start a discussion in #expensify-open-source
Thanks!
This issue has not been updated in over 14 days. @situchan eroding to Weekly issue.
@situchan Eep! 4 days overdue now. Issues have feelings too...