Skip to content

BB.GamingFunction.Shared

  • Method: POST
{
"bb_player_id": "2184758",
"currency": "EUR",
"paid": 10.00,
"token": "4654466D665766734A386F576E754867303136714456615A4F457235394F6D4D414F6B644D6E2B67476A692F2B39436C2B696E59764643766963552B48567774",
"part": "bet#test#{{$guid}}",
"sort": "customer#2184758"
}
  • Method: POST
{
"bb_player_id": "2184758",
"amount": 10.00,
"token": "4654466D665766734A386F576E754867303136714456615A4F457235394F6D4D414F6B644D6E2B67476A692F2B39436C2B696E59764643766963552B48567774",
"part": "bet#test#c6bebfc6-8c6b-48d1-ba01-009cfa6e9093",
"sort": "customer#2184758"
}

This Lambda function handles the cancellation of bets. The function accepts either a BbBetId or a combination of Part and Sort identifiers for each bet to be cancelled.

The request payload must contain an array of bets. Each bet must have either:

  • bb_bet_id OR
  • Both part AND sort
  1. Using bb_bet_id:
{
"Bets": [
{
"bb_bet_id": "2ddIW8ZDOOvx74R1daQcs0RmB79"
}
]
}
  1. Using Part and Sort:
{
"bets": [
{
"part": "bet#qtech#67e0355f1f821f00019e6c26",
"sort": "bet#qtech#67e035601f821f00019e6ce0"
}
]
}
  1. Multiple bets in a single request:
{
"bets": [
{
"bb_bet_id": "2ddIW8ZDOOvx74R1daQcs0RmB79"
},
{
"part": "bet#qtech#67e0355f1f821f00019e6c26",
"port": "bet#qtech#67e035601f821f00019e6ce0"
}
]
}

The function returns a response containing the results of the cancellation operation:

{
"results": [
{
"balance": 10.0,
"updateInfo": {
"status": "cancelled"
}
}
]
}
Terminal window
curl -X POST https://your-lambda-url/lambda-name \
-H "Content-Type: application/json" \
-d '{
"bets": [
{
"bb_bet_id": "2ddIW8ZDOOvx74R1daQcs0RmB79"
}
]
}'