Appearance
Appendix E - Discounts
To implement live discounts, the operator sends discount information with every request that returns a balance in reply. Subsequent doTransactions calls apply this discount. The operator must check that the submitted discount is eligible. If the discount is not eligible, the operator must send an error back on debit requests and must not accept the call.
To activate this functionality, contact hizi.io support.
The operator can send an optional discountInfo object together with every balances object it returns in response to a call from the Hölle API. This applies to getBalance and doTransactions calls.
If a discount applies, the engine sends it in the gameTransaction structure in a debit transaction through doTransactions. The engine sends the original stake as amount. The operator must deduct the discountAmount when it debits the player's wallet. Example: a call with amount = 100 and discountAmount = 10 results in a debit of 90, in 1/100 of the base currency given in that call.
If the discount is not eligible, the operator must deny the operation. The operator sends error code 33 back (DISCOUNTNOTELIGIBLE). See Response Codes & Error Codes. The operator must not debit any amount. The operator must not start a game round.
discountInfo
This type describes the discount information available to the player. The operator can send it in every call that returns a balances object.
| attribute | type | allowed values | mandatory | notes |
| text | string | any | YES | Text to display in the frontend. Localize it based on the session. |
| currency | currency | any 3 character currency code | YES | ISO 4217 3 letter currency code |
| discounts | Array of discount entries defining a discount in absolute amount per stake | Array of discountEntry | YES | |
| campaignId | string | any | YES | Campaign ID that identifies the discount. The API sends it back in debit calls. |
| validFrom | timestamp | any valid value | NO | Timestamp when this campaign starts. If not present, the engine uses the current date. |
| validTo | timestamp | any valid value | NO | Timestamp when this campaign ends (inclusive). If not present, the campaign is valid forever. |
discountEntry
| attribute | type | allowed values | mandatory | notes |
| stake | amount | any | YES | Stake in 1/100 of base currency |
| absoluteDiscountAmount | amount | any | YES | Discount in 1/100 of base currency to apply to the stake above |
| spinsRemaining | number | any | NO | Number of remaining spins (bets) for this discount. For information only. |
| Samples | Description |
| { "text": "happy hour", "currency": "EUR", "discounts": [ { "stake": 10, "absoluteDiscountAmount": 1 }, { "stake": 100, "absoluteDiscountAmount": 10 } ] } | Example of discount information. It gives a discount of 1 cent for a stake of 0.10 EUR. It also gives a discount of 10 cents for a stake of 1 EUR. |