錢包協作約定
本章將從遊戲的完整流程出發,詳細說明 Licensee 與 Game Provider 如何進行分工
遊戲生命週期
協作模式
在步驟 4、7、13、15、20、24,分別由 Game Provider 對 Licensee 發出:
POST /api/check:確認 Player 資訊與餘額POST /api/debit:Player 下注POST /api/cancel:取消下注POST /api/credit:派彩給 PlayerPOST /api/promo_payout:派彩給 Player (非遊戲邏輯)POST /api/close:關閉遊戲連線
無縫錢包
倘若使用無縫錢包的作為整合模式,以下三個 API 為必須實作:
POST /api/checkPOST /api/debitPOST /api/credit
- 在 Player 進遊戲後,下注前,Game Provider 會對 Licensee 發出
/api/check請求 - 在 Player 在每一局遊戲下注時,Game Provider 都會對 Licensee 發出
/api/debit請求 - 在遊戲結算時,Game Provider 會對Licensee 發出
/api/credit請求
其餘的 API
對於 cancel 與 close 請求,將由 Licensee 提供明確的處理流程,如果您希望於特定的情境發出請求,請與 Game Provider 聯繫
考慮以下情境:
- Game Provider 重送下注時,Licensee 會回覆
BET_ALREADY_EXISTS,則 Game Provider 不會發出cancel請求 - Licensee 希望 Player 退出遊戲時, Game Provider 通知 Licensee,則會發出
close請求 - Licensee 希望 Jackpot、促銷遊戲等,使用
promo_payout通知
諸如以上情境,Game Provider 將針對不同的 Licensee 處理,需由雙方確認規格
轉帳錢包
倘若使用轉帳錢包的作為整合模式,須處理另外兩個 API:
POST /api/deposit:轉入金額至 Game Provider 子錢包POST /api/withdrawal:從 Game Provider 子錢包提取金額
對於轉帳錢包,debit , cancel , credit 皆不會在遊戲過程中對 Licensee 發出。
deposit, withdrawal 則為 Licensee 必須處理的 API。