Front-End Integration
Guide on how to integrate Pending Bonuses in your site's front end.
馃捀Get Pending Bonuses
To get pending bonuses you will use the following code
So our call will return a Promiseand then you can do what you want in then & catch to implement error handling
An example response looks like this:
Type = 1 = Standard Bonus (no bonus code supplied)
Type = 2 = Deposit Bonus (code for deposit supplied)
Tyoe = 3 = Unlockable Bonus (code for bonus supplied)
馃挵Activate Pending Bonus
This method should be run only for:
- Type = 1 Standard Bonuses - so that the bonus code is applied to the user and marked as claimed
- Type = 3 Unlockable Bonus - so that the bonus code is applied to the user and marked as claimed (Needs to have property IsLocked = 0, otherwise error returned)
To consume a pending bonus you should pass the Id from the selected bonus.
So our call will return a Promiseand then you can do what you want in then & catch to implement error handling
An example response