Web API v1.8 Changelist

From BetgamesTV
Jump to navigation Jump to search

New API Methods

ADDED METHOD DESCRIPTION
transaction_bet_subscription_payin Transaction_bet_subscription_payin is used for betting on future draws. Players will have a possibility to place the same bet for several upcoming draws (i.e. 10 draws) in static odds games, so they could "buy in bulk".

Basically transaction_bet_subscription_payin method, does the same logic as transaction_bet_payin method. The only difference is that:

  • In case of transaction_bet_payin player is able to make only single bet.
  • In case of transaction_bet_subscription_payin player is able to make several bets per 1 payin.
transaction_bet_combination_payin It gives a possibility to place one bet consisting of two or more different bets/events.
Note: at this moment only two combo bets can be placed inside transaction_bet_combination_payin.
transaction_bet_combination_payout
transaction_promo_payout Method for money deposits to Partners player account – paying out the promotions.
transaction_bet_multi_payin transaction_bet_multi_payin method allows to place multiple single bets for different games or multiple bets for the same game and draw, with one request. Any of sent bets should be accepted, partial success is possible.

 

 

 

 

 

 

 

 

 

 

 

 

 

New Fields

ADDED FIELDS METHOD TYPE
aams transaction_bet_payin varchar
token transaction_bet_payout varchar
game_id transaction_bet_payout int
bet_type transaction_bet_payout const = 'lost' / 'won' / 'return' / 'tie'
bet_option / name transaction_bet_payout, transaction_bet_combination_payout string
bet_option / value transaction_bet_payout, transaction_bet_combination_payout string
bet_option / round transaction_bet_payout, transaction_bet_combination_payout int/null
game_id transaction_promo_payout int
promo_type transaction_promo_payout string
final_odd transaction_bet_payout, transaction_bet_combination_payout decimal
READ FULL WEB API DOCUMENTATION → Web integration API 1.8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Method transaction_bet_payin

Description: Method for money withdrawals from Partners player account for making bets. If there are not enough money, then Partner API should return insufficient funds error.

  • We will not call get_balance (to check if player has enough funds to place a bet) before transaction_bet_payin for Speedy 7 game, so you need to ensure the balance checking is done properly on your side. In case the player does not have enough funds/balance you should return error response with error code 703 and a proper message "Insufficient balance" shall be displayed.

Flowchart diagram:

Transaction bet payin.png

 


 

Request example:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <signature>a91c39b7028bde988d1a6858fafd545a</signature>
    <time>1423127617</time>
    <params>
        <amount>1234</amount>
        <currency>eur</currency>
        <bet_id>123456</bet_id>
        <transaction_id>246912</transaction_id>
        <retrying>0</retrying>
        <bet>Selected ball will be dropped with No. 1,...,42(1, 3, 10)</bet>
        <odd>5.70</odd>
        <bet_time>2015-02-05 09:13:37</bet_time>
        <game>1</game>
        <draw_code>71304050073</draw_code>
        <draw_time>2015-02-05 09:15:00</draw_time>
    </params>
</root>
  • Signature calculation string:
    methodtransaction_bet_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820time1423127617amount1234currencyeurbet_id123456transaction_id246912retrying0betSelected ball will be dropped with No. 1,...,42(1, 3, 10)odd5.70bet_time2015-02-05 09:13:37game1draw_code71304050073draw_time2015-02-05 09:15:001JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    a91c39b7028bde988d1a6858fafd545a

 

Required Request Child-Elements for <params>
Field Type Description
amount int Amount to withdraw from account.
Important: amount is in cents.
currency varchar Currency code from the ISO 4217 currency list.
bet_id bigint unsigned Unique bet id on BetGames.TV server.
transaction_id bigint unsigned Unique transaction id on BetGames.TV server. Partner is obliged to store processed transaction ids. If the request contains the same transaction id, Partner should return success status, but do not withdraw money from the balance again.
retrying int Informational parameter. If it is equal 1, it means BetGames.TV server tries to resend request. For example, because of the network connection problems.

 

Optional Request Child-Elements for <params> (enabled by default, could be disabled by Partner request)
Field Type Description
bet varchar Bet name on default Partner's language, encoding - UTF-8.
odd decimal Outcome value.
bet_time datetime Time when the bet has been placed. Timezone - UTC+0.
game int or varchar By default is returned as Game ID (integer value). Can be returned as game name on default Partner's language (encoding - UTF-8) by Partner request.
draw_code varchar Draw code number.
draw_time datetime Scheduled start time of the draw. Timezone - UTC+0.
is_mobile int Parameter to distinguish platform ("1"-mobile). This parameter appears in transaction_bet_payin requests only when you push it into iFrame JavaScript launch code.
Note: this parameter isn't being used for desktop platform.

 


 

Example of successful response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1423127617</time>
    <params>
        <balance_after>48766</balance_after>
        <already_processed>0</already_processed>
        <aams>S:M42BF200DC66DFQG T:N42BF200EBDD0BKJ</aams>
    </params>
    <signature>1a4938e2e6804c88d708f9ff8d323c64</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1423127617balance_after48766already_processed0aamsS:M42BF200DC66DFQG T:N42BF200EBDD0BKJ1JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    1a4938e2e6804c88d708f9ff8d323c64

 

