Financial_CancelBet

PHOTO EMBED

Thu Feb 17 2022 13:14:57 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>Cancel Bet</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}/CancelBet</h6>
                                <p style="font-weight: normal;">&#160;</p>
                                <p>The CancelBet request is used occasionally when a game has to refund a wager.</p>
                                <p>•	A CancelBet request can't be on a round that has credits</p>
                                <p>•	A CancelBet request can't be made on a round that is not exist (didn't have Debit before)</p>
                                <p>•	A CancelBet request can't be made on a round that is ended.</p>
                                <p>•	In case of a CancelBet request with a transaction that was already sent and committed, an OK will be sent with the same old transaction Id, without committing the transaction again.</p>
                                <p>•	In case of network timeout or any network error in response must continue retry until receiving a successful response.</p>
                                <p>•	CancelBet request (refund) should be sent only on specific errors on Debit request:</p>
                                <p style="text-indent: 0.5in;">o	NotificationError (100)</p>
                                <p style="text-indent: 0.5in;">o	GeneralError (900)</p>
                                <p style="text-indent: 0.5in;">o	Network timeout or any other network error</p>
                                <p style="text-indent: 0.5in;">o	In all other errors the player should not be refund, because the operator didn’t decrease the player’s balance.</p>
                                <p style="text-indent: 0.5in;">&#160;</p>
                                <h2>POST&#160;Request</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>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-BodyE-Column1-Body1">
                                                <p>PlayerId</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>String</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">
                                                <p>PlayerId</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>RoundId</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>String</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">
                                                <p>The ID of the specific round in the game.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">
                                                <p>IsRoundEnded</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>Boolean</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">
                                                <p>An indication
												if the round ended. Once a round ends there can be no more credits or debits.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>TransactionId</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>String</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">
                                                <p>A
												unique Transaction ID on the vendor side.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyB-Column1-Body1">
                                                <p>DebitTransactionId</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyB-Column2-Body1">
                                                <p>String</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyA-Column3-Body1">
                                                <p>The vendor
												TransactionId of the debit to cancel</p>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <p>&#160;</p>
                                <h2>Response</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>TransactionId</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>String</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body2">
                                                <p>The
												unique TransactionId on the EVI side.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">ErrorCode</td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">Integer</td>
                                            <td class="TableStyle-NewStyle-BodyD-Column3-Body1">Error code in case the request had an error.</td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyB-Column1-Body2">
                                                <p>Balance</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyB-Column2-Body2">
                                                <p>Decimal</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyA-Column3-Body2">
                                                <p>Player's balance</p>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <p>&#160;</p>
                                <h2>Possible CancelBet Error Codes</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" />
                                    <col class="TableStyle-NewStyle-Column-Column4" />
                                    <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-HeadE-Column3-Header1">
                                                <p>Retry</p>
                                            </th>
                                            <th class="TableStyle-NewStyle-HeadD-Column4-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-BodyE-Column3-Body2">
                                                <p>No</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column4-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>InvalidGame</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>3</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column3-Body1">
                                                <p>No</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column4-Body1">
                                                <p>The GameCode
												provided in the API is wrong.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>InvalidToken</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>4</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column3-Body2">
                                                <p>No</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column4-Body2">
                                                <p>Token was not found.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">
                                                <p>InvalidPlayerId</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>6</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column3-Body1">
                                                <p>No</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column4-Body1">
                                                <p>Player Id was not found.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body2">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body2">
                                                <p>UnkownTransactionId</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body2">
                                                <p>7</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column3-Body2">
                                                <p>No</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column4-Body2">
                                                <p>Transaction
												Id was not found.</p>
                                            </td>
                                        </tr>
                                        <tr class="TableStyle-NewStyle-Body-Body1">
                                            <td class="TableStyle-NewStyle-BodyE-Column1-Body1">
                                                <p>RoundAlreadyEnded</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column2-Body1">
                                                <p>9</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyE-Column3-Body1">
                                                <p>No</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyD-Column4-Body1">
                                                <p>The round is already ended.</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-BodyB-Column3-Body2">
                                                <p>Yes</p>
                                            </td>
                                            <td class="TableStyle-NewStyle-BodyA-Column4-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>CancelBet request</b>
                                </p>
                                <p>{</p>
                                <p>"DebitTransactionId": "061d6bce-448e-4034-90d7-7c25f029df0f", "Token": "PPT_DBC10D4AE0FB47B790102A99569A111B",</p>
                                <p>"GameCode": "EVIGame_Desktop", "PlayerId": "PPT_327",</p>
                                <p>"TransactionId": "09f94d86-b593-484f-a7c2-be2d24318d92", "RoundId": "c143ffba-3eff-4505-a4d3-f78d563ddbea", "IsRoundEnded": true,</p>
                                <p>"Account": {</p>
                                <p>"Username": "eviuser", "Password": "evipassword"</p>
                                <p>}</p>
                                <p>}</p>
                                <p>&#160;</p>
                                <p><b>CancelBet ok response</b>
                                </p>
                                <p>{</p>
                                <p>"TransactionId": "521759",</p>
                                <p>"Balance": 197365.35</p>
                                <p>}</p>
                                <p>&#160;</p>
                                <p><b>CancelBet error response</b>
                                </p>
                                <p>{</p>
                                <p>"Balance": 197358.35,</p>
                                <p>"ErrorCode": 3</p>
                                <p>}</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