Wallet Type Configuration
Transaction Limits
Wallet transaction limits are controlled with wallet type attributes as well as attributes directly on a wallet. If an attribute is found on both, then the one on the wallet takes precedence.
Transaction limits attributes are configured based on various options that are encoded into the attribute name. The pattern is as follows:
limit.<Grouping Type>.<Collation Period>.<Direction>.<Transaction Type match>.<Numeric error code>=<limit in wallet currency or ISO 3 Currency Code-limit>
Powerful and generic rules can be built up using this notation. The description of each part is as follows:
Grouping Type
This can be one of:
Wallet - The limit is calculated based on the transactions of the wallet itself when a transaction takes place on that wallet. E.g. a limit of R1000 in total debits over a period on that exact wallet
User - The limit is calculated based on the transactions of all wallets associated to the same user as the wallet being transacted on. E.g. a limit of R1000 in total debits over a period across all wallets linked to the same user as the wallet processing the transaction.
Organisation - The limit is calculated based on the transactions of all wallets associated to the same organisation as the wallet being transacted on. E.g. a limit of R1000 in total debits over a period across all wallets linked to the same organisation as the wallet processing the transaction.
Collation Period
This can be one of:
Transaction - The limit applies to the actual transaction being processed and does not use any historic data
Hourly - This transaction plus the transactions since the beginning of the current hour
Daily - This transaction plus the transactions since the beginning of the current day in the timezone of the tenant
Monthly - This transaction plus the transactions since the beginning of the current month in the timezone of the tenant
NA - Used to indicate the period is not applicable. Used for maximum balance checks where Period is meaningless
Direction
This can be one of:
Balance - Indicates the check is for the maximum current balance if this transaction were to be allowed
Debit - The check must run on debits and consider the sum of historical debits over the selected period
Credit - The check must run on credits and consider the sum of historical credits over the selected period
DebitOrCredit - The check must run on credits and debits and consider the sum of historical credits and debits over the selected period. The sum is of the absolute value e.g. R100 of debits and R200 of credits would be R300
DebitCount - The check must run on debits and consider the count of historical debits over the selected period
CreditCount - The check must run on credits and consider the count of historical debits over the selected period
DebitOrCreditCount - The check must run on credits and debits and consider the count of historical credits and debits over the selected period
Transaction Type Match
This can be "All" to match all transactions or refer to a sub property under property wallet.limits.type.config which indicates a label and associated regular expression to match the transaction type.
As an example if wallet.limits.type.config has a sub property DomesticPUR=^postilion.pur.domestic$
Then one could use DomesticPUR as a transaction type match to apply the rule if the transaction type of the transaction exactly matches "postilion.pur.domestic" (tfr.debit and tfr.credit prefixes are ignored). This also means that if a period is specified then the limits are calculated on all transaction types that match. So one could create a limit to apply a maximum number/sum of cash withdrawal transactions over a day. The use of regular expressions allows for complex matching that could include a list of transaction types.
Numeric error code
If a limit is breached then an error that starts with "LIM" is returned. Its of the format LIMXXX where XXX is a 3 digit number zero padded. The number is as per the code set in the limit name. E.g. a limit like limit.Wallet.NA.Balance.All.20 would trigger an error with code LIM020
Limit itself
The limit can be a number and then it is in the currency of the wallet. Or it can consist of a ISO 3 currency code e.g. USD and then a "-" and amount. In any case, the limit is converted to the wallets currency being looked at using the currency converter plugin. If the grouping is user or organisation and the different wallets have different currencies, then those currencies are converted to the currency of the wallet being transacted on just like the limit is converted. The limit thus correctly considers different currencies.
Examples
maxCurrentBalance -> limit.Wallet.NA.Balance.All.20
maxCreditsPerMonth -> limit.Wallet.Monthly.Credit.All.2
maxCreditPerTransaction -> limit.Wallet.Transaction.Credit.All.6
maxDebitsPerDayForOrganisation -> limit.Organisation.Daily.Debit.All.14
postilion.pur.domestic.debitCardDailyTransactionVelocityLimit -> limit.Wallet.Daily.DebitCount.DomesticPUR.38
maxTransactionTotalPerDay -> limit.Wallet.Daily.DebitOrCredit.All.7
Updated 14 days ago