MG+ K2 Single Wallet API Integration Quick Guide
Breadcrumbs

FAQ

Single Wallet Agent API

What are the IP addresses for the Single Wallet Agent API?

  • 49.128.79.50

  • 54.64.194.205

  • 52.199.206.85

  • 3.123.60.168

To determine the IP address to whitelist, we recommend reaching out to the integration team. They will be able to provide you with the specific IP address that should be included in your whitelist configuration.

What should I check if I am not receiving any requests from the Single Wallet Agent API?

Please review the following:

  1. Ensure that your API callback URL is accurate and capable of receiving requests from our system.

  2. Verify that your callback URL is configured to use a standard port for communication (443 or 80).

Despite receiving and responding to the request, I continue to encounter an error, particularly during game launch. What could be the issue?

Please ensure that the headers you are sending back to us are accurate and match the expected values:

  1. X-MGP-REQ-ID: This header should contain the same X-MGP-REQ-ID value that we send to you. For instance, if we send 1234-567891-2345-6789 as the request ID, your response should be 1234-567891-2345-6789.

  2. X-MGP-RESPONSE-TIME: This header should indicate the time taken to process the request in milliseconds. For example, if the processing time is 10 milliseconds, the value should be set as "10".

When is the /login method called?

The /login method is called when you click the game launch URL that is generated from the /sessions API call.

When is the /getbalance method called?

The /getbalance method is called regularly during gameplay.

When is the /updatebalance method called?

For regular slot games, the following methods are called:

  1. /updatebalance is called with a debit transaction type request when deducting funds from the player.

  2. /updatebalance is called with a credit transaction type request when adding funds.

After a game is finished, a parameter and value of completed:true is sent. This may or may not be sent as a separate call.

When is the /rollback method called?

The /rollback method is not called during regular operation. It is specifically used in certain situations that require the reversal of a transaction.

Which parameters are idempotent?

The betId parameter remains idempotent throughout the entire process of bet/win/game completion. This means that the betId retains its unique identity and does not change regardless of the outcome or completion status of the bet.

The txnId parameter is idempotent for a single transaction, such as a debit or credit transaction. This implies that the txnId remains unchanged and maintains its unique identifier throughout the transaction process, regardless of any subsequent updates or changes.

What is the purpose of roundId?

roundId does not have a current usage or function.

What is the maximum length allowed for txnId, betId, and roundId?

The maximum length allowed for txnId, betId, and roundId is 1000 characters. These three identifiers are represented as strings (varchar).

Single Wallet API

Which countries have restrictions on gameplay?

MG Asia exclusively caters to the Asian region, with restrictions placed on IP addresses from Taiwan and Singapore.

What features require IP whitelisting?

Whitelisting is required for API usage. There are no specific restrictions imposed on MG+ Backoffice.

Why am I receiving a 401 response?

If you are getting a 401 response, it is important to ensure that the authorization header of your API calls includes a valid authorization token.

Why am I receiving a 403 response?

If you are receiving a 403 response, it could be due to your IP address not being whitelisted. Please verify whether your IP address has been added to the whitelist.

Why am I receiving a 404 response?

If you are encountering a 404 response, please make sure to verify the following:

  1. Confirm that the API URL is accurate and includes /api/v1 in the path

  2. Ensure that the STS URL includes /connect/token

By checking these aspects, you can identify and resolve any issues related to the 404 response.

What time zone does the API use?

The API operates on the UTC+0 time zone by default, unless any other specific time zone is specified.

What is the content type needed for API calls?

For API calls, the required content type is application/x-www-form-urlencoded

Additionally, please set the Accept header to application/json to specify that you expect JSON content in the response.

STS Token

Can the token be used more than once?

Yes, the token can be reused until it expires, which occurs after 1 hour. We suggest refreshing the token after approximately 45-50 minutes to ensure uninterrupted access.

Does the previous token become invalid once a new token is requested?

No, the previous token remains valid until its own expiration time.

Games

Where can I find a list of games along with their game codes?

You have two options to obtain a list of games and their corresponding game codes:

  1. The Master Games List excel spreadsheet: You can refer to this spreadsheet to access a comprehensive list of games and their respective game codes.

  2. By calling the /agents/{agentCode}/games endpoint: You can make an API call to this endpoint with your agent code to retrieve a list of games and their associated game codes.

What does "Error 107" indicate during game launch?

Error 107 typically indicates country blocking restrictions. This error occurs when access to the game is restricted based on the user's country or location.

What does "Error 119" indicate during game launch?

Error 119 typically occurs when there is an issue with the Single Wallet system between MG+ and the Operator Agent API.

This error is commonly associated with problems encountered during the /login or /getbalance methods.

Why is the game loading slowly and resulting in a general error?

If you are experiencing slow game loads, it is likely due to one of the following reasons:

  1. Timeout issue between MG+ and the Operator Agent API: There might be a delay or timeout occurring between the MG+ platform and the Operator Agent API, causing the slow game load. This could be due to network issues.

  2. Incorrect callback URL: Another possible reason is an incorrect callback URL configuration. If the callback URL is misconfigured, it can lead to delays and errors during the game loading process.

To resolve these issues, we recommend checking your network connectivity settings and ensuring that the callback URL is correctly configured to facilitate smooth game loads.