Required Response Child-Elements for <params>
Field Type Description
balance_after int Player balance after the transaction.
Important: amount must be in cents.
already_processed int Equals 1 if the transaction was already processed.

 

Optional Response Child-Elements for <params>
Field Type Description
AAMS code varchar Key for each bet on the Bet History page and Recent Bets block.

 


 

Example of error response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_payin</method>
    <token>abc-eba8-012f-596c-528c3f9e4820</token>
    <success>0</success>
    <error_code>3</error_code>
    <error_text>invalid token</error_text>
    <time>1423229288</time>
    <signature>06a2d3c9d7448ee6b0fad54d00cdb946</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_payintokenabc-eba8-012f-596c-528c3f9e4820success0error_code3error_textinvalid tokentime14232292881JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    06a2d3c9d7448ee6b0fad54d00cdb946

Method transaction_bet_subscription_payin

Description: Method for accepting subscription payin.

Transaction_bet_subscription_payin is used for betting on future draws. Players will have a possibility to place the same bet for several upcoming draws (i.e. 10 draws) in static odds games, so they could "buy in bulk".

Basically transaction_bet_subscription_payin method, does the same logic as transaction_bet_payin method. The only difference is that:

  • In case of transaction_bet_payin player is able to make only single bet.
  • In case of transaction_bet_subscription_payin player is able to make several bets per 1 payin.

Flowchart diagram:

Transaction bet subscription payin.png

 


 

Request example:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_subscription_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <time>1528269625</time>
    <signature>2beeb78d9f2f9b488fb8f8ae5211ff4f</signature>
    <params>
        <amount>6170</amount>
        <currency>eur</currency>
        <subscription_id>123456</subscription_id>
        <subscription_time>2018-06-06 07:20:25</subscription_time>
        <odd>
            <name>SUM of the numbers on the dropped YELLOW balls will be LESS than 73.5</name>
            <value>1.9</value>
            <translation>SUM of the numbers on the dropped YELLOW balls will be LESS than 73.5</translation>
        </odd>
        <is_mobile>0</is_mobile>
        <game>
            <id>1</id>
            <name>Lucky 7</name>
            <translation>Lucky 7</translation>
        </game>
        <bet>
            <bet_id>123456</bet_id>
            <transaction_id>123456</transaction_id>
            <amount>1234</amount>
            <draw>
            <code>71304050073</code>
            <time>2018-06-06 07:23:25</time>
            </draw>
        </bet>
        <bet>
            <bet_id>123457</bet_id>
            <transaction_id>123457</transaction_id>
            <amount>1234</amount>
            <draw>
            <code>71304050074</code>
            <time>2018-06-06 07:23:25</time>
            </draw>
        </bet>
        <bet>
            <bet_id>123458</bet_id>
            <transaction_id>123458</transaction_id>
            <amount>1234</amount>
            <draw>
            <code>71304050075</code>
            <time>2018-06-06 07:23:25</time>
            </draw>
        </bet>
        <bet>
            <bet_id>123459</bet_id>
            <transaction_id>123459</transaction_id>
            <amount>1234</amount>
            <draw>
            <code>71304050076</code>
            <time>2018-06-06 07:23:25</time>
            </draw>
        </bet>
        <bet>
            <bet_id>123460</bet_id>
            <transaction_id>123460</transaction_id>
            <amount>1234</amount>
            <draw>
            <code>71304050077</code>
            <time>2018-06-06 07:23:25</time>
            </draw>
        </bet>
    </params>
</root>
  • Signature calculation string:
    methodtransaction_bet_subscription_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820time1528269625amount6170currencyeursubscription_id123456subscription_time2018-06-06 07:20:25oddnameSUM of the numbers on the dropped YELLOW balls will be LESS than 73.5value1.9translationSUM of the numbers on the dropped YELLOW balls will be LESS than 73.5is_mobile0gameid1nameLucky 7translationLucky 7betbet_id123456transaction_id123456amount1234drawcode71304050073time2018-06-06 07:23:25bet_id123457transaction_id123457amount1234drawcode71304050074time2018-06-06 07:23:25bet_id123458transaction_id123458amount1234drawcode71304050075time2018-06-06 07:23:25bet_id123459transaction_id123459amount1234drawcode71304050076time2018-06-06 07:23:25bet_id123460transaction_id123460amount1234drawcode71304050077time2018-06-06 07:23:251JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    2beeb78d9f2f9b488fb8f8ae5211ff4f

 

