Brokeret LogoDocs
Forex CRM / Treasury/Settings

Settings

Global deposit, withdrawal, and transfer configuration.

Overview

Treasury Settings allow you to configure deposits, withdrawals, transfers, vouchers, and payment methods to match your business requirements.

Admin URL: /admin/treasury/settings

Settings Categories

Deposit Settings

Location: Treasury > Settings > DepositsURL: /admin/treasury/settings/deposits

Configure deposit behavior:

  • Availability controls (enable/disable, maintenance mode)
  • Verification requirements (KYC above threshold, email verification above threshold)
  • Notification settings
  • Custom messages

Note: Deposit limits (min/max amounts), fees, and payment proof requirements are configured per Deposit Method, not globally. See the Deposit Settings section below for details.

Withdrawal Settings

Location: Treasury > Settings > WithdrawalsURL: /admin/treasury/settings/withdrawals

Configure withdrawal behavior including limits, verification requirements, security controls, and notifications. See the detailed Withdrawal Settings section below.

Transfer Settings

Location: Treasury > Settings > TransfersURL: /admin/treasury/settings/transfers

Configure internal transfers:

  • Enable/disable transfer types
  • Minimum/maximum amounts
  • Transfer fees
  • Instant vs delayed processing

Deposit Settings (Detailed)

Location: Treasury > Settings > DepositsURL: /admin/treasury/settings/depositsController: App\Http\Controllers\Admin\Treasury\SettingsController@depositsStorage: Uses generic Setting model with deposit_* prefix

Availability Controls

SettingKeyTypeDescriptionDefault
Deposits Enableddeposit_enabledbooleanMaster switch to enable/disable all depositstrue
Maintenance Modedeposit_maintenance_modebooleanTemporarily disable deposits for maintenancefalse
Maintenance Messagedeposit_maintenance_messagestringMessage shown to users during maintenanceempty

Verification Requirements

Threshold-based verification - set to 0 to disable.

SettingKeyTypeDescriptionDefault
Require KYC Abovedeposit_require_kyc_aboveintegerRequire KYC for deposits above this amount0
Require Email Verification Abovedeposit_require_email_verification_aboveintegerRequire email verification above this amount0

Notifications

SettingKeyTypeDescriptionDefault
Notify Admindeposit_notify_adminbooleanNotify when deposit is submittedtrue
Notify Userdeposit_notify_userbooleanNotify when deposit is approved/rejectedtrue
Notify Staff via Email Abovedeposit_notify_staff_above_amountintegerSend email to staff with "Receive Email Notifications" permission for deposits above this amount. 0 = disabled.0

Note: Staff email notifications are sent to Treasury staff whose role includes the "Receive Email Notifications" permission. Configure roles in Settings > Teams & Roles.

Messages

SettingKeyTypeDescriptionDefault
Processing Messagedeposit_processing_messagestringShown when deposit is pending"Your deposit is being processed."
Success Messagedeposit_success_messagestringShown when deposit is approved"Your deposit has been approved!"

Important Notes

  1. No deposit limits in global settings - Min/max amounts are configured per Deposit Method
  2. No auto-approval settings - Auto-approval happens via payment gateway webhooks
  3. No payment proof settings - Configured per Deposit Method
  4. Uses integers - All amount thresholds are whole numbers (no decimals)

Withdrawal Settings (Detailed)

Location: Treasury > Settings > WithdrawalsURL: /admin/treasury/settings/withdrawalsController: App\Http\Controllers\Admin\Treasury\SettingsController@withdrawalsModel: App\Models\WithdrawalSettingDatabase Table: withdrawal_settings

Technical Architecture

The withdrawal system uses two main models:

  1. WithdrawalSetting - Global settings (singleton pattern, cached for 24 hours)
  2. UserWithdrawalLimit - Per-user overrides

Limit enforcement happens in:

  • App\Services\WithdrawalMethodService::validateWithdrawal()
  • App\Services\WithdrawalMethodService::checkCumulativeLimits()

Availability Controls

SettingDatabase ColumnTypeDescriptionDefault
Withdrawals EnabledenabledbooleanMaster switch to enable/disable all withdrawalstrue
Maintenance Modemaintenance_modebooleanTemporarily disable withdrawals for maintenancefalse
Maintenance Messagemaintenance_messagetextCustom message shown to users during maintenancenull

Default User Limits

These limits apply to all users unless overridden at the user level. Set to 0 for unlimited.

⚠️
WarningSetting any withdrawal limit to 0 means unlimited. Make sure this is intentional — users will have no cap on withdrawal amounts for that period. Consider starting with conservative limits and increasing as needed.
SettingDatabase ColumnTypeDescriptionDefault
Daily Limitdefault_user_daily_limitintegerMaximum withdrawal amount per day0 (Unlimited)
Weekly Limitdefault_user_weekly_limitintegerMaximum withdrawal amount per week0 (Unlimited)
Monthly Limitdefault_user_monthly_limitintegerMaximum withdrawal amount per month0 (Unlimited)

