跳转至

錢包協作約定

本章將從遊戲的完整流程出發,詳細說明 LicenseeGame Provider 如何進行分工

遊戲生命週期

Game Lifecycle

協作模式

在步驟 4、7、13、15、20、24,分別由 Game ProviderLicensee 發出:

  • POST /api/check:確認 Player 資訊與餘額
  • POST /api/debitPlayer 下注
  • POST /api/cancel:取消下注
  • POST /api/credit:派彩給 Player
  • POST /api/promo_payout:派彩給 Player (非遊戲邏輯)
  • POST /api/close:關閉遊戲連線

無縫錢包

倘若使用無縫錢包的作為整合模式,以下三個 API 為必須實作:

  • POST /api/check
  • POST /api/debit
  • POST /api/credit

  1. Player 進遊戲後,下注前,Game Provider 會對 Licensee 發出 /api/check 請求
  2. Player 在每一局遊戲下注時,Game Provider 都會對 Licensee 發出 /api/debit 請求
  3. 在遊戲結算時,Game Provider 會對Licensee 發出 /api/credit 請求

其餘的 API

對於 cancelclose 請求,將由 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。