Required Request Child-Elements for <params>
Field Type Description
amount int Total subscription amount to withdraw from account.
Important: amount is in cents.
currency varchar Currency code from the ISO 4217 currency list.
subscription_id bigint unsigned Unique subscription id on BetGames.TV server.
subscription_time string Subsciption creation time, UTC.
odd / name string Outcome name in English.
odd / value float Outcome value.
odd / translation string Outcome name in player's language.
is_mobile bool-int Parameter to distinguish platform ("1"-mobile). This parameter appears in transaction_bet_payin requests only when you push it into iFrame JavaScript launch code.
Note: this parameter isn't being used for desktop platform.
game / id int or varchar Game ID in Betgames system - List of game ID's.
game / name string Game name in English.
game / translation string Game name in player's language.
bet / bet_id bigint unsigned Unique bet id on BetGames.TV server.
bet / transaction_id bigint unsigned Unique transaction id on BetGames.TV server. Partner is obliged to store processed transaction ids. If the request contains the same transaction id, Partner should return success status, but do not withdraw money from the balance again.
bet / amount int Amount of the exact bet to withdraw from account.
Important: amount is in cents.
bet / draw / code string Draw code number.
bet / draw / time string Draw start time, UTC.

 


 

Example of successful response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_subscription_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1423127617</time>
    <params>
        <balance_after>48766</balance_after>
        <already_processed>0</already_processed>
    </params>
    <signature>bb15c611416cf9512e70bf3fb7463dcb</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_subscription_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1423127617balance_after48766already_processed01JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    bb15c611416cf9512e70bf3fb7463dcb

 

Required Response Child-Elements for <params>
Field Type Description
balance_after int Player balance after the transaction.
Important: amount must be in cents.
already_processed int Equals 1 if the transaction was already processed.

 


 

Example of error response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_subscription_payin</method>
    <token>abc-eba8-012f-596c-528c3f9e4820</token>
    <success>0</success>
    <error_code>3</error_code>
    <error_text>invalid token</error_text>
    <time>1423229288</time>
    <signature>104fa720c8e9d44db7a7cb58896bd442</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_subscription_payintokenabc-eba8-012f-596c-528c3f9e4820success0error_code3error_textinvalid tokentime14232292881JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    104fa720c8e9d44db7a7cb58896bd442

Method transaction_bet_payout

Description: Method for money deposits to Partners player account – paying out the winnings.
Important notes:

  • Transaction payout should return error with code 700, in case there were no payin with same bet_id before. This transaction should not affect the players balance.
  • Transaction payout should return success but do not change players balance, in case there were already payout been made with same bet_id, but different transaction_id.
  • If transaction_bet_payout method has validation that a payout amount must be equal to payin amount * odd value, then this validation for Speedy 7 game payout should not be used. It's because of the game logic - the odd value/coefficient might be different in payin and payout requests.

Flowchart diagram:

Transaction bet payout new2.png

 


 

  • Some betting options, can have additional selections, like number, sector, dice and etc. For each selection new <bet_option> </bet_option> element will be added. Up to 7 <bet_option> elements can be included in the request.

Request example for games without additional selection (balls, dice, wheel sector):

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_payout</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <signature>e456c597cb7f97c168009661b4ee2522</signature>
    <time>1423128560</time>
    <params>
        <player_id>150205</player_id>
        <amount>2034</amount>
        <currency>eur</currency>
        <bet_id>123456</bet_id>
        <transaction_id>246913</transaction_id>
        <retrying>0</retrying>
        <bet_type>won</bet_type>
        <game_id>1</game_id>
        <final_odd>2.50<final_odd>
    </params>
</root>
  • Signature calculation string:
    methodtransaction_bet_payouttokenc2696fe0-eba8-012f-596c-528c3f9e4820time1423128560player_id150205amount2034currencyeurbet_id123456transaction_id246913retrying0bet_typewongame_id1final_odd2.501JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    e456c597cb7f97c168009661b4ee2522


Request example for Speedy 7

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <method>transaction_bet_payout</method>
  <token>5j5JK3JpWr3PXpkwPtAC4TMxX1dVICTE1OS0TbgCwXa3IZItQ7w26pUXINuJ</token>
  <time>1611067082</time>
  <signature>cb4d8a0bc965c01fee1e225534c4c6c6</signature>
  <params>
    <player_id>8</player_id>
    <amount>3260</amount>
    <currency>usd</currency>
    <bet_id>4420111</bet_id>
    <transaction_id>13249950</transaction_id>
    <retrying>0</retrying>
    <bet_type>won</bet_type>
    <game_id>11</game_id>
    <bet_option>
      <name>choice</name>
      <value>black</value>
      <round>3</round>
    </bet_option>
    <bet_option>
      <name>choice</name>
      <value>black</value>
      <round>4</round>
    </bet_option>
    <final_odd>1.80<final_odd>
  </params>
</root>
  • Signature calculation string:
    methodtransaction_bet_payouttoken5j5JK3JpWr3PXpkwPtAC4TMxX1dVICTE1OS0TbgCwXa3IZItQ7w26pUXINuJtime1611067082player_id8amount3260currencyusd
    bet_id4420111transaction_id13249950retrying0bet_typewongame_id11bet_optionnamechoicevalueblackround3namechoicevalueblackround4final_odd1.801JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    cb4d8a0bc965c01fee1e225534c4c6c6

<bet_option></bet_option> element values can be different for each game.

Lottery games (Lucky 5, Lucky 6, Lucky 7) example:

    <bet_option>
      <name>ball</name>
      <value>25</value>
      <round></round>
    </bet_option>
    <bet_option>
      <name>ball</name>
      <value>26</value>
      <round></round>
    </bet_option>
    <bet_option>
      <name>ball</name>
      <value>27</value>
      <round></round>
    </bet_option>

