Skip to content

Withdrawal Change Guide

About This Page

What: The 10 most common withdrawal change requests PMs encounter — for each one, what to change, where to change it, what it impacts, and who needs to approve Audience: Product managers who need to push withdrawal-related requirement changes Prerequisites: Withdrawal Methods OverviewReading time: 8 minutes Owner: Withdrawal Product Manager

Key Takeaway: Withdrawal changes are categorized as code changes (requires release, 1-3 days) and database configuration (takes effect immediately). Each change type is annotated with modification location, impact scope, and approval requirements.


How to Use This Page

When you have a withdrawal-related requirement change:

  1. Find the corresponding change scenario below
  2. Check "Configuration Type" to assess difficulty and timeline
  3. Check "Impact Chain" to evaluate risk
  4. Check "Approval Requirements" to confirm who needs to sign off
  5. Check "Verification Method" to confirm how to validate

Configuration Type Quick Reference

TypeMeaningHow It Takes EffectChange Timeline
Code constantHardcoded in PHP/Go/Python codeRequires release process1~3 days (dev + test + release)
Config fileconfig/*.php or .envRequires release process1~2 days
Database configStored in DB config tablesTakes effect immediately after changeSame day
Operations backendAdjustable via OA/CRM backendOps self-serviceImmediate
Cron configScheduled task expressionsRequires ops deployment0.5~1 day
Bank-sideRequires bank cooperationGoes through business + technical integrationWeeks~months

Scenario 1: Adjust Auto-Withdrawal Limits

Example: Raise Airstar HKD single transaction cap from 3 million to 5 million

DimensionDescription
What to changemax_amount field for the corresponding bank+currency in auto_settings table
Where to changeDatabase auto_settings table, locate row by id (bank: CMB=2, CMBC=1, Airstar=3), modify {prefix}max_amount
Configuration typeDatabase config — takes effect immediately
Impact chainLimit raised → More large withdrawals take auto path → Ops workload decreases, but large anomalies may auto-pass. Limit lowered → More withdrawals degrade to manual → Ops workload increases, higher security
Verification methodSend a test withdrawal slightly above old limit but below new limit, confirm it takes the auto path
Approval requirementsRisk control team sign-off (mandatory) + Product confirmation + Ops awareness
RollbackRestore original value, takes effect immediately

Three-Tier Limit Linkage

When modifying max_amount (single transaction cap), you must simultaneously evaluate whether alarm_amount (alarm threshold) and stop_amount (circuit breaker threshold) also need adjustment. Raising the single cap without adjusting the circuit breaker may result in a few large withdrawals triggering the circuit breaker.

Current three-tier limit values → Withdrawal Rules Manual § Three-Tier Limit System


Scenario 2: Modify High-Risk Determination Rules

Example: Make mainland China (CN) no longer trigger high-risk Audit

DimensionDescription
What to changeDetermination logic for the HIGH_RISK_AREA factor
Where to changewithdraw/src/app/Business/HighRisk/HighRiskBiz.php → various checkHighRisk*() methods
Configuration typeCode constant — requires release
Impact chainRemove CN → Mainland bank card withdrawals no longer trigger Audit → Audit review volume decreases, but may miss abnormal mainland-direction withdrawals. Add country → All withdrawals to that country get extra Audit step → Ops review volume increases
Special noteThe high-risk country list updates from an API every 5 minutes, but CN and PR are hardcoded in HighRiskBiz.php's checkHighRiskArea() (not in the API list). Removing CN requires code change, not API adjustment
Verification methodSend a test withdrawal with mainland bank card, confirm the AREA(2) bit is no longer set in high_risk bitmask
Approval requirementsRisk control team sign-off (mandatory) + Compliance confirmation
RollbackRestore original code, re-release

Common change scenarios

  • Make FREQUENCY also trigger Audit → Add bit check in HighRiskCheck.phpneedAudit()
  • Modify the ">= 10 transactions" frequency threshold → Modify FREQUENCY check logic in HighRiskBiz.php
  • Add a new risk factor → New bit constant + calculation logic + needAudit check

Current 6-factor details → Withdrawal Rules Manual § High-Risk Determination


Scenario 3: Modify Approval Templates

Example: Add a fast withdrawal template for VIP users that skips Confirm

DimensionDescription
What to change$stepTemplates array, add new template or modify existing template steps
Where to changewithdraw/src/app/Business/Task.php$stepTemplates array
Configuration typeCode constant — requires release
Impact chainFewer steps → Faster withdrawal approval, but fewer safety checks. More steps → Slower withdrawal, higher security but increased ops workload. New template → Must also add template selection logic in CreatorBase.php
Verification methodSend a test withdrawal with target user type, check the template field and actual approval step count
Approval requirementsProduct confirmation + Risk control confirmation + Ops awareness (flow change)
RollbackRestore original template, re-release

New steps require Step class implementation

Each approval step is a PHP class implementing the IFStep interface. Adding a step is not just adding an array element — you need to write the step's check logic, CRM interaction logic, and permission control.

Current 6 templates → Withdrawal Rules Manual § Approval Templates


Scenario 4: Adjust Auto-Withdrawal Balance Management

Example: Raise Airstar HKD alarm threshold from 40 million to 60 million

DimensionDescription
What to changealarm_amount and/or stop_amount in auto_settings table
Where to changeDatabase auto_settings table
Configuration typeDatabase config — takes effect immediately
Impact chainalarm threshold raised → Earlier alert → Ops has more reaction time. alarm threshold lowered → Alert delayed → Balance may approach circuit breaker without notice. stop threshold raised → Earlier circuit breaker → Safer but ops needs more frequent "top-ups". stop threshold lowered → Later circuit breaker → Auto-withdrawal runs longer
Verification methodAfter adjustment, observe whether next alert/circuit breaker triggers at balance values matching new thresholds
Approval requirementsOps supervisor confirmation
RollbackRestore original values, takes effect immediately

"Top-up" Operation

When balance falls below stop_amount triggering circuit breaker, ops needs to: 1. Update {prefix}amount to increase balance ("top up"); 2. Set {prefix}status to 1 (reopen). Both steps are required.

auto_settings complete fields → Withdrawal Rules Manual § Auto-Withdrawal Configuration


Scenario 5: Restore Withdrawal Fees

Example: Restore cross-border withdrawal charges of HKD 105 / USD 15

DimensionDescription
What to changeThe $fee = 0 forced-free line at the end of getFee()
Where to changewithdraw/src/app/Business/CreatorBase.phpgetFee() method
Configuration typeCode constant — requires release
Impact chainRestore fees → User withdrawal cost increases → May affect withdrawal frequency and user satisfaction. Fees are displayed for user confirmation before submission → Frontend display logic does not need modification (already exists)
Special noteThe code already defines a complete fee schedule (HKD 105 / USD 15 / CNH 105); just deleting the trailing $fee = 0 restores it. No need to rewrite fee logic
Verification methodSend a test withdrawal with a cross-border bank card, confirm the App displays correct fees and the Task fee field is correct
Approval requirementsProduct owner + Ops awareness + Customer service prepare talking points
RollbackAdd back $fee = 0, re-release

Current fee schedule → Withdrawal Rules Manual § Fee Rules


Scenario 6: Add New BST Bank

Example: Connect a new bank for BST

This is the most complex withdrawal change scenario, involving multiple services.

Development Checklist

StepWork ContentService/File Involved
1Bank-side agreement signing + technical protocol confirmationBusiness team
2Develop BST integration serviceNew Python/Go service (reference cmb_stock_trans)
3Develop SBA withdrawal orchestration adaptationsba_cash_withdraw_system add bank branch
4Add bank config in auto_settings tableDatabase + AutoSetting.php add bank_id mapping
5Add channel routing in Method.phpcalcMethod() add BST judgment branch
6Create new xxx_list tableBank-initiated withdrawal transaction storage
7Create new queue eventsSyncXxxWithdraw + XxxWithdrawCreate
8Mandate/agreement managementBank card service + BankCardXxxBst extension table
9Frontend channel displayApp deposit/withdrawal page adaptation
10Integration testingEnd-to-end: Agreement → Deposit → Withdrawal → Callback

Protocol Selection

ProtocolReferenceArrival TimeComplexity
Socket bidirectional link (SM2)CMB cmb_stock_transSeconds (real-time push)High
REST API + pollingAirstar airstar_serviceSeconds~minutesMedium

Approval Requirements

Business team (bank cooperation) + Tech lead + Risk control confirmation + Product confirmation

Reference Timeline

Integration MethodReference TimelineReference Service
Socket bidirectional link6~8 weekscmb_stock_trans (CMB)
REST API4~6 weeksairstar_service (Airstar)

Scenario 7: Add New FPS Withdrawal Channel

Example: Connect Standard Chartered's FPS withdrawal API (from manual to semi-auto)

DimensionDescription
What to changeUpgrade manual channel to semi-auto with API integration
Where to changeMultiple locations — see development checklist
Configuration typeCode development — requires full development cycle

Development Checklist

StepWork ContentFile Involved
1Create Go service to interface with bank FPS APINew xxx_fps_service (reference cgb_fps_service)
2Create new business class in PHPwithdraw/src/app/Business/Withdraw/XxxFpsBiz.php (reference CgbFpsBiz.php)
3Create new polling eventSyncXxxFpsResult (reference SyncCgbFpsResult)
4Add channel constant in Method.phpNew xxx_fps_api constant and group membership
5Create new status tracking tabletask_xxx_fps (reference task_cgb_fps)
6Adjust CRM displayChannel list, action buttons

Approval requirements: Tech lead + Product confirmation

Reference timeline: 3~4 weeks (including integration testing)

Channel execution details → Channel Execution Manual § FPS Channel


Scenario 8: Modify Processing Hours

Example: Extend Airstar processing hours from 08:00~22:00 to 07:00~23:00

DimensionDescription
What to changeAuto-processing time window for BST channel
Where to changeWithdrawal cron task scripts + time window checks in SBA orchestration
Configuration typeCron config + Code constant — requires ops deployment + code release
Impact chainWindow expanded → More time periods can auto-process withdrawals → Better user experience. But must confirm bank side accepts instructions during that period — if bank doesn't process, instructions will queue on bank side
Why it can't be changed arbitrarilyProcessing hours are aligned with bank business hours. If the system sends instructions during bank off-hours, the bank may return timeout or rejection
Verification methodSend a test withdrawal during the newly added time period, confirm bank processes normally
Approval requirementsProduct confirmation + Ops deployment + Must first confirm with bank their supported hours
RollbackRestore original time configuration

Current channel processing hours → Withdrawal Rules Manual § Processing Hours


Scenario 9: Add New Withdrawal Currency

Example: Add JPY (Japanese Yen) withdrawal

StepWork ContentFile Involved
1Add JPY columns to auto_settings tablejp_status, jp_amount, jp_max_amount etc. 6 fields
2Add prefix mapping in AutoSetting.phpNew jp_ prefix handling
3Add JPY fee rate in getFee()CreatorBase.php switch statement
4Support JPY in channel routingConfirm which channels support JPY withdrawal
5Frontend currency selectorApp withdrawal page add JPY option
6SBA configurationSBA system support JPY account balance operations

Prerequisite: Confirm which withdrawal channels support JPY. BST channels require bank confirmation on whether JPY BST is supported.

Approval requirements: Product confirmation + Clearing team confirmation + Tech lead

Reference timeline: 2~3 weeks


Scenario 10: Modify Withdrawal Notification Logic

Example: Change post-withdrawal success push notification to include receiving bank information

DimensionDescription
What to changeNotification copy and trigger logic
Where to changeNotification service configuration (not under withdraw service jurisdiction — withdraw only sends notification events)
Configuration typeDepends on notification service implementation
Impact chainCopy modification only affects user-facing display; trigger logic modification may affect notification timing and frequency
Special noteThe withdrawal system triggers notifications through SBA callbacks; when Task status updates to DONE, notification is sent. Modifying notification content does not require changing the withdrawal service, only the notification service template
Verification methodComplete a withdrawal in test environment, confirm notification content and channel
Approval requirementsProduct confirmation

Change Risk Matrix

ChangeTechnical RiskBusiness RiskChange TimelineSuggested Gradual Rollout
Adjust limitsLowHigh (large anomalies)ImmediateAdjust by bank x currency incrementally
Modify risk control rulesLowHigh (missed risks)1~3 daysRemove single factor first, observe 1 week
Modify approval templatesMediumHigh (missing approvals)1~3 daysGradual rollout to specific user group first
Adjust balance managementLowMediumImmediateAdjust one currency first and observe
Restore feesLowHigh (user experience)1~3 daysNot recommended for gradual rollout; needs full rollout synced with frontend display
Add BST bankHighMedium6~8 weeksNew bank goes live independently
Add FPS channelMediumLow3~4 weeksNew channel goes live independently
Modify processing hoursLowMedium0.5~1 dayExtend by 30 minutes first and observe
Add new currencyMediumLow2~3 weeksOpen by currency incrementally
Modify notificationsLowLow1~2 daysGradual push

I want to...Go to
Understand the complete withdrawal flowWithdrawal Lifecycle
See detailed explanation of each ruleWithdrawal Rules Manual
Look up what a status code meansWithdrawal Data Dictionary
See what deposit-side change scenarios existDeposit Change Guide
Understand a specific bank's integration detailsBank Capability Matrix
Was this page helpful?

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