Setting Up
Using commission calculator v2 you have to know these steps
For using this way of commission calculating
Add p2p.calc_version=v2 this property to application properties file to enable v2 commission calculating.
And after adding this property you have to add brv.amount = 33000000 also for using BRV amount based calculations. You should set amount of BRV in Tiyin.
As we know from previous pages commissionPart is main part for calculating commission.

Commission Multiplier type - is unit for calculating commission by percent , by fixed amount or by BRV.
So there are three commission part calculator services for these three CommMultiplierTypes
If new CommMultiplierType added you can implement P2pCommPartCalculator for this MultiplierType
And partDetails field of P2pCommissionPart is additional details for calculating commission.
It stores as json string. With this field we implement step based commission.
ex: We want to increase commission for every added 500k UZS to Amount of Operation.

In this picture
STEP is step of amount of operation that if added we increase.
STEP_COMMISSION is step of commission adds if stepped.
And we calculate commission like this
If Amount of Operation is between
[0; 500K) -> 300 UZS
[500; 1000K) -> 300 + 500 = 800 UZS. coz, 500K added
[1000; 1500K) -> 300 + 2*500 = 1300 UZS. coz, 500K added twice
In this picture step is step of amount of operation in tiyin.
stepCommission is step of commission.
Last updated