Dice Duel:

    <bet_option>
      <name>dice</name>
      <value>5</value>
      <round></round>
    </bet_option>


Wheel Of Fortune:

    <bet_option>
      <name>sector</name>
      <value>10</value>
      <round></round>
    </bet_option>
Required Request Child-Elements for <params>
Field Type Description
token varchar Betgames system sends last valid player token, but it's not used for user identification in money deposit. Instead of it Betgames system uses player_id field.
Read more Token System
player_id varchar Player external code provided by partner in get_account_details method. This method uses player_id for player identification.
amount int Amount to deposit to account.
Important: 1) amount is in cents. 2) amount is 0 for lost bet.
currency varchar Currency code from the ISO 4217 code list.
bet_id bigint unsigned Unique bet id on BetGames.TV server.
transaction_id bigint unsigned Unique transaction id on BetGames.TV server. Partner is obliged to store processed transaction ids. If the request contains the same transaction id, Partner should return success status, but do not deposit money to the balance again.
retrying int Informational parameter. If it is equal 1, it means BetGames.TV server tries to resend request. For example, because of the network connection problems.
bet_type const Can be 'lost' / 'won' / 'return' / 'tie'/ 'returned' (For Twain Sport).
game_id int Game ID in Betgames system - List of game ID's.
bet_option / name string Selection name, can be 'ball' / 'sector' / 'dice' / 'choice'.
bet_option / value string Selection value
bet_option / round int / null Only used for game "Speedy 7", to determine a round in which bet was placed.
final_odd decimal Shows final odd value by which - bet was really calculated.

 


 

Example of successful response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_payout</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1423128560</time>
    <params>
        <balance_after>2092</balance_after>
        <already_processed>0</already_processed>
    </params>
    <signature>736782bf451def853bbad43e210d3787</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_payouttokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1423128560balance_after2092already_processed01JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
     5b1b44f983361d84d9fb99eb93b2643b

 

Required Response Child-Elements for <params>
Field Type Description
balance_after int Player balance after the transaction.
Important: amount must be in cents.
already_processed int Equals 1 if the transaction was already processed.

 


 

Example of error response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_payout</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>0</success>
    <error_code>700</error_code>
    <error_text>there is no PAYIN with provided bet_id</error_text>
    <time>1423229288</time>
    <signature>a678ae382bce2edd151a40d6b470e257</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_payouttokenc2696fe0-eba8-012f-596c-528c3f9e4820success0error_code700error_textthere is no PAYIN with provided bet_idtime14232292881JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    a678ae382bce2edd151a40d6b470e257

Method transaction_bet_combination_payin

Description: Method for accepting combination payin.

Transaction_bet_combination_payin gives a possibility to place one bet consisting of two or more different bets/events.
Note: currently only two combo bets can be placed inside transaction_bet_combination_payin.

Flowchart diagram:

Combo payin.png

 


 

Request example:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <method>transaction_bet_combination_payin</method>
  <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
  <time>1543926540</time>
  <params>
    <amount>1200</amount>
    <odd_value>3</odd_value>
    <currency>eur</currency>
    <combination_id>123</combination_id>
    <combination_time>2018-12-04 12:29:00</combination_time>
    <is_mobile>0</is_mobile>
    <bet>
      <bet_id>1231</bet_id>
      <transaction_id>1233</transaction_id>
      <draw>
        <code>51301010100</code>
        <time>2018-01-01 00:00:00</time>
      </draw>
      <game>
        <id>1</id>
        <name>Lucky 7</name>
        <translation>Lucky 7</translation>
      </game>
      <odd>
        <name>More ODD numbered balls will be dropped</name>
        <value>1.5</value>
        <translation>More ODD numbered balls will be dropped</translation>
      </odd>
    </bet>
    <bet>
      <bet_id>1232</bet_id>
      <transaction_id>1234</transaction_id>
      <draw>
        <code>51301010300</code>
        <time>2018-01-01 00:00:00</time>
      </draw>
      <game>
        <id>3</id>
        <name>Lucky 5</name>
        <translation>Lucky 5</translation>
      </game>
      <odd>
        <name>COUNT of the dropped WHITE balls will be MORE than COUNT of the dropped RED balls</name>
        <value>2</value>
        <translation>COUNT of the dropped WHITE balls will be MORE than COUNT of the dropped RED balls</translation>
      </odd>
    </bet>
  </params>
  <signature>e32ce06ecfbdb76a1813e02881d63cc1</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_combination_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820time1543926540amount1200odd_value3currencyeurcombination_id123combination_time2018-12-04 12:29:00is_mobile0betbet_id1231transaction_id1233drawcode51301010100time2018-01-01 00:00:00gameid1nameLucky 7translationLucky 7oddnameMore ODD numbered balls will be droppedvalue1.5translationMore ODD numbered balls will be droppedbet_id1232transaction_id1234drawcode51301010300time2018-01-01 00:00:00gameid3nameLucky 5translationLucky 5oddnameCOUNT of the dropped WHITE balls will be MORE than COUNT of the dropped RED ballsvalue2translationCOUNT of the dropped WHITE balls will be MORE than COUNT of the dropped RED balls1JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    e32ce06ecfbdb76a1813e02881d63cc1

 

