Skip to content

提款(開發文檔)

最後更新:2026-04-10

📖 功能說明請參考 提款


架構

相關檔案

ViewController(5 個)
檔案說明
.../Withdraw/C/WithdrawDetailViewController.swift提款詳情
.../Withdraw/C/WithdrawViewModel.swift提款 ViewModel
.../UserInfo/C/BBVirtualWithdrawViewController.swift虛擬提款
.../UserInfo/C/BBAddVirtualAddressViewController.swift新增虛擬地址
.../UserInfo/C/BBScanViewController.swift掃碼

基礎路徑:BBSport/Tab/我的/Mine/

Model(5 個)
檔案說明
.../Withdraw/M/WithdrawInfoModel.swift提款資訊
.../Withdraw/M/WithdrawModel.swift提款記錄
.../Withdraw/M/WithdrawLastStatusModel.swift最新狀態
.../Withdraw/M/WithdrawStatusInput.swift狀態枚舉
.../Withdraw/V/Detail/WithdrawStatusEnums.swift狀態顏色枚舉

基礎路徑:BBSport/Tab/我的/Mine/

View(2 個)
檔案說明
.../Withdraw/V/BottomView/WithdrawTypeChannelView.swift通道限額顯示
BBSport/Tab/我的/Mine/Helpers/HttpService.swift提交提款(Service)
API Request(13 個)
檔案說明
.../User/Address/USDT/STAPI+WithdrawalUSDTAddressRequest.swiftUSDT 地址
.../User/Address/TB/STAPI+WithdrawalTBAddressRequest.swiftTB 地址
.../User/Address/TBU/STAPI+WithdrawalTBUAddressRequest.swiftTBU 地址
.../User/Address/EB/STAPI+WithdrawalEBAddressRequest.swiftEB 地址
.../User/STAPI+WithdrawalCryptoSortRequest.swift加密貨幣排序
.../Withdraw/STAPI+WithdrawLastStatusRequest.swift最新狀態
.../Withdraw/STAPI+WithdrawRateRequest.swift匯率
.../Withdraw/STAPI+ReserveInfoRequest.swift預約配置
.../Withdraw/STAPI+WithdrawSubmitConfirmReceiveRequest.swift確認到帳
.../Withdraw/STAPI+C2CSubmitConfirmReceiveRequest.swiftC2C 確認到帳
.../Withdraw/STAPI+C2CSplitSubmitConfirmReceiveAllRequest.swiftC2C 拆單全部確認
.../User/BankCard/STAPI+UserBankCardRequest.swift銀行卡列表
.../User/BankCard/STAPI+SupportBankRequest.swift支援銀行

基礎路徑:BBSport/API/STAPI/

銀行卡 API(3 個)
檔案說明
BBSport/API/STAPI/User/BankCard/STAPI+AddBankCardRequest.swift新增銀行卡
BBSport/API/STAPI/User/BankCard/STAPI+DeleteBankCardRequest.swift刪除銀行卡
BBSport/API/STAPI/Transfer/STAPI+TransferInfoRequest.swift轉帳資訊

API

銀行卡管理


用戶已綁定銀行卡

POST api/forehead/fund/userbankcard/list — urlForm — STAPI.UserBankCardRequest

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
nameString持卡人姓名
cardList[BankCard]已綁定的銀行卡列表

BankCard 欄位:bankId(Int), bankName(String), bankLogo(String), cardId(Int), cardNo(String), status(Int, 2=人工審核中), canDelete(Bool)


支援銀行列表

POST api/forehead/fund/userbankcard/supportBankList — urlForm — STAPI.SupportBankRequest

無參數,靠 Header token/uid 認證。

Response: data: [Bank]

欄位型別說明
bankIdInt銀行 ID
bankNameString銀行名稱
bankLogoString銀行 Logo

新增銀行卡

POST api/forehead/fund/userbankcard/v2/bindcard — urlForm — STAPI.AddBankCardRequest

參數型別必填說明
namestring真實姓名
bankIdstring銀行 ID
cardNostring銀行卡號
codestring驗證碼

Response: 無 data,僅含 code 和 message。


申請人工新增銀行卡

POST api/forehead/fund/userbankcard/v2/apply/bindcard — urlForm — STAPI

參數型別必填說明
namestring真實姓名
bankIdstring銀行 ID
cardNostring銀行卡號
codestring驗證碼
imagePathstring銀行卡照片路徑(人工審核用)

Response: 無 data,僅含 code 和 message。


刪除銀行卡

POST api/forehead/fund/userbankcard/delete — urlForm — STAPI.DeleteBankCardRequest

參數型別必填說明
cardIdint銀行卡 ID
codestring驗證碼

Response: 無 data,僅含 code 和 message。


