Skip to content

Fees-&-Promotions

The SchemeConfiguration table together with Scheme and SchemeType tables describes what fees and promotions belong to what user groups. There are 8 SchemeTypes
|SchemeTypeId|Name |
|------------|-------------|
|0 |Unused |
|1 |BaseScheme |
|2 |Signup Bonus |
|3 |Subscription |
|4 |ReferralBonus|
|5 |GenericBonus |
|6 |Calling |
|7 |Cash Deposit |

The Scheme table maps these types to specific groups
|SchemeId|SchemeTypeId |Name |
|--------|-------------|--------------------------------|
|1 |1 |Global |
|2 |1 |1 Month Free Trial |
|3 |1 |AmbassadorScheme |
|4 |1 |AdvisorScheme |
|5 |3 |Compensated Subscription |
|6 |3 |Free Trial |
|7 |3 |Ambassador Subscription |
|8 |3 |Advisor Subscription |
|9 |4 |General Referral Bonus |
|10 |4 |Ambassador Referral Bonus |
|11 |4 |Advisor Referral Bonus |
|16 |1 |User reactivation |
|18 |1 |StockholmEmployeeScheme |
|19 |3 |StockholmEmployee Subscription |
|20 |4 |StockholmEmployee Referral Bonus|
|22 |6 |General Calling |
|23 |1 |UsEmployeeScheme |
|24 |3 |UsEmployee Subscription |
|25 |4 |UsEmployee Referral Bonus |
|26 |7 |General Cash Deposit |
|1001 |1 |TestRefundLess |
|1002 |1 |TestRefundMore |
|1003 |1 |TestNoRefund |

The SchemaConfiguration table describes what Configuration belongs to what SchemeId. For example the 1 Month Free Trial user has a BaseScheme type and SchemeId 2 so the configuration for those users looks like this

{
    "Subscription": 6,
    "ReferralBonus": 9,
    "GenericBonus": "13",
    "Calling": 22,
    "CashDeposit": 26
}

Theses values then depending on their type and schema can references other SchemeConfigurations. For the 1 Month Free Trial users, since its SchemaType is the BaseScheme the configuration references the specific SchemeTypes and SchemeIds for Fees and Promotions. ReferralBonus has ScheemaTypeId 9 which looks like this
{
    "BonusAmountToReferredUser": {
        "Amount": 10,
        "CurrencyId": "USD"
    },
    "BonusAmountToReferredByUser": {
        "Amount": 20,
        "CurrencyId": "USD"
    },
    "ReferralExpiryDays": 30,
    "BonusLimit": {
        "MaxNumberOfReferrals": 2,
        "CreditDirectionIfLimitExceeds": "None"
    },
    "ReferralProgramEnabled": true,
    "MaxNumberOfReferralsEnabled": true,
    "MaxNumberOfReferrals": 5
}

If there are multiple SchemeConfiguration per SchemeId, it is the latest one that's being used.