Required Request Child-Elements for <params>
Field Type Description
amount int Total combination amount to withdraw from account.
Important: amount is in cents.
odd_value float Multiplied combination odd value.
currency varchar Currency code from the ISO 4217 currency list.
combination_id bigint unsigned Unique combination id on BetGames.TV server.
combination_time string Combination creation time, UTC.
is_mobile bool-int Parameter to distinguish platform ("1"-mobile). This parameter appears in transaction_bet_payin requests only when you push it into iFrame JavaScript launch code.
Note: this parameter isn't being used for desktop platform.
bet / bet_id bigint unsigned Unique bet id on BetGames.TV server.
bet / transaction_id bigint unsigned Unique transaction id on BetGames.TV server. Partner is obliged to store processed transaction ids. If the request contains the same transaction id, Partner should return success status, but do not withdraw money from the balance again.
bet / draw / code string Draw code number.
bet / draw / time string Draw start time, UTC.
bet / game / id int or varchar Game ID in Betgames system - List of game ID's.
bet / game / name string Game name in English.
bet / game / translation string Game name in player's language.
bet / odd / name string Outcome name in English.
bet / odd / value float Outcome value
bet / odd / translation string Outcome name in player's language.

 


 

Example of successful response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_combination_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1423127617</time>
    <params>
        <balance_after>48766</balance_after>
        <already_processed>0</already_processed>
    </params>
    <signature>33059d3b8405d51d46a673c8acec1064</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_combination_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1423127617balance_after48766already_processed01JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    33059d3b8405d51d46a673c8acec1064

 

Required Response Child-Elements for <params>
Field Type Description
balance_after int Player balance after the transaction.
Important: amount must be in cents.
already_processed int Equals 1 if the transaction was already processed.

 


 

Example of error response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_combination_payin</method>
    <token>abc-eba8-012f-596c-528c3f9e4820</token>
    <success>0</success>
    <error_code>3</error_code>
    <error_text>invalid token</error_text>
    <time>1423229288</time>
    <signature>fbf1851d854329d7f04842f115351421</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_combination_payintokenabc-eba8-012f-596c-528c3f9e4820success0error_code3error_textinvalid tokentime14232292881JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    fbf1851d854329d7f04842f115351421

Method transaction_bet_combination_payout

Description: Method for money deposits to Partners player account – paying out the winnings.
Important notes:

  • Transaction combination payout should return error with code 700, in case there were no combination payin with same combination_id and bet_id's before. This transaction should not affect the players balance.
  • Transaction payout should return success but do not change players balance, in case there were already payout been made with same bet_id, but different transaction_id.

Flowchart diagram:

Combo payout.png

 


 

  • Some betting options, can have additional selection like number, sector, dice and etc. For each selection new <bet_option> </bet_option> element will be added. Up to 7 <bet_option> elements can be included in the request.

Request example without selected additional betting options (balls, dice, wheel sector):

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <method>transaction_bet_combination_payout</method>
  <token>abc-eba8-012f-596c-528c3f9e4820</token>
  <time>1543926924</time>
  <params>
    <player_id>c2696fe0-eba8-012f-596c-528c3f9e4820</player_id>
    <amount>1234</amount>
    <type>won</type>
    <currency>eur</currency>
    <combination_id>123</combination_id>
    <bet>
      <bet_id>1231</bet_id>
      <game_id>1</game_id>
      <transaction_id>1235</transaction_id>
      <type>won</type>
      <final_odd>1.5</final_odd>
    </bet>
    <bet>
      <bet_id>1232</bet_id>
      <game_id>3</game_id>
      <transaction_id>1236</transaction_id>
      <type>won</type>
      <final_odd>1.5</final_odd>
    </bet>
    <final_odd>2.25</final_odd>
  </params>
  <signature>92d0cf88c4b2dcbbdcda8b233738b25b</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_combination_payouttokenabc-eba8-012f-596c-528c3f9e4820time1543926924player_idc2696fe0-eba8-012f-596c-528c3f9e4820amount1234typewoncurrencyeurcombination_id123betbet_id1231game_id1transaction_id1235typewonfinal_odd1.5bet_id1232game_id3transaction_id1236typewonfinal_odd1.5final_odd2.251JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    92d0cf88c4b2dcbbdcda8b233738b25b

 

Request example with selected additional betting options (same as for transaction_bet_payout, different <name> for each game can be included like choice, ball and etc):

