One Wallet Introduction
In the buffalo game, we don't own the wallet. Each game behavior will need to trigger the operator server to handle the cash flow. For example, bet, settle, and the cancel the bet.
How to integrate
- The operator implement six APIs on the dev env (check/ balance/ credit/ debit/ cancel/ sid) (The sid API should be only implemented on the dev env)
- Offer the token, test user id, and the one-wallet API endpoint on the dev env to the Buffalo game support team.
- The request from the buffalo game will attach this token in the method parameter 'authToken' and in the auth header attribute 'Authorization' by Bearer Token Format
- Verify the integration can work well
- Enable five APIs on the PROD env. (check/ balance/ credit/ debit/ cancel) (Not include sid API)
- Offer the token and one-wallet endpoint on the PROD env to the buffalo game support team.
- The token format: max length is 40 and only accept character in (A-Z,a-z,0-9,-,_)
- The request from the buffalo will attach this token in the method parameter 'authToken' and in the auth header attribute 'Authorization' by Bearer Token Format
- Use the test account on the PROD to verify the integration
Auth example
Below is the request example that Buffalo Game will send to the operator's one-wallet endpoint
Auth Example (Balance)
POST
/v1/balancecurl --location '$OPERATOR_SERVER_DOMAIN?authToken=9908acb31692eae72322a7a5f06e2a80' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 9908acb31692eae72322a7a5f06e2a80' \
--data '{
"uuid": "test_uuid",
"userId": "balance_test_userId",
"sid": "7479dd28ec544526ac17b60d36f176bc"
}'
Method Table
| Method | Description |
|---|---|
| Balance | The buffalo game will use this API to get the user's balance. |
| Check | The buffalo game will use this API to check the user's sid is valid. |
| Cancel | The buffalo game will use this API for canceling the debit request. It will be used when Buffalo Game can't get the response from the debit request. (Request timeout or 5xx http status code) |
| Debit | The buffalo game will use this API when user place the bet |
| Credit | The buffalo game will use this API when user settle the bet |
| Sid | The buffalo game will use this API on the dev env to test the integration. It should create a new sid for the test user. |