1. Integration Service
<Quantum> Milf Master
  • API
  • General Information
    • Change Log
    • Server Structure
  • Integration Service
    • 1. Version History
    • 2. Introduction
    • 3. Launching MilfMasters Game Client
    • 4. Wallet API
    • Verify Session
      POST
    • Get Balance
      POST
    • Withdraw
      POST
    • Confirm Withdraw
      POST
    • Rollback Withdraw
      POST
  • Entry Point
    • Entry Sequence
    • Entry Point
  • Payment
    • Payment Sequence
    • Payment Initiation
    • Payment Callback
    • Payment Callback API
      POST
    • Query Withdrawal
      POST
  • Data Types
    • Data Types
  • Schemas
    • Error Response Body
    • Balance Amount
  1. Integration Service

4. Wallet API

The Wallet API is used for player and wallet calls such as query player information or withdraw credits from player’s wallet.
The API is RESTful and parameters should be sent in the POST body using content type application/json. Authentication against the API is accomplished by using HTTP basic authentication (see https://en.wikipedia.org/wiki/Basic_access_authentication) and optionally IP whitelisting.
The Wallet API is served via secure HTTPS.
All requests have a base URL part, e.g. https://wallet.quantum-web-backend.com/wallet/, followed by an endpoint, e.g. https://wallet.quantum-web-backend.com/wallet/verifySession.
When the MilfMasters Backend access an endpoint at Quantum Web Backend, an Authorization: Basic xxxxxxxxxxxxxxxxxxx HTTP header is required, where xxxxxxxxxxxxxxxxxxx is the Base64 encoding of USERNAME:PASSWORD, e.g. JohnDoe:MyPass → Sm9obkRvZTpNeVBhc3M=.
In case, the header is missing or invalid, Quantum Web Backend always responds with HTTP 401 Unauthorized.
In case, IP Whitelisting is enabled, any incoming HTTP requests from an unauthorized IP address are ignored.
The JSON content in all requests and responses are UTF-8 encoded.

4.1. Endpoints#

The Wallet API contains the following webhook endpoints:
EndpointDescription
verifySessionSession verification and player data.
getBalanceGets account balance and currency.
withdrawWithdraws money from the wallet, e.g. some good being bought.
confirmWithdrawalConfirms a former withdrawal.
rollbackWithdrawalRolls back a former withdrawal.
depositDeposits money due to the wallet, e.g. claimed some bonuses.
confirmDepositConfirms a former deposit.
rollbackDepositRolls back a former deposit.

4.1.1. Common Errors#

In case - whitelisted IPs are enabled on Quantum Web Backend - but a request was sent from an unsupported IP, there will be not any answer.
In case of an invalid/unknown HTTP Basic Authorization header,
the answer will always be HTTP 400 Unauthorized.
Else, the answer is a normal HTTP 200 OK and the HTTP content, will provide an error code and description.

Error Response Body#

FieldTypeDescriptionRequired
errorCodenumberError code.required
errorDescriptionstringError description for debug purposes.required

Error Example#

{
  "errorCode": 100,
  "errorDescription": "An unexpected internal error occurred."
}

Common Error Codes#

Following common error codes, are valid for all responses of the Wallet API:
CodeDescription
100Other error.

4.1.2. Idempotency#

The endpoints in the Wallet API are idempotent, meaning the same request can be retried in case of error but the retry will not result in a new transaction if original transaction was successful on Quantum Web Backend. Retry will return original response and retry (idempotency cache) is possible for a few days.
Modified at 2023-07-31 13:44:40
Previous
3. Launching MilfMasters Game Client
Next
Verify Session
Built with