Skip to content

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

CapabilitySupportedProtocol/ChannelCore Service
Deposit Statement CollectionAPI scheduled pullStandard BankFlow collection
Sub-account DepositSubAccountSDKDbsMatch 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

DimensionDescription
ProtocolAPI
Data CollectionScheduled pull
Sub-account ManagementSubAccountSDK
IMPORT_BANK_ID16 (DBS)
TransType208
Matching EngineDbsMatch

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:

FieldDescriptionPurpose
transaction_idTransaction unique identifierDeduplication key
transaction_dateTransaction dateDate window matching
value_dateValue dateAuxiliary date reference
currencyCurrencyCurrency matching condition
amountTransaction amountAmount tolerance matching
payer_namePayer nameExact name matching
payer_accountPayer bank accountSub-account matching core field
beneficiary_accountBeneficiary accountmoomoo receiving account identifier
transaction_typeTransaction typeDistinguish credit/debit
remarksTransaction remarksSupplementary 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.

DimensionRuleDescription
Auto-depositEnabledAuto-deposits when sub-account + amount + name all pass
PrerequisiteSub-account history checkMust pass SubAccountSDK verification
Currency MatchMust be identicalStatement currency = Application currency
Name MatchEnglish exact matchOne of the auto-deposit conditions
Date Window-3 ~ +2 days (daySimilar)Standard date rule

Amount Tolerance

ScenarioHKD ToleranceUSD Tolerance
Auto-depositCRM - 350 ≤ Statement ≤ CRMCRM - 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:

FunctionDescription
Sub-account AllocationAssigns unique DBS sub-account numbers to each user
Ownership QueryReverse-lookup user from bank account number
History RecordsMaintains user's sub-account usage history
Cross-bank SupportSame SDK serves DBS, SCB, and other sub-account banks

Core sub-account matching logic:

Complete Matching Logic

Condition CombinationMatch ResultDescription
Currency match + Sub-account history exists + Name exact + Amount within toleranceAuto-deposit (Deposit Match)Ideal scenario, system auto-completes crediting
Currency match + Sub-account history existsStandard MatchSub-account itself proves fund ownership
Currency match + Sub-account history doesn't existNo matchCannot confirm fund ownership
Currency mismatchNo matchBasic 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

ConditionCheck MethodAuto-depositStandard Match
CurrencyDirect comparison✅ Required✅ Required
Sub-account OwnershipSubAccountSDK query✅ Required✅ Required
NameEnglish exact match✅ Required❌ Not required
AmountamountSimilarForAuto✅ Required❌ Not required
DatedaySimilar (-3~+2)✅ Required❌ Not required

Scheduled Tasks

TaskFrequencyDescription
Statement CollectionScheduled pullFetch latest statements from DBS API
match:dbsEvery 3 minutesExecute DBS statement matching

Comparison with Other Sub-Account Banks

DBS isn't the only bank supporting sub-accounts. Here's a cross-comparison:

DimensionDBSEWB Sub-accountSCB
bank_id1638
Matching EngineDbsMatchEwbSubAccountMatch
Sub-account SDK✅ SubAccountSDK❌ Independent logic✅ SubAccountSDK
Auto-deposit
HKD Auto-deposit Tolerance-350-40
USD Auto-deposit Tolerance-50❌ Not supported
Sub-account CheckPrerequisiteImplicit in matchingPrerequisite
Without Sub-accountNo matchNo 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 RequirementModification LocationDescription
Modify auto-deposit toleranceDbsMatch.phpamountSimilarForAuto()Adjust HKD -350 / USD -50 thresholds
Modify sub-account matching logicDbsMatch.php → SubAccountSDK callAdjust sub-account ownership verification rules
Add new sub-account sourceSubAccountSDK configurationAdd new sub-account allocation channel
Enable fuzzy name matchingDbsMatch.php → change to nameSimilar()From exact match to similar match
Modify date windowDbsMatch.phpdaySimilar()Adjust -3~+2 day range
Add supported currencyDbsMatch.php → currency check + tolerance configAdd new currency matching rules
Modify matching frequencydeposit/doc/crontab.shmatch:dbsAdjust cron interval
Sub-account allocation strategy changeSubAccountSDK → allocation logicModify sub-account number generation/allocation rules

Monitoring & Alerts

Alert ItemTrigger ConditionSeverityHandling Steps
Sub-account API connection timeoutSubAccountSDK request timeoutMediumCheck network connectivity, confirm DBS API is normal
Statement collection delayAPI returns stale dataMediumConfirm query time range, manually supplement if necessary
Sub-account mismatchStatement account inconsistent with system recordsHighVerify sub-account mapping relationship, manually correct

SubAccountSDK Interface Details

Statement Query Interface

FieldTypeRequiredDescription
sub_account_idstringDBS sub-account ID
start_datestringQuery start date. Format YYYY-MM-DD
end_datestringQuery end date. Format YYYY-MM-DD
currencystringCurrency filter. Values HKD / USD

Statement Response Fields

FieldTypeDescription
transaction_idstringTransaction unique ID
transaction_datedatetimeTransaction date time
amountdecimalTransaction amount
currencystringCurrency
balance_afterdecimalBalance after transaction
payer_namestringPayer name
payer_accountstringPayer account
referencestringTransaction reference number

Auto-Deposit vs Standard Match

DBS matching rules distinguish two modes:

DimensionAuto-depositStandard 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 ConfirmationNot requiredRequired
Applicable ScenarioSmall routine depositsLarge 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 banksBank Capability Matrix
Understand the full matching engine logicMatching & Auto-Deposit
See another sub-account bank (EWB)EWB
Compare SCB's sub-account depositSCB
Look up TransType and Bank ID referenceDeposit Reference
Was this page helpful?

内部业务文档 · 仅限 moomoo 团队使用