數字貨幣地址


USDT 地址查詢

POST api/forehead/fund/user/usdt/list — urlForm — STAPI.WithdrawalUSDTAddressRequest

無參數,靠 Header token/uid 認證。

Response: data: [AddressInfo]

欄位型別說明
idInt地址 ID
nickNameString地址暱稱
addressString錢包地址
protocolString協議名稱(如 TRC20)
statusInt狀態
userIdInt用戶 ID
userNameString用戶名
createDateDouble建立時間

USDT 協議列表查詢

POST api/forehead/fund/user/usdt/protocol/list — urlForm — STAPI

無參數,靠 Header token/uid 認證。

Response: data: [GeneralCryptoProtocol]

欄位型別說明
protocolString協議名稱(如 TRC20, ERC20)
messageString協議說明訊息

TB 地址查詢

POST api/forehead/fund/user/tb/list — urlForm — STAPI.WithdrawalTBAddressRequest

無參數,靠 Header token/uid 認證。

Response:USDT 地址查詢


TBU 地址查詢

POST api/forehead/fund/user/tbu/list — urlForm — STAPI.WithdrawalTBUAddressRequest

無參數,靠 Header token/uid 認證。

Response:USDT 地址查詢


EB 地址查詢

POST api/forehead/fund/user/eb/list — urlForm — STAPI.WithdrawalEBAddressRequest

無參數,靠 Header token/uid 認證。

Response:USDT 地址查詢


加密貨幣提款排序

POST api/forehead/fund/user/tb/digiCoin/sort — urlForm — STAPI.WithdrawalCryptoSortRequest

無參數,靠 Header token/uid 認證。

Response: data: [CryptoSort]

欄位型別說明
coinString幣種代碼(如 USDT, TB, EB, TBU)
sortInt排序順序

省份列表

POST api/forehead/system/area/load — urlForm — STAPI

無參數,靠 Header token/uid 認證。

Response: data: [Province],包含省份 ID 和名稱。


提款提交


提交提款申請

POST api/forehead/fund/withdraw/submit — urlForm — HttpService

參數型別必填說明
amountdouble提款金額
typestring提款類型代碼
orgSubmitTypeint提款方式(1=銀行卡, 2=普通, 3=C2C, 4=USDT, 6=EB, 21=TB, 22=TBU)
cardIdint銀行卡 ID(法幣提款)
usdtId / ebId / tbId / tbuIdint數字貨幣地址 ID
codestring驗證碼
durationIdint預約提款時段 ID
reallyNamestring真實姓名(隱私模式首次提款)

Response: 無 data,僅含 code 和 message。成功後呼叫 WithdrawLastStatusRequest 取得新訂單。


提款最新狀態