<?xml version="1.0" encoding="UTF-8"?> 
<root> 
   <method>transaction_bet_combination_payout</method>
   <token>5j5JK3JpWr3PXpkwPtAC4TMxX1dVICTE1OS0TbgCwXa3IZItQ7w26pUXINuJ<
   /token> 
   <time>1611071329</time> 
   <signature>8571541fac780af5ce43d6f5ecbf4931</signature> 
   <params> 
   <player_id>8</player_id> 
   <amount>0</amount> 
   <type>lost</type> 
   <currency>usd</currency> 
   <combination_id>2981</combination_id> 
   <bet> 
      <bet_id>4420295</bet_id> 
      <game_id>1</game_id> 
      <transaction_id>13250512</transaction_id> 
      <type>lost</type>
      <final_odd>1.5</final_odd> 
      <bet_option> 
         <name>ball</name> 
         <value>16</value> 
         <round></round> 
      </bet_option> 
      <bet_option> 
         <name>ball</name> 
         <value>17</value> 
         <round></round> 
      </bet_option> 
   </bet> 
   <bet> 
      <bet_id>4420296</bet_id> 
      <game_id>7</game_id> 
      <transaction_id>13250513</transaction_id> 
      <type>lost</type> 
      <final_odd>1.5</final_odd>
      <bet_option> 
         <name>sector</name> 
         <value>16</value> 
         <round></round> 
      </bet_option> 
   </bet> 
   <final_odd>2.25</final_odd>
   </params> 
</root>
  • Signature calculation string:
    methodtransaction_bet_combination_payouttoken5j5JK3JpWr3PXpkwPtAC4TMxX1dVICTE1OS0TbgCwXa3IZItQ7w26pUXINuJtime1611071329player_id8amount0type
    lostcurrencyusdcombination_id2981betbet_id4420295game_id1transaction_id13250512typelostfinal_odd1.5bet_optionnameballvalue16roundnameballvalue17roundbet_id4420296game_id
    7transaction_id13250513typelostfinal_odd1.5bet_optionnamesectorvalue16roundfinal_odd2.251JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    8571541fac780af5ce43d6f5ecbf4931
Required Request Child-Elements for <params>
Field Type Description
player_id varchar Player external code provided by partner in get_account_details method. This method uses player_id for player identification.
amount int Amount to deposit to account.
Important: 1) amount is in cents. 2) amount is 0 for lost bet.
currency varchar Currency code from the ISO 4217 code list.
combination_id bigint unsigned Unique combination id on BetGames.TV server.
type string Type of combination result for each single bet separately 'lost' / 'won' / 'return' / 'tie'/ 'returned' (For Twain Sport).
bet / bet_id bigint unsigned Unique bet id on BetGames.TV server.
bet / game_id int or varchar Game ID in Betgames system - List of game ID's.
bet / transaction_id bigint unsigned Unique transaction id on BetGames.TV server. Partner is obliged to store processed transaction ids. If the request contains the same transaction id, Partner should return success status, but do not deposit money to the balance again.
bet / type string Type of combination result for each single bet separately - could be won, lost, return.
bet_option / name string Selection name, can be 'ball' / 'sector' / 'dice' / 'choice'.
bet_option / value string Selection value
bet_option / round int / null Only used for game "Speedy 7", to determine a round in which bet was placed.
final_odd decimal Shows final odd value by which - bet was really calculated

 


 

Example of successful response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_combination_payout</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1423128560</time>
    <params>
        <balance_after>2092</balance_after>
        <already_processed>0</already_processed>
    </params>
    <signature>7c67a40ae0a3b7884ed45baf75a3cc1d</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_combination_payouttokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1423128560balance_after2092already_processed01JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    7c67a40ae0a3b7884ed45baf75a3cc1d

 

Required Response Child-Elements for <params>
Field Type Description
balance_after int Player balance after the transaction.
Important: amount must be in cents.
already_processed int Equals 1 if the transaction was already processed.

 


 

Example of error response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_combination_payout</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>0</success>
    <error_code>700</error_code>
    <error_text>there is no PAYIN with provided bet_id</error_text>
    <time>1423229288</time>
    <signature>cea725e94b7683684efb1b7287226850</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_combination_payouttokenc2696fe0-eba8-012f-596c-528c3f9e4820success0error_code700error_textthere is no PAYIN with provided bet_idtime14232292881JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    cea725e94b7683684efb1b7287226850

Method transaction_promo_payout

Description: Method for money deposits to Partners player account – paying out the promotion winnings.

Important notes:

  • Transaction promo payout should return error with code 700, in case there were no payin with bet_id provided in request. This transaction should not affect the players balance;
  • Token shouldn't be used as player identificator for payout, player_id should be used;
  • Transaction promo payout should return success but do not change players balance, in case there were already payout been made with same promo_transaction_id;
  • Second transaction promo payout for same bet_id should be accepted if promo_transaction_id and promo_type is different.
  • promo_transaction_id ids pool is different from transaction_ids used in transaction_bet_payout (transaction_bet_payin) methods, there may be transaction_bet_payout with transaction_id = 1 and transaction_promo_payout with promo_transaction_id = 1.
  • transaction_promo_payout will be sent as additional payout with bet_id, which was already paid out with transaction_bet_payout or transaction_bet_combination_payout.


Promo payout flowchart.png

 


 

