DBS
About This Page
What: DBS Bank's API statement collection, sub-account priority matching mode, and SubAccountSDK integration Audience: PMs needing to understand DBS integration details Prerequisites: Bank Capability MatrixReading time: 4 minutes Owner: Deposit Product Manager
Key takeaway: DBS's core feature is sub-account priority matching — each user has a dedicated DBS sub-account; deposits first match by sub-account then fall through to general logic.
Capability Overview
| Capability | Supported | Protocol/Channel | Core Service |
|---|---|---|---|
| Deposit Statement Collection | ✅ | API scheduled pull | Standard BankFlow collection |
| Sub-account Deposit | ✅ | SubAccountSDK | DbsMatch sub-account matching |
| Withdrawal | ❌ | — | — |
| eDDA/eDDI | ❌ | — | — |
| FPS | ❌ | — | — |
| BST | ❌ | — | — |
DBS is the typical representative of sub-account matching — matching logic revolves around sub-account ownership; users must have sub-account history to match. The HKD auto-deposit tolerance of -350 is the widest among all banks.
Channel Interface Overview
| Dimension | Description |
|---|---|
| Protocol | API |
| Data Collection | Scheduled pull |
| Sub-account Management | SubAccountSDK |
| IMPORT_BANK_ID | 16 (DBS) |
| TransType | 208 |
| Matching Engine | DbsMatch |
Deposit: API Statement Collection
Collection Method
DBS provides statement data through a standard API interface. The system pulls on a schedule and writes to the unified BankFlow format.
Data Flow
API Interface Fields
DBS statement data is based on the generic BankFlow format with the following key fields:
| Field | Description | Purpose |
|---|---|---|
| transaction_id | Transaction unique identifier | Deduplication key |
| transaction_date | Transaction date | Date window matching |
| value_date | Value date | Auxiliary date reference |
| currency | Currency | Currency matching condition |
| amount | Transaction amount | Amount tolerance matching |
| payer_name | Payer name | Exact name matching |
| payer_account | Payer bank account | Sub-account matching core field |
| beneficiary_account | Beneficiary account | moomoo receiving account identifier |
| transaction_type | Transaction type | Distinguish credit/debit |
| remarks | Transaction remarks | Supplementary information |
Key Field
payer_account (payer bank account) is the core field for DBS matching — the system uses it to query SubAccountSDK to determine if it belongs to a user's assigned sub-account.
Matching Rules (DbsMatch)
Core Feature: Sub-Account Priority Matching
DBS uses a sub-account priority matching model — unlike other banks that check amount/name first, DBS first checks whether the statement account exists in the user's sub-account list. Only after sub-account verification passes does it proceed to amount and name matching.
| Dimension | Rule | Description |
|---|---|---|
| Auto-deposit | ✅ Enabled | Auto-deposits when sub-account + amount + name all pass |
| Prerequisite | Sub-account history check | Must pass SubAccountSDK verification |
| Currency Match | Must be identical | Statement currency = Application currency |
| Name Match | English exact match | One of the auto-deposit conditions |
| Date Window | -3 ~ +2 days (daySimilar) | Standard date rule |
Amount Tolerance
| Scenario | HKD Tolerance | USD Tolerance |
|---|---|---|
| Auto-deposit | CRM - 350 ≤ Statement ≤ CRM | CRM - 50 ≤ Statement ≤ CRM |
CRM-350 HKD is the widest auto-deposit tolerance among all banks
Why so large? DBS sub-account deposits typically involve cross-bank transfers that may pass through multiple intermediary banks, each potentially charging fees. Since the sub-account itself proves fund ownership (only the user holding that sub-account can transfer in), the system can confidently use a larger tolerance to cover uncertain fees.
SubAccountSDK Sub-Account System
SubAccountSDK is the core component for sub-account management, responsible for maintaining user-to-sub-account mappings:
| Function | Description |
|---|---|
| Sub-account Allocation | Assigns unique DBS sub-account numbers to each user |
| Ownership Query | Reverse-lookup user from bank account number |
| History Records | Maintains user's sub-account usage history |
| Cross-bank Support | Same SDK serves DBS, SCB, and other sub-account banks |
Core sub-account matching logic:
Complete Matching Logic
| Condition Combination | Match Result | Description |
|---|---|---|
| Currency match + Sub-account history exists + Name exact + Amount within tolerance | Auto-deposit (Deposit Match) | Ideal scenario, system auto-completes crediting |
| Currency match + Sub-account history exists | Standard Match | Sub-account itself proves fund ownership |
| Currency match + Sub-account history doesn't exist | No match | Cannot confirm fund ownership |
| Currency mismatch | No match | Basic condition not met |
Why does sub-account existence alone return standard match? Sub-accounts are unique numbers assigned to specific users. If a statement's payer account is in a user's sub-account list, even if amount or name don't fully match (possibly due to fee deductions or name format differences), it's reasonable to infer the funds belong to that user. Operations staff only need to do final confirmation.
Matching Conditions Detail
| Condition | Check Method | Auto-deposit | Standard Match |
|---|---|---|---|
| Currency | Direct comparison | ✅ Required | ✅ Required |
| Sub-account Ownership | SubAccountSDK query | ✅ Required | ✅ Required |
| Name | English exact match | ✅ Required | ❌ Not required |
| Amount | amountSimilarForAuto | ✅ Required | ❌ Not required |
| Date | daySimilar (-3~+2) | ✅ Required | ❌ Not required |
Scheduled Tasks
| Task | Frequency | Description |
|---|---|---|
| Statement Collection | Scheduled pull | Fetch latest statements from DBS API |
| match:dbs | Every 3 minutes | Execute DBS statement matching |
Comparison with Other Sub-Account Banks
DBS isn't the only bank supporting sub-accounts. Here's a cross-comparison:
| Dimension | DBS | EWB Sub-account | SCB |
|---|---|---|---|
| bank_id | 16 | 38 | — |
| Matching Engine | DbsMatch | EwbSubAccountMatch | — |
| Sub-account SDK | ✅ SubAccountSDK | ❌ Independent logic | ✅ SubAccountSDK |
| Auto-deposit | ✅ | ✅ | — |
| HKD Auto-deposit Tolerance | -350 | -40 | — |
| USD Auto-deposit Tolerance | -50 | ❌ Not supported | — |
| Sub-account Check | Prerequisite | Implicit in matching | Prerequisite |
| Without Sub-account | No match | No match | — |
Why is DBS tolerance much larger than EWB sub-account? EWB sub-accounts primarily handle local HKD transfers with low fees; DBS sub-accounts involve more cross-bank transfer scenarios with higher fee uncertainty.
Sub-Account Deposit Full Flow
From the user's perspective, the complete DBS sub-account deposit flow:
Change Guide
| Change Requirement | Modification Location | Description |
|---|---|---|
| Modify auto-deposit tolerance | DbsMatch.php → amountSimilarForAuto() | Adjust HKD -350 / USD -50 thresholds |
| Modify sub-account matching logic | DbsMatch.php → SubAccountSDK call | Adjust sub-account ownership verification rules |
| Add new sub-account source | SubAccountSDK configuration | Add new sub-account allocation channel |
| Enable fuzzy name matching | DbsMatch.php → change to nameSimilar() | From exact match to similar match |
| Modify date window | DbsMatch.php → daySimilar() | Adjust -3~+2 day range |
| Add supported currency | DbsMatch.php → currency check + tolerance config | Add new currency matching rules |
| Modify matching frequency | deposit/doc/crontab.sh → match:dbs | Adjust cron interval |
| Sub-account allocation strategy change | SubAccountSDK → allocation logic | Modify sub-account number generation/allocation rules |
Monitoring & Alerts
| Alert Item | Trigger Condition | Severity | Handling Steps |
|---|---|---|---|
| Sub-account API connection timeout | SubAccountSDK request timeout | Medium | Check network connectivity, confirm DBS API is normal |
| Statement collection delay | API returns stale data | Medium | Confirm query time range, manually supplement if necessary |
| Sub-account mismatch | Statement account inconsistent with system records | High | Verify sub-account mapping relationship, manually correct |
SubAccountSDK Interface Details
Statement Query Interface
| Field | Type | Required | Description |
|---|---|---|---|
sub_account_id | string | ✅ | DBS sub-account ID |
start_date | string | ✅ | Query start date. Format YYYY-MM-DD |
end_date | string | ✅ | Query end date. Format YYYY-MM-DD |
currency | string | ❌ | Currency filter. Values HKD / USD |
Statement Response Fields
| Field | Type | Description |
|---|---|---|
transaction_id | string | Transaction unique ID |
transaction_date | datetime | Transaction date time |
amount | decimal | Transaction amount |
currency | string | Currency |
balance_after | decimal | Balance after transaction |
payer_name | string | Payer name |
payer_account | string | Payer account |
reference | string | Transaction reference number |
Auto-Deposit vs Standard Match
DBS matching rules distinguish two modes:
| Dimension | Auto-deposit | Standard Match |
|---|---|---|
| Amount Tolerance (HKD) | -350 | -420 |
| Amount Tolerance (USD) | -50 | -60 |
| Date Window | -3~+2 days | -3~+2 days |
| Sub-account Verification | ✅ Must verify history | ❌ Not verified |
| Manual Confirmation | Not required | Required |
| Applicable Scenario | Small routine deposits | Large or first-time deposits |
Sub-account History Verification
Auto-deposit requires the sub-account to have at least one successful deposit record in history. The first deposit to a newly opened sub-account will not auto-deposit and requires operations manual match confirmation.
After Reading
| I want to... | Go to |
|---|---|
| See DBS's position among all banks | Bank Capability Matrix |
| Understand the full matching engine logic | Matching & Auto-Deposit |
| See another sub-account bank (EWB) | EWB |
| Compare SCB's sub-account deposit | SCB |
| Look up TransType and Bank ID reference | Deposit Reference |