Matchup Game

Place bet

https:/{your_server}/bets

Is called whenever a user tries to place a bet slip. To cancel the bet respond with a JSON object with an error property and HTTP status 402 Payment Required.

To fulfill the bet slip, deduct the appropriate amount of money from the user's wallet and respond with an OK.

This callback will be called with:


    
{ "bets": [ { "user": { "client": String, // Client name (customer) "uid": Number, // Identifier of your user "ip": String // Ip of the user submitting the bet slip }, "pool": { "client": String, // Client name (customer) "currency": String, // Currency of the bet slip "game": String, // This will always be player_matchups "uid": Number, // Unique id of the coupon "overdraw": String // Potential payout }, "bet": { "uid": Number, // Id of the bet slip "amount": String // The amount to deducte the user } } ] }

Settle bet

https:/{your_server}/winners Is called when a bet slip is settled, and prize distribution is requested.

This callback is triggered whether they won anything or not. If the endpoint responds with an error, the bet will not be marked as settled and might be tried again later.

Your endpoint should distribute the given winnings to the listed bets and respond with an OK.


    
{ "pools": [ { "pool": { "client": String, // Should always be fanteam "game": String, // This will always be player_matchups "uid": Number, // Unique id of the coupin "currency": String, // The base currency of the coupon "overdraw": String, // Total Payout for slip "cost": String, // The users stake "guaranteed": Boolean // Will always be true for this game }, }, "bets": [ { "user": { "client": String, // client name (customer) "uid": String, // Identifier of your user "name": String // Username for your user }, "bet": { "uid": Number, // Transaction id of the bet "currency": String, // The currency used for the bet "amount": String, // The amount to deducte the user "odds": Number, // The odds the user bet on "rake": Number, // This will always be zero (not relevant for this game) "payout": String, // The amount the player has won (the amount to credit the player) "base_payout": Number, // Always the same as payout "result": String, // Status of the bet slip "extra": Object // All extra meta data about the bet slip (for reporting purposes) } } ] } ] }