Request example:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <method>transaction_promo_payout</method>
  <token>5j5JK3JpWr3PXpkwPtAC4TMxX1dVICTE1OS0TbgCwXa3IZItQ7w26pUXINuJ</token>
  <time>1611072828</time>
  <signature>3050679cd4bb83dbd2c8adf8cfccd0c0</signature>
  <params>
    <player_id>8</player_id>
    <currency>usd</currency>
    <amount>100</amount>               
    <promo_transaction_id>77472884103</promo_transaction_id>
    <bet_id>92644491027</bet_id>
    <game_id>1</game_id>
    <promo_type>Cashback</promo_type>
  </params>
</root>
  • Signature calculation string:
    methodtransaction_promo_payouttoken5j5JK3JpWr3PXpkwPtAC4TMxX1dVICTE1OS0TbgCwXa3IZItQ7w26pUXINuJtime1611072828
    player_id8currencyusdamount100promo_transaction_id77472884103bet_id92644491027game_id1promo_typeCashback1JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
     c0e15947664b2665d0b8a9edab720340

 

Required Request Child-Elements for <params>
Field Type Description
player_id varchar Player external code provided by partner in get_account_details method. This method uses player_id for player identification.
currency varchar Currency code from the ISO 4217 code list.
amount int Amount to deposit to account.
Important: 1) amount is in cents. 2) amount is 0 for lost bet.
promo_transaction_id bigint unsigned Unique promotion transaction id on BetGames.TV server. Partner is obliged to store processed promotion transaction ids. If the request contains the same transaction id, Partner should return success status, but do not deposit money to the balance again.

Important: promo_transaction_id and transaction_id used in transaction_bet_payin/transaction_bet_payout is different and should be stored separately.

bet_id bigint unsigned Unique bet id on BetGames.TV server.
game_id int Game ID in Betgames system - List of game ID's.
promo_type string Can be 'Cashback' / 'Speedy7 JackPot' / 'Poker Headsup JackPot'.

 


 

Example of successful response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_promo_payout</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1423128560</time>
    <params>
        <balance_after>2092</balance_after>
        <already_processed>0</already_processed>
    </params>
    <signature>736782bf451def853bbad43e210d3787</signature>
</root>
  • Signature calculation string:
    methodtransaction_promo_payouttokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1423128560balance_after2092already_processed01JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    3db88cd33b0a5a7d1326c9a459f17ba7

 

Required Response Child-Elements for <params>
Field Type Description
balance_after int Player balance after the transaction.
Important: amount must be in cents.
already_processed int Equals 1 if the transaction was already processed.

 


 

Example of error response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_promo_payout</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>0</success>
    <error_code>700</error_code>
    <error_text>there is no PAYIN with provided bet_id</error_text>
    <time>1423229288</time>
    <signature>a678ae382bce2edd151a40d6b470e257</signature>
</root>
  • Signature calculation string:
    methodtransaction_promo_payouttokenc2696fe0-eba8-012f-596c-528c3f9e4820success0error_code700error_textthere is no PAYIN with provided bet_idtime14232292881JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    52cb12b664baae2adb14268ac71624fa

Method transaction_bet_multi_payin

Description: Method allows to place multiple single bets with one request. Accept any of sent bets, partial success is possible.

Flowchart diagram:

Transaction bet multi payin.png

 


 

Request example:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_multi_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <time>1577836800</time>
    <signature>2d7a67bd343de00b8815ecc88d2eebb8</signature>
    <params>
        <currency>eur</currency>
        <is_mobile>1</is_mobile>
        <bet>
            <bet_id>1</bet_id>
            <amount>100</amount>
            <transaction_id>1</transaction_id>
            <draw>
                <code>123</code>
                <time>2020-01-01 00:00:00</time>
            </draw>
            <game>
                <id>10</id>
                <name>Dice Duel</name>
                <translation>Dice Duel</translation>
            </game>
            <odd>
                <id>231</id>
                <name>Red dice wins</name>
                <value>2.25</value>
                <translation>Red dice wins</translation>
            </odd>
        </bet>
        <bet>
            <bet_id>2</bet_id>
            <amount>100</amount>
            <transaction_id>2</transaction_id>
            <draw>
                <code>123</code>
                <time>2020-01-01 00:00:00</time>
            </draw>
            <game>
                <id>10</id>
                <name>Dice Duel</name>
                <translation>Dice Duel</translation>
            </game>
            <odd>
                <id>231</id>
                <name>Red dice wins</name>
                <value>2.25</value>
                <translation>Red dice wins</translation>
            </odd>
        </bet>
        <bet>
            <bet_id>3</bet_id>
            <amount>100</amount>
            <transaction_id>3</transaction_id>
            <draw>
                <code>123</code>
                <time>2020-01-01 00:00:00</time>
            </draw>
            <game>
                <id>10</id>
                <name>Dice Duel</name>
                <translation>Dice Duel</translation>
            </game>
            <odd>
                <id>231</id>
                <name>Red dice wins</name>
                <value>2.25</value>
                <translation>Red dice wins</translation>
            </odd>
        </bet>
    </params>