Important: Values are stored as integers (whole numbers). No decimal amounts for limits.

Verification Requirements

SettingDatabase ColumnTypeDescriptionDefault
Require KYC Aboverequire_kyc_aboveintegerRequire KYC for amounts above this. 0 = disabled.0
Require 2FA Aboverequire_2fa_aboveintegerRequire 2FA for amounts above this. 0 = disabled.0

Security & Fraud Prevention

SettingDatabase ColumnTypeDescriptionDefault
Suspicious Amount Thresholdsuspicious_amount_thresholdintegerFlag withdrawals above this for review10000
Flag New Accounts (Days)flag_new_accounts_daysintegerFlag withdrawals from new accounts7
Cooldown Between Requestscooldown_between_requestsintegerMinutes between requests. 0 = no cooldown.0
💡
TipConfigure the suspicious amount threshold based on your typical transaction volume. Start with a lower threshold and adjust upward as you build confidence in your user base. Combine this with the new account flag to catch fraudulent activity early.

Whitelisting Settings

SettingDatabase ColumnTypeDescriptionDefault
Require Global Whitelistingwhitelist_enabledbooleanUsers must whitelist addressesfalse
Whitelist Approval Requiredwhitelist_approval_requiredbooleanAdmin must approve addressestrue
Whitelist Cooldown (Hours)whitelist_cooldown_hoursintegerHours before address can be used24

Request Limits & Notifications

SettingDatabase ColumnTypeDescriptionDefault
Max Pending Per Usermax_pending_per_userintegerMax pending requests per user5
Notify Admin on Requestnotify_admin_on_requestbooleanNotify on new withdrawaltrue
Notify User on Status Changenotify_user_on_status_changebooleanNotify on approval/rejectiontrue
Notify Admin on Large Amountnotify_admin_on_large_amountintegerAlert threshold5000

Per-User Withdrawal Limits

Location: Admin > Users > [User Profile] > Withdrawal Limits (sidebar card)URL: /admin/users/{id} (sidebar card with settings modal)Controller: App\Http\Controllers\Admin\UserController@updateWithdrawalLimitsModel: App\Models\UserWithdrawalLimitDatabase Table: user_withdrawal_limitsRoute: PATCH/admin/users/{user}/withdrawal-limits

Purpose

Override default withdrawal limits for individual users:

  • VIP clients who need higher limits
  • High-risk accounts that need restrictions
  • Temporarily restricting a user's withdrawals

Database Schema

user_withdrawal_limits
├── id
├── user_id (FK to users)
├── daily_limit (integer, nullable) - null = use default
├── weekly_limit (integer, nullable) - null = use default
├── monthly_limit (integer, nullable) - null = use default
├── auto_approve_enabled (boolean, nullable)
├── auto_approve_max_amount (integer, nullable)
├── max_pending_requests (integer, nullable)
├── withdrawals_enabled (boolean, default: true)
├── restriction_reason (string, nullable)
├── restricted_until (datetime, nullable)
├── trust_level (string: standard|trusted|vip)
├── skip_cooldown (boolean)
├── skip_whitelist_approval (boolean)
├── admin_notes (text, nullable)
└── timestamps

Available Per-User Settings

SettingDatabase ColumnTypeDescription
Withdrawals Enabledwithdrawals_enabledbooleanEnable/disable for this user
Daily Limit (Custom)daily_limitinteger/nullOverride daily limit. null = use default.
Weekly Limit (Custom)weekly_limitinteger/nullOverride weekly limit. null = use default.
Monthly Limit (Custom)monthly_limitinteger/nullOverride monthly limit. null = use default.
Max Pending Requestsmax_pending_requestsinteger/nullOverride max pending for this user
Restriction Reasonrestriction_reasonstringMessage shown when disabled

How Limits Are Resolved

The UserWithdrawalLimit model has methods to get effective limits:

// Get effective daily limit for a user
$userLimits = UserWithdrawalLimit::getForUser($userId);
$effectiveDaily = $userLimits->getEffectiveDailyLimit();
// Returns: custom limit if set, otherwise default from WithdrawalSetting

Priority Order:

  1. User's custom limit (if set and not null)
  2. Global default limit from withdrawal_settings table
  3. 0 = Unlimited

Limit Enforcement Logic

Limits are checked in WithdrawalMethodService::checkCumulativeLimits():

  1. Daily limit: Sum of withdrawals (pending + processing + success) created today
  2. Weekly limit: Sum of withdrawals created this week (Monday to Sunday)
  3. Monthly limit: Sum of withdrawals created this month

