Skip to main content
This page walks through one member’s full session to show how the transfer wallet integration works. Before you start, complete Before you start on the overview page to get the API domain {host}, the token and the API key.

Flow

In transfer wallet mode, the member’s game balance is held by us. Before the member plays, you transfer balance in from your own wallet (deposit). When the member leaves, you transfer it back (withdraw).

About the examples

  • Every example computes sign with the API key a188va. Use the API key we give you, and follow Signature.
  • POST requests are sent as multipart/form-data (curl -F). GET requests are sent as a query string (curl -G --data-urlencode).
  • Check status.code in every response. 0 means success; see Response codes for the rest.

1. Create a member

Before a member plays for the first time, call Create member. The same account in different channels is treated as different members, and accounts are case-sensitive.
If the account already exists, the response code is 202 and you can keep using that account.

2. Deposit

Call Deposit to move balance into the member’s wallet. transactionID must be unique and start with deposit-.
The response data includes the balance before and after, balanceBefore and balanceAfter. Keep the transactionID and the response so you can reconcile later with Get transaction detail. Call Get game link and redirect the member to the url in the response. Set gameID to 0 to open the game lobby; to open a specific game, look up its ID with Get game list.
A game link is valid for 300 seconds, so redirect the member right away. clientIP is the member’s IP and is not signed. See Languages for supported language codes.

4. Fetch bet records

While members play, call List bet records periodically. On the first query, send nextToken as an empty string; the empty value is still included in the signature.
When there is more than one page, pass the nextToken from the previous response as described in Pagination. For continuous fetching, make each query’s start time equal to the previous query’s end time so no bets are missed.

5. Withdraw

When the member finishes, call Withdraw to move the balance back to your wallet. transactionID must be unique and start with withdraw-. You can check the amount first with Get member balance.

Reconciliation