Financial_Integration_Get_Balance

PHOTO EMBED

Thu Feb 17 2022 14:22:11 GMT+0000 (Coordinated Universal Time)

Saved by @nirmalkumar

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
    <head>
        <link href="../Resources/TableStyles/NewStyle.css" rel="stylesheet" MadCap:stylesheetType="table" />
    </head>
    <body>
        <MadCap:breadcrumbsProxy MadCap:conditions="Default.Web" style="padding-bottom: 10px;border-bottom-style: solid;border-bottom-width: 1px;font-family: 'Segoe UI';border-bottom-color: #acacac;font-weight: bold;" />
        <h1 class="main-container-header">Get Balance</h1>
        <table style="width: 100%;">
            <col style="width: 859px;" />
            <col style="width: 1141px;" />
            <tbody>
                <tr>
                    <td style="width: 100%;">
                        <!-- main - container start -->
                        <div class="main-container">
                            <!-- main left content start -->
                            <div class="main-content">
                                <h6>http://{evi-server-url}/GetBalance</h6>
                                <p>The GetBalance request is used occasionally when the game needs to validate the player's balance.</p>
                                <p>I.e. the player left the client open for various reasons and no gameplay has ensued for a minute.</p>
                                <p>One of the reasons could be the player depositing in the cashier, or playing in another game in the casino.</p>
                                <p>Until the session expires, we thrive to update the balance on the idling client.</p>
                                <p>Because in every placeBet there’s a balance update as well, there is no reason to crash the game or notify the player in case getBalance failed for any reason.</p>
                                <p>&#160;</p>
                                <h2>POST Request</h2>
                                <table style="margin-left: 0;margin-right: auto;mc-table-style: url('../Resources/TableStyles/NewStyle.css');" class="TableStyle-NewStyle" cellspacing="3">
                                    <col class="TableStyle-NewStyle-Column-Column1" />
                                    <col class="TableStyle-NewStyle-Column-Column2" />
                                    <col class="TableStyle-NewStyle-Column-Column3" />
                                    <thead>
                                        <tr class="TableStyle-NewStyle-Head-Header1">
                                            <th class="TableStyle-NewStyle-HeadE-Column1-Header1">
                                                <p>Parameter</p>
                                            </th>
                                            <th class="TableStyle-NewStyle-HeadE-Column2-Header1">
                                                <p>Type</p>
                                            </th>
                                            <th class="TableStyle-NewStyle-HeadD-Column3-Header1">
                                                <p>Comments</p>
                                            </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>Account</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>Account</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">
                                                <p>API username and password.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">
                                                <p>Token</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>String</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">
                                                <p>The token that
												was returned in the Authenticate response.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>GameCode</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>String</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">
                                                <p>Unique game code.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyB-Column1-Body1">
                                                <p>PlayerId</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyB-Column2-Body1">
                                                <p>String</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyA-Column3-Body1">
                                                <p>PlayerId</p>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <p>&#160;</p>
                                <h2>Response</h2>
                                <table style="mc-table-style: url('../Resources/TableStyles/NewStyle.css');margin-left: 0;margin-right: auto;" class="TableStyle-NewStyle" cellspacing="3">
                                    <col class="TableStyle-NewStyle-Column-Column1" />
                                    <col class="TableStyle-NewStyle-Column-Column2" />
                                    <col class="TableStyle-NewStyle-Column-Column3" />
                                    <thead>
                                        <tr class="TableStyle-NewStyle-Head-Header1">
                                            <th class="TableStyle-NewStyle-HeadE-Column1-Header1">
                                                <p>Parameter</p>
                                            </th>
                                            <th class="TableStyle-NewStyle-HeadE-Column2-Header1">
                                                <p>Type</p>
                                            </th>
                                            <th class="TableStyle-NewStyle-HeadD-Column3-Header1">
                                                <p>Comments</p>
                                            </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>Balance</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>Decimal</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">
                                                <p>Player's balance</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">
                                                <p>ErrorCode</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>Integer</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">
                                                <p>Error code in case the request had an error.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>SessionData</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>SessionData</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">
                                                <p>Holds the
												player session data – session balance, sum of total wins and sum of total</p>
                                                <p>bets.
												Required for the Spanish Regulation</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">
                                                <p>Message</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>Object</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">
                                                <p>Each
												server response may contain a list of messages that will be shown by the client-side   after the round (spin) is over.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">Message.DisplayType</td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">Enum

												1. Notification 2.PopUp (intrusive)
											</td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">With intrusive type, buttons are optional, but must bear in mind that the client will not be able to continue gameplay until it is restarted, and provided there isn't a similar message object following up on it on loadGame
												response
											</td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">Message.Title</td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">String</td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">Title of the popup message</td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">Message.Text</td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">String</td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">Message text where \n or \r\n should be a 'return' (enter)</td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">Message.Buttons</td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">List&lt;Buttons&gt;</td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">List of the buttons available for the popup</td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">Message.Buttons .Text</td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">String</td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">Text of the button</td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">Message.Buttons
												.Action
											</td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">String</td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">One of the following:	

												quit - Quit the game (just like pressing on the home button)
												cashier - Launch the cashier link (just like pressing on the cashier button)
												history - Launch the history link (just like pressing on the history button on the reality check popup)
												continue - Hide the popup link - Open a dedicated link

												Whenever an action is being pressed, JavaScript event should be triggered by the client
											</td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">Message.Buttons .Link</td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">String</td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">(optional) - If the action property value is "link".
												- The link to be opened by the game Note
												In case there is a "Link" value and the Action is "continue", the link will be sent as an Ajax
												request and will not redirect the player
											</td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyB-Column1-Body1">Message.Buttons
												.LinkType
											</td>
                                            <td class="TableStyle-NewStyle-BodyB-Column2-Body1">Enum</td>
                                            <td class="TableStyle-NewStyle-BodyA-Column3-Body1">
                                                <p>optional - only if link is available	
													Redirect - redirects the player to the URL
												Ajax - link will be sent by ajax and immediately let the player continue with the flow</p>
                                                <p>AjaxResponse - link will be sent by ajax and wait until "successful json response" is made. Only then continue with the flow.</p>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <p>&#160;</p>
                                <h2>Possible GetBalance Error Codes</h2>
                                <p>&#160;</p>
                                <table style="margin-left: 0;margin-right: auto;mc-table-style: url('../Resources/TableStyles/NewStyle.css');" class="TableStyle-NewStyle" cellspacing="3">
                                    <col class="TableStyle-NewStyle-Column-Column1" />
                                    <col class="TableStyle-NewStyle-Column-Column2" />
                                    <col class="TableStyle-NewStyle-Column-Column3" />
                                    <thead>
                                        <tr class="TableStyle-NewStyle-Head-Header1">
                                            <th class="TableStyle-NewStyle-HeadE-Column1-Header1">
                                                <p>Name</p>
                                            </th>
                                            <th class="TableStyle-NewStyle-HeadE-Column2-Header1">
                                                <p>Code</p>
                                            </th>
                                            <th class="TableStyle-NewStyle-HeadD-Column3-Header1">
                                                <p>Comments</p>
                                            </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>AuthenticateFailed</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>2</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">
                                                <p>The credentials provided in the API are wrong.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">
                                                <p>InvalidToken</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>4</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">
                                                <p>Token was not found.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyB-Column1-Body2">
                                                <p>GeneralError</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyB-Column2-Body2">
                                                <p>900</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyA-Column3-Body2">
                                                <p>General
												error.</p>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <p>&#160;</p>
                                <p>&#160;</p>
                                <p><b>Examples:</b>
                                </p>
                                <p>&#160;</p>
                                <p><b>GetBalance request</b>
                                </p>
                                <p>{</p>
                                <p>"PlayerId": "PPT_327",</p>
                                <p>"Token": "PPT_DBC10D4AE0FB47B790102A99569A111B",</p>
                                <p>"GameCode": "EVIGame_Desktop", "Account": {</p>
                                <p>"Username": "eviuser", "Password": "evipassword"</p>
                                <p>}</p>
                                <p>}</p>
                                <p>&#160;</p>
                                <p><b>GetBalance ok response</b>
                                </p>
                                <p>{</p>
                                <p>"Balance": 197358.35,</p>
                                <p>“Message”: [{</p>
                                <p>DisplayType: 2,</p>
                                <p>Title: "Title for the popup message",</p>
                                <p>Text: "message. Including \r\n or just \n for enter", Buttons: [</p>
                                <p>{</p>
                                <p>Text: "Quit Game", Action: "quit",</p>
                                <p>},</p>
                                <p>{</p>
                                <p>Text: "Ok",</p>
                                <p>Action: "continue",</p>
                                <p>},</p>
                                <p>{</p>
                                <p>Text: "View History", Action: "link",</p>
                                <p>Link: "https://www.casino.com/myaccount/history"</p>
                                <p>}</p>
                                <p>]</p>
                                <p>&#160;</p>
                                <p>}],</p>
                                <p>"SessionData": {</p>
                                <p>"TotalBet":20.0,</p>
                                <p>"TotalWin":10.0, "SessionBalance":220.0</p>
                                <p>}</p>
                                <p>}</p>
                                <p>&#160;</p>
                                <p><b>GetBalance error response </b>
                                </p>
                                <p>{</p>
                                <p>"Balance": 197358.35</p>
                                <p>}</p>
                                <p>&#160;</p>
                            </div>
                            <!-- main left content end -->
                            <div class="main-content-toc"><b>Table of Contents</b>
                                <MadCap:menuProxy mc-linked-toc="$topicHeadings" style="mc-toc-depth: 2;mc-context-sensitive: True;mc-include-parent: True;mc-include-siblings: True;mc-include-children: True;">
                                </MadCap:menuProxy>
                                <p>&#160;</p>
                            </div>
                            <!-- main right toc end -->
                        </div>
                        <!-- main - container end -->
                    </td>
                </tr>
            </tbody>
        </table>
    </body>
</html>
content_copyCOPY