3. Introduction
The SDK provides APIs for games to integrate the member system, payment system, and advertisement system of Wakool platform.
3.1. Game types
An important distinction for games is whether they require backend servers to play.
- Pure client games: without any server.
- Server-client games: required servers to function, capable of validating login or purchase data signature.
Depending on the game type, the process of integrating the SDK will vary. The most significant difference is that pure client games cannot accept server-to-server callbacks, and therefore, the payment system is not supported.
3.2. Integrating pure client games
Steps | Section | Integration process | Mandatory |
---|---|---|---|
1 | Initialization | Import SDK ↓ SDK loaded callback ↓ Obtain user info |
Yes |
2 | Report | Report game progress | Depends on necessity |
3 | Ads | Listening pause/resume events ↓ Play video ads |
Yes |
4 | Storage | Load game progress ↓ Save game progress |
Yes |
Download Pure Client Games Quickstart Guide (Word)
3.3. Integrating server-client games
Steps | Section | Integration process | Mandatory |
---|---|---|---|
1 | Initialization | Verify the signature of initial data ↓ Import SDK ↓ SDK loaded callback |
Yes |
2 | Report | Report character creation ↓ Report game progress |
Yes |
3 | Purchase | Listening purchase events ↓ Calling purchase API ↓ Receive payment callback |
Yes |
4 | Ads | Listening pause/resume events ↓ Play video ads |
Depends on necessity |
Download Server-Client Games Quickstart Guide (Word)
3.4. Prerequisites
- Please provide the following URL:
Login callback URL: This URL serves as the entry point for the game. Users will be redirected to it with their login information included in thequery parameters
.
3.4.1. Additional steps for server-client games
Please contact OP window to obtain the APP_SECRET
Please provide the following URL:
Payment callback URL: When a user makes a purchase successfully, Wakool platform will notify the game server by sending a POST request to this URL.
3.5. Sample code
The APIs mentioned in this document is demonstrated at the following URL: