4.5 KiB
Transfer
The transfer screen initiates account-to-account fund transfers. It supports MIB, BML, and Fahipay as source banks and handles all bank-specific authentication and OTP steps.
Fragment — TransferFragment
Opened via:
- Navigation menu
- Quick-transfer button on an account row (source pre-selected)
OPEN_TRANSFERintent actionOPEN_SCAN_QRintent — opens the QR scanner immediately (newInstanceWithAutoScan())- QR scan result (recipient and optional amount pre-filled)
- Donate buttons in Settings → About (
newInstance(...)with pre-filled recipient)
Factory Methods
All defined in TransferFragment.kt:179-242:
| Method | Use case |
|---|---|
newInstance(accountNumber, displayName, subtitle, colorHex, imageHash) |
Pre-fill recipient (contact tap, recents, donate) |
newInstanceFrom(account) |
Pre-select a source account (quick-transfer from accounts list) |
newInstanceFromQr(accountNumber, displayName, amount, remarks, fromAccountNumber?) |
PayMV QR scan |
newInstanceFromBmlQr(qrUrl, fromAccountNumber?) |
BML ebanking / pay.bml URL scan — locks recipient |
newInstanceWithAutoScan() |
Open the QR scanner on load |
See Transfer Flows for the full routing logic.
Source Account Selection
A dropdown lists all visible accounts parsed via AccountListParser.from(acc)?.balance. The selected source account determines which bank's transfer flow is used.
Recipient Entry
The user can specify a recipient in three ways:
- Manual entry — type an account number directly
- Contact picker — opens
ContactPickerSheetFragmentto select a saved contact - QR scan — launches QrScannerActivity; a PayMV QR result pre-fills the account number, amount, and remarks; a BML ebanking / pay.bml URL switches the form into BML QR merchant payment mode
Fields
| Field | Notes |
|---|---|
| Source account | Dropdown; balance shown below |
| Recipient account number | Text input or filled from contact/QR |
| Recipient name | Auto-looked up from bank API after account number entry |
| Amount | Numeric; pre-filled from QR if available |
| Remarks / purpose | Free text; pre-filled from QR if available |
Recipient Lookup
After the user finishes entering a recipient account number, the app calls the source bank's name-lookup API:
- MIB: account name lookup via MIB API
- BML: beneficiary lookup via BML API
- Fahipay: account name resolution via Fahipay API
The resolved name is displayed below the account number field for the user to confirm.
Biometric Gate
If both biometrics_enabled and biometrics_transfer_confirm are set in Settings → Security (SettingsSecurityFragment.kt:59), BiometricPrompt is shown before the transfer is submitted. A failed or cancelled biometric blocks submission.
BML USD → MIB Auto-Add Contact
When the source is a BML USD account and the destination is a MIB account but no saved BML contact exists for it, the app shows a "Contact required" dialog with a Save button that opens AddContactSheetFragment.newInstance(bmlProfileId, accountNumber, recipientName, currency) pre-filled (TransferFragment.kt:1136-1164). The user must save the contact through this sheet before BML can issue a USD cross-bank transfer.
Bank-Specific Flows
MIB Transfer
- Validates fields
- (If biometric gate) prompts biometrics
- Submits transfer via
MibLoginFlowusing active MIB session (serialized throughmibMutex) - On success, shows
TransferReceiptFragment
BML Transfer
- Validates fields
- (If biometric gate) prompts biometrics
- Initiates BML transfer — server responds with OTP required
- Navigates to
OtpFragmentto collect the TOTP - Re-submits with OTP
- On success, shows
TransferReceiptFragment
Fahipay Transfer
- Validates fields
- (If biometric gate) prompts biometrics
- Submits via Fahipay API using stored
authID+ session cookie - On success, shows
TransferReceiptFragment
Transfer Receipt
On success the fragment navigates to TransferReceiptFragment passing the completed transfer details.
Error Handling
All bank API errors are shown as a Snackbar or inline error message. Session expiry triggers a re-authentication prompt rather than a crash.
← Transfer History Next → Contacts