POST api/forehead/fund/withdraw/last/status — urlForm — STAPI.WithdrawLastStatusRequest

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
bankCards[WithdrawBankModel]用戶銀行卡列表
onOffString是否開啟驗證(寫死為 "1")
telephoneString綁定的手機號
withdraws[WithdrawModel]提款記錄列表
receivedMoneyBool確認收款按鈕是否已按過
isC2CSplitWithdrawOpenBool是否開啟 C2C 拆單功能
totalFeeDoubleC2C 拆單手續費總合
currentStepInt進度條(1=申請, 2=等待付款, 3=待確認到帳, 4=提款完成)
activityMessageString提款超時補償文案
WithdrawModel 完整欄位
欄位型別說明
addressString提款地址
amountDouble提款金額
bankNameString銀行名稱
cardNoString銀行卡號
createDateIntervalInt(private)建立時間戳,透過 createDate 計算屬性取得格式化字串
feeDouble手續費
nameString持卡人姓名
orderIdString訂單號
statusWithdrawStatusInput訂單狀態(枚舉,-3~16,共 19 種)
isSeletedBool是否被選中
isShowPayerInfoBool是否顯示付款人
showTypeString(private)提款類型,"BANK" 為銀行卡,其他為虛擬幣
usdtAddressStringUSDT 錢包地址
usdtNameStringUSDT 地址暱稱(JSON key: nickName
usdtAmountDoubleUSDT 金額
usdtRateDoubleUSDT 匯率(JSON key: rate
orgSubmitTypeInt提款方式(1=銀行卡, 3=C2C, 4=USDT, 6=EB, 21=TB, 22=TBU)
alertTimeInt極速轉卡提醒時間
paymentDateInt(private)付款時間戳
expiredDateInt收款超時時間類型
receiveTimeoutInt收款超時時間數值
expiredTtlInt倒計時剩餘秒數
awardAmountInt最高可領取紅利
isReserveWithdrawBool是否預約提款
displayStatusWithdrawDisplayStatusInput展示用狀態(1=失敗, 2=成功, 3=已確認, 4=處理中, 7=確認收款)
payerString付款人姓名
WithdrawBankModel 完整欄位
欄位型別說明
bankIdInt銀行 ID
bankNameString銀行名稱
cardIdInt銀行卡 ID
cardNoString銀行卡號
nameString持卡人姓名
selectedInt是否選中(0=未選中, 1=選中)

提款資訊(含限額)

POST api/forehead/fund/withdraw/info/new — urlForm — HttpService

用途

進入提款頁時載入,取得限額、手續費配置、可用渠道。

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
cardList[WithdrawBankModel]綁定銀行卡列表
nameString用戶姓名
mobileString手機號
withdrawTimesInt提款次數
needSmsBool是否需要驗證碼
leftAmountDouble剩餘需完成流水金額
withdrawSumAmountDouble今日已提款總額
generalConfigGeneralConfig?普通提款限額配置
quickConfigGeneralConfig?大額提款限額配置
bankWithdrawOpenBool銀行卡提款是否開啟
c2CWithdrawOpenBoolC2C 提款是否開啟
c2CWithdrawConfigWithdrawSpeedModel?C2C 提款配置
withdrawSwitch[WithdrawSwitch]提款方式開關陣列

提款是否關閉

POST api/forehead/fund/withdraw/isClosed — urlForm — HttpService

無參數,靠 Header token/uid 認證。

Response: 原始 JSON Dictionary

欄位型別說明
bankWithdrawOpenBool銀行卡提款是否開啟
withdrawCloseTitleString銀行卡維護時的標題
withdrawCloseValueString銀行卡維護時的內容說明

此 API 用於進入提款頁前檢查銀行卡提款是否處於維護狀態。若 bankWithdrawOpen=false,顯示維護提示。


提款匯率查詢

POST api/forehead/fund/withdraw/rate — urlForm — STAPI.WithdrawRateRequest

參數型別必填說明
coinstring幣種代碼(如 "USDT", "EB", "TB", "TBU"

Response: dataDouble,即時匯率。


預約提款配置

POST api/forehead/fund/withdraw/reserve/config/get — urlForm — STAPI.ReserveInfoRequest

無參數,靠 Header token/uid 認證。

Response:

欄位型別說明
c2cReserveWithdrawOpenInt專屬提款預約是否開啟(1=開啟)
c2cTimelyWithdrawDurationDouble專屬即時提款時間
c2cReserveWithdrawDuration[AppointmentModel]專屬預約時段列表
normalReserveWithdrawOpenInt普通提款預約是否開啟
normalTimelyWithdrawDurationDouble普通即時提款時間
normalReserveWithdrawDuration[AppointmentModel]普通預約時段列表
usdtReserveWithdrawOpenIntUSDT 提款預約是否開啟
usdtReserveWithdrawDuration[AppointmentModel]USDT 預約時段列表
extAppointmentExt?擴展條件(VIP 限額等)

AppointmentModel 欄位:durationId(Int), startDuration(Double), endDuration(Double), appoinmentRate(String, 預約加送率), isReserve(Bool)


確認到帳


提款訂單確認到帳

POST api/forehead/fund/withdraw/submit/confirm/receive — urlForm — STAPI.WithdrawSubmitConfirmReceiveRequest

參數型別必填說明
orderIdstring提款訂單 ID

Response: 無 data,僅含 code 和 message。


C2C 訂單確認到帳

POST api/forehead/fund/c2c/submit/confirm/receive — urlForm — STAPI.C2CSubmitConfirmReceiveRequest

參數型別必填說明
orderIdstringC2C 訂單 ID

Response: 無 data,僅含 code 和 message。


C2C 拆單全部確認到帳

POST api/forehead/fund/c2c/split/submit/confirm/receive/all — urlForm — STAPI.C2CSplitSubmitConfirmReceiveAllRequest

參數型別必填說明
orderIdstring父訂單 ID(parentOrderId,key 為 orderId

Response: 無 data,僅含 code 和 message。


C2C 確認付款

POST api/forehead/fund/c2c/submit/confirm/payment — urlForm — HttpService

無參數,靠 Header token/uid 認證。

Response: 無 data,僅含 code 和 message。


C2C 催單

POST api/forehead/fund/c2c/submit/hasten — urlForm — HttpService

無參數,靠 Header token/uid 認證。

Response: 無 data,僅含 code 和 message。


C2C 拆單明細

POST api/forehead/data/balance/load/withdraw/splitOrder — urlForm — STAPI

參數型別必填說明
orderIdstring訂單 ID

Response: data: [BBCapitaDetailListModel],詳見資金明細 Response。


C2C 彩蛋資訊

POST api/forehead/fund/c2c/get/egg/info — urlForm — STAPI

無參數,靠 Header token/uid 認證。

Response: data 為 JSON 字串,彩蛋活動配置資訊。


錢包轉帳


用戶錢包資訊(TransferInfo)

POST api/forehead/gamebet/transfer/info — urlForm — STAPI.TransferInfoRequest

用途

取得用戶各場館錢包餘額,提款前需先將場館餘額轉入中心錢包。

無參數,靠 Header token/uid 認證。

Response: data: BBTransferModel,包含各場館錢包餘額和轉帳狀態。

檔案位置:BBSport/API/STAPI/Transfer/STAPI+TransferInfoRequest.swift


驗證碼


提款驗證碼

POST api/forehead/user/setting/withdraw/validate/get/code — urlForm — STAPI

參數型別必填說明
typestring固定值 "cash"
lotNumber / captchaOutput / passToken / genTimestring極驗四件組

Response: 無 data,僅含 code 和 message。


提款安全驗證碼

POST api/forehead/user/setting/withdraw/validate/switch/get/code — urlForm — STAPI

參數型別必填說明
typestring固定值 "cash_security"
lotNumber / captchaOutput / passToken / genTimestring極驗四件組

Response: 無 data,僅含 code 和 message。


金額限制與手續費

關鍵數字

  • 每種數字貨幣最多 5 個地址
  • 匯率精度:USDT/TB/TBU = 4 位小數、EB = 2 位小數
  • 手續費上限為 feeLimit(為 0 表示無上限)

提款通道分級

通道說明
普通提現generalConfig — 標準額度範圍
大額提現quickConfig — 更高的上限額度

GeneralConfig 核心欄位

欄位型別說明
minLimit / maxLimitDouble法幣最低/最高提款金額
usdtMinLimit / usdtMaxLimitDouble數字幣整體最低/最高限額
usdtLimits[UsdtLimitModel]按協議區分的限額
amountLimitDouble提款總額度上限
leftWithdrawCountInt當日剩餘提款次數
freeTimes / leftFreeCountInt免手續費總次數 / 剩餘次數
feeTypeWithdrawFeeType.percent.fix
feeDouble手續費率/固定金額
feeLimitDouble手續費上限(0=無上限)

手續費計算

  1. leftFreeCount > 0 → 手續費 = 0
  2. .percentfee = amount * fee / 100
  3. .fixfee = fee
  4. 結果 > feeLimitfeeLimit != 0 → 封頂為 feeLimit

C2C 限額(WithdrawSpeedModel)

欄位說明
amountLimit當日提現金額上限
withdrawDailyUseLimit當日提現次數上限
leftWithdrawCount當日剩餘次數
multiple提現流水倍數
amounts / amountTags快捷金額選項與文案
withdrawHandlingFeeType1=百分比 / 2=固定金額
withdrawHandlingFeeValue手續費費率/金額
withdrawHandlingFeeMax手續費上限
matchWaitTime匹配等待時間

提款訂單狀態碼(19 個)
狀態碼名稱前端歸類
-3風險待審核處理中
-2風險審核拒絕失敗
0風險審核通過,待出款處理中
1已出款 / 提現成功成功
2拒絕出款 / 提現失敗失敗
3申請退回處理中
4拒絕提現,資金已退回失敗
5不處理,資金不退回失敗
6申請強制成功中處理中
7待處理處理中
8已強制成功成功
9拒絕強制成功失敗
10三方自動出款中處理中(v4.7.6 後不再使用)
11出款專員處理中處理中
12超時未確認處理中(v4.7.6 後不再使用)
13部分退回中處理中(v4.7.6 後不再使用)
14部分退回成功成功(v4.7.6 後不再使用)
15待確認到帳確認收款
16待付款確認收款

完整狀態流轉圖


法幣 vs 數字貨幣差異

項目法幣(銀行卡/C2C)數字貨幣(USDT/TB/TBU/EB)
限額來源minLimit / maxLimitusdtMinLimit / usdtMaxLimit 或依協議從 usdtLimits
匯率不適用各幣種獨立匯率,精度 USDT/TB/TBU=4位、EB=2位
地址管理銀行卡列表錢包地址管理頁,每種幣最多 5 個地址
提交參數cardIdusdtId / ebId / tbId / tbuId

實作重點

  • 提款類型配置:遍歷 withdrawSwitch,過濾 status == "1" 的啟用項,數字貨幣 Tab 固定在最後
  • 數字貨幣引導:首次 + 多渠道 + 有數字貨幣渠道 → 顯示引導
  • 隱私模式首次提款privacyMode == truename 為空 → 引導設定真實姓名
  • 銀行卡狀態status == 2 表示人工審核中,不可用於提款
  • 流水要求leftAmount > 0 表示有未完成流水,提示用戶