Monkey Bytes - Gain, entertain, retain

Back end

Refund bet

https:/{your_server}/bets/cancel

Is called when a single team has been unregistered from a tournament. Your endpoint should refund all specified participants in full (buy-in + rake) and respond with an OK.

This callback will be called with:


{
  headers: {
    authorization: 'Bearer %customer% {admin_token}'
  },
  body: {
    pools: [{
      pool: {                         // Data about betting pool (tournament)
        client: String,               // Name of white label, not necessarily yours
        status: String,               // Status of the tournament, probably 'waiting'
        game: String,                 // Type of game being played. Should be "fantasy"
        uid: Integer,                 // Id of tournament, unique within game scope
      },
      bets: [{
        user: {                       // Data about the user owning the fantasy team
          client: String,             // Name of white label, only yours
          uid: String,                // Unique ID of user
          name: String                // Username
        },
        bet: {                        // Data about the bet being made (fantasy team)
          uid: Integer,               // Id of the fantasy team, unique within game scope
          amount: String <Decimal>,   // Buy-in
          rake: String <Decimal>,     // Rake
        }
      }]
    }]
  }
}

Valid tournament statuses are:

  • waiting
  • in_progress
  • pending_confirmation
  • closed
  • cancelled
Previous
Refund bet