Multi Currency Configuration
Eclipse natively supports multi-currency wallets - this is done by setting the currency wallet attribute on the wallet type.
However when supporting multi-currency wallets within the same tenant it is important to reference the wallet hierarchy and funds flow:
- For money flowing into non-system wallets (customer, organisation or tenant wallets that represent real money in the system) there is generally a corresponding system wallet that is debited.
- Similarly for money flowing out of non-system wallets (customer, organisation or tenant wallets that represent real money in the system) there is generally a corresponding system wallet that is credited.
These system wallets are typically set per withdrawal or payment transaction type and are set by tenant configs:
- source.wallet.config.{TransactionType}.{Currency} - wallet ID debited for this particular payment transaction type
- destination.wallet.config.{TransactionType}.{Currency} - wallet ID credited for the particular withdrawal transaction type
In addition fees wallets are created to collect fees - the logic for this can be set with simple self service fees using tenant configs:
- fees.wallet.config.{Wdr|Pay}.{TransactionType}.{Currency} - wallet ID where the fees should be collected
To support multiple currency wallets in a single tenant - for every non-system wallet of a particular currency you typically would need corresponding system wallets of the same currency for money flowing in and out of the system as well as for collecting fees in that currency.
Here is an example illustrating the wallet types, wallets and and tenant configuration required to support USD and KES digital wallets on the same tenant:
![](https://files.readme.io/1939b52-multi-currency-support.jpg)
And the corresponding tenant configs to enable this:
Config Name | Config Value |
---|---|
source.wallet.config.GLOBAL_BANK.EFT.SERVER.KE_DTB.KES | 1 |
source.wallet.config.GLOBAL_BANK.EFT.SERVER.KE_DTB.USD | 4 |
destination.wallet.config.KE_DTB_EFT.EFT.NORMAL.KES | 2 |
destination.wallet.config.KE_DTB_EFT.EFT.NORMAL.USD | 5 |
fees.wallet.config.Pay.GLOBAL_BANK.EFT.SERVER.KE_DTB.KES | 3 |
fees.wallet.config.Pay.GLOBAL_BANK.EFT.SERVER.KE_DTB.USD | 6 |
fees.wallet.config.Wdr.KE_DTB_EFT.EFT.NORMAL.KES | 3 |
fees.wallet.config.Wdr.KE_DTB_EFT.EFT.NORMAL.USD | 6 |
Cross currency transfer
By default transferring between wallets with wallet types that have different currencies is disabled. However this can be enabled by setting wallet type attribute crossCurrencyTransfersAllowed to true on the source and destination wallets.
Enabling this requires a custom wallet implementation to implement the exchange rate logic or to connect to an exchange rate service to do a real-time rate conversion to debit the source wallet and credit the destination wallet. The rate supplied by the API should be sufficient to cover any rate fluctuations between auth date and settlement date.
Updated about 2 months ago