</root>
  • Signature calculation string:
    methodtransaction_bet_multi_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820time1577836800currencyeuris_mobile1betbet_id1amount100transaction_id1drawcode123time2020-01-01 00:00:00gameid10nameDice DueltranslationDice Dueloddid231nameRed dice winsvalue2.25translationRed dice winsbet_id2amount100transaction_id2drawcode123time2020-01-01 00:00:00gameid10nameDice DueltranslationDice Dueloddid231nameRed dice winsvalue2.25translationRed dice winsbet_id3amount100transaction_id3drawcode123time2020-01-01 00:00:00gameid10nameDice DueltranslationDice Dueloddid231nameRed dice winsvalue2.25translationRed dice wins1JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    2d7a67bd343de00b8815ecc88d2eebb8

 


 

Required Request Child-Elements for <params>
Field Type Description
currency string Currency code from the ISO 4217 currency list.
is_mobile bool-int Parameter to distinguish platform ("1"-mobile). This parameter appears in transaction_bet_payin requests only when you push it into iFrame JavaScript launch code.
Note: this parameter isn't being used for desktop platform.
amount int Amount of the exact bet to withdraw from account.
Important: amount is in cents.
bet / bet_id bigint Unique bet id on BetGames.TV server.
bet / transaction_id bigint Unique transaction id on BetGames.TV server. Partner is obliged to store processed transaction ids. If the request contains the same transaction id, Partner should return success status, but do not withdraw money from the balance again.
bet / draw / code string Draw code number.
bet / draw / time string Draw start time, UTC.
game / id int or varchar Game ID in Betgames system - List of game ID's.
game / name string Game name in English.
game / translation string Game name in player's language.
odd / id int Odd ID in Betgames system - List of odd ID's.
odd / name string Outcome name in English.
odd / value float Outcome value.
odd / translation string Outcome name in player's language.

 


 

1.0. Example of successful response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_multi_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1577836800</time>
    <params>
        <balance_after>999700</balance_after>
        <bet>
            <transaction_id>246912</transaction_id>
            <success>1</success>
            <error_code>0</error_code>
            <error_text></error_text>
        </bet>
        <bet>
            <transaction_id>246913</transaction_id>
            <success>1</success>
            <error_code>0</error_code>
            <error_text></error_text>
        </bet>
        <bet>
            <transaction_id>246914</transaction_id>
            <success>1</success>
            <error_code>0</error_code>
            <error_text></error_text>
        </bet>
    </params>
    <signature>92339383ecdbbd181880500686dbd932</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_multi_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1577836800balance_after999700bettransaction_id246912success1error_code0error_texttransaction_id246913
    success1error_code0error_texttransaction_id246914success1error_code0error_text1JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    92339383ecdbbd181880500686dbd932

 

2.0. Partial success is possible. Example response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_multi_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1577836800</time>
    <params>
        <balance_after>999700</balance_after>
        <bet>
            <transaction_id>246912</transaction_id>
            <success>1</success>
            <error_code>0</error_code>
            <error_text></error_text>
        </bet>
        <bet>
            <transaction_id>246913</transaction_id>
            <success>1</success>
            <error_code>0</error_code>
            <error_text></error_text>
        </bet>
        <bet>
            <transaction_id>246914</transaction_id>
            <success>0</success>
            <error_code>703</error_code>
            <error_text>insufficient balance</error_text>
        </bet>
    </params>
    <signature>34b65e7c2f22719689dd4f727974e62e</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_multi_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1577836800balance_after999700bettransaction_id246912success1error_code0error_texttransaction_id246913
    success1error_code0error_texttransaction_id246914success0error_code703error_textinsufficient balance1JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    34b65e7c2f22719689dd4f727974e62e

 


 

3.0. Example of error response:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_multi_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <success>1</success>
    <error_code>0</error_code>
    <error_text></error_text>
    <time>1577836800</time>
    <params>
        <balance_after>999700</balance_after>
        <bet>
            <transaction_id>246912</transaction_id>
            <success>0</success>
            <error_code>703</error_code>
            <error_text>insufficient balance</error_text>
        </bet>
        <bet>
            <transaction_id>246913</transaction_id>
            <success>0</success>
            <error_code>703</error_code>
            <error_text>insufficient balance</error_text>
        </bet>
        <bet>
            <transaction_id>246914</transaction_id>
            <success>0</success>
            <error_code>703</error_code>
            <error_text>insufficient balance</error_text>
        </bet>
    </params>
    <signature>1ca007a86ffb3239f316d6b0d99350cb</signature>
</root>
  • Signature calculation string:
    methodtransaction_bet_multi_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820success1error_code0error_texttime1577836800balance_after999700bettransaction_id246912success0error_code703
    error_textinsufficientbalancetransaction_id246913success0error_code703error_textinsufficient balancetransaction_id246914success0error_code703error_textinsufficient balance1JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    1ca007a86ffb3239f316d6b0d99350cb
Required Response Child-Elements for <params>
Field Type Description
balance_after int Player balance after the transaction.
Important: amount must be in cents.
bet / transaction_id bigint Unique transaction id on BetGames.TV server. Partner is obliged to store processed transaction ids. If the request contains the same transaction id, Partner should return success status, but do not withdraw money from the balance again.
bet / error_code int Partner internal error code. In case of success returns 0; Note: code 404 is prohibited (being used by BetGames.TV in case of network connection problems).
bet / error_text varchar text description of the error