Statuses counted toward limits: pending, processing, success


API Reference

Update Withdrawal Settings

PUT/admin/treasury/settings/withdrawals

Parameters:
- enabled: boolean
- maintenance_mode: boolean
- maintenance_message: string (optional)
- default_user_daily_limit: integer (0 = unlimited)
- default_user_weekly_limit: integer (0 = unlimited)
- default_user_monthly_limit: integer (0 = unlimited)
- require_kyc_above: integer (0 = disabled)
- require_2fa_above: integer (0 = disabled)
- suspicious_amount_threshold: integer
- flag_new_accounts_days: integer
- cooldown_between_requests: integer (minutes, 0 = disabled)
- whitelist_enabled: boolean
- whitelist_approval_required: boolean
- whitelist_cooldown_hours: integer
- max_pending_per_user: integer
- notify_admin_on_request: boolean
- notify_user_on_status_change: boolean
- notify_admin_on_large_amount: integer

Update Per-User Withdrawal Limits

PATCH/admin/users/{user}/withdrawal-limits

Parameters:
- withdrawals_enabled: boolean
- daily_limit: integer|null (null = use default, 0 = unlimited)
- weekly_limit: integer|null
- monthly_limit: integer|null
- max_pending_requests: integer|null
- restriction_reason: string|null

Common Issues & Troubleshooting

Issue: User hitting 5000 limit but settings show 0 (unlimited)

Cause: Old database value from before the migration to unlimited defaults.Solution: Run migration or manually update withdrawal_settings table:

UPDATE withdrawal_settings SET default_user_daily_limit = 0;

Issue: User has custom limit but still using default

Cause: Custom limit field is empty/null, so default is used.Solution: Check user_withdrawal_limits table - null values use defaults. Set explicit value if needed.

Issue: Limits not taking effect immediately

Cause: WithdrawalSetting model is cached for 24 hours.Solution: Clear cache after updating settings:

Cache::forget('withdrawal_settings_singleton');

Or run: php artisan cache:clear

Issue: User sees "Daily limit exceeded" but hasn't withdrawn today

Cause: Pending and processing withdrawals count toward limits.Solution: This is expected behavior. Limits include all non-failed withdrawals.


Models

  • app/Models/WithdrawalSetting.php - Global withdrawal settings
  • app/Models/UserWithdrawalLimit.php - Per-user limit overrides
  • app/Models/WithdrawalMethod.php - Withdrawal payment methods

Controllers

  • app/Http/Controllers/Admin/Treasury/SettingsController.php - Settings CRUD
  • app/Http/Controllers/Admin/UserController.php - Per-user limits

Services

  • app/Services/WithdrawalMethodService.php - Withdrawal validation & limits

Views

  • resources/views/admin/treasury/settings/withdrawals/index.blade.php - Settings UI
  • resources/views/admin/users/show.blade.php - User profile with limits card

Migrations

  • database/migrations/2026_01_04_163800_create_withdrawal_settings_table.php
  • database/migrations/*_create_user_withdrawal_limits_table.php
  • database/migrations/2026_01_26_112021_update_withdrawal_settings_limits_to_unlimited.php

Best Practices

  1. Start unlimited, add limits as needed: Default to 0 (unlimited) and add restrictions only when required
  2. Use per-user limits for exceptions: Don't change global settings for individual cases
  3. Enable notifications: Keep admin notifications enabled for large amounts
  4. Consider whitelisting: For high-security environments, require address whitelisting
  5. Set reasonable cooldowns: Prevent rapid successive withdrawals with cooldown periods
  6. Document restrictions: Always add a reason when restricting a user's withdrawals
  7. Review settings periodically: Adjust limits based on business growth and risk assessment
  8. Clear cache after changes: Run php artisan cache:clear after direct database updates
  9. Use integers only: Limits are stored as integers, no decimal amounts

Quick Reference

To Remove All Withdrawal Limits

Treasury > Settings > Withdrawals
Set all limits to 0 (Daily, Weekly, Monthly)
Save

To Restrict a Specific User

Admin > Users > [Select User]
Sidebar > Withdrawal Limits > Settings icon
Disable "Withdrawals Enabled"
Add restriction reason
Save

To Set VIP Limits for a User

Admin > Users > [Select User]
Sidebar > Withdrawal Limits > Settings icon
Set custom Daily/Weekly/Monthly limits (higher than default)
Save

To Enable Maintenance Mode

Treasury > Settings > Withdrawals
Enable "Maintenance Mode"
Enter maintenance message
Save

Next Steps

  • Deposits — Managing and approving deposit requests
  • Withdrawals — Processing withdrawal payouts
  • Payment Methods — Configure per-method limits, fees, and smart filters
  • Transfers — Internal and external transfer management
  • Vouchers — Pin-based recharge code system