Appendix E - Discounts
To implement live discounts provided by the operator the operator can send discount information with every request that sends a balance in reply. This discount will be applied by subsequent doTransactions calls. The operator has to take care if the discount submitted is eligible and in case its not sending an error back on debit requests and not accepting the call.
In order to active this functionality please contact hizi.io support
Whenever a balances object is sent back in response to a call from Hölle API to the operator an optional discountInfo object can be sent back. This applies to getBalance and doTransactions calls.
If a discount should be applied it will be sent in the gameTransaction structure in a debit transaction sent via doTransactions. Note that the original stake will be sent as amount and the discountAmount should be deducted by the operator when debiting the players wallet. E.g. a call with amount = 100 and discountAmount = 10 should result in a debit of 90 in 1/100 of the base currency given in that call.
If the discount is not eligible the operator should deny that operation and send an error code 33 back. (DISCOUNTNOTELIGIBLE) - seeError Codes., No amount should be debited and no gameround should be started.
discountInfo
This type describes the discount info eligible to the player. Can be sent in every call that returns a balances object
| attribute | type | allowed values | mandatory | notes |
| text | string | any | YES | Text to be displayed in frontend (should be localized depending 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 which identifies the discount, will be sent back in debt cals |
| validFrom | timestamp | any valid value | NO | Timestamp when this campaign is valid from, if not present current date is used |
| validTo | timestamp | any valid value | NO | Timestamp when this campaign is valid to (including) if not present 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 be applied to the stake above |
| spinsRemaining | number | any | NO | Number if remaining spins (bet) for this discount, only informational |
| Samples | Description |
| { "text": "happy hour", "currency": "EUR", "discounts": [ { "stake": 10, "absoluteDiscountAmount": 1 }, { "stake": 100, "absoluteDiscountAmount": 10 } ] } | Sample of a discount information giving a discount of 1 cent for a stake of 0.10 EUR stake and a discount of 10 cents for a 1 EUR stake. |