The Dworkin framework Fee model allows defining multiple fee rules than can be applied to customer card accounts during payment process. Each application fee rule can be presented via combination of the following DB tables:

Main table defines transaction amount range and currency, specific business merchant account and operation type for fee application

Dependent table defines fixed fee amount or percent and funds destination business account with destination and fee type

Therefore it is possible to define unique set of fee rules for each specific API merchant customer, for each specific operation, for each specific currency and transaction amount range.

Let’s take an example from Dworkin demo environment for Transfer funds operation between card accounts:


As shown Fee with ID#5 defines rule for API merchant account ID#45 for Transfer operation for transaction amount range from 0 to 10 million EUR.

Next table entries represent  specific fee rules for fee with ID#5 defining 10% surcharge fee from sender card account and 5% withholding fee from receiver card account. Fee destination merchant account for fee accumulation is #45.

Here is example from Dworkin wallet transactions history showing transfer operation for transaction with amount 10 EUR:

Sender card:

Destination card:

The Dworkin framework Fee model allows to define Third Party fee rules for payment integration with external payment gateways, like Paylike demo integration used for cash in operations via credit/debit cards.

As shown above in fee rules table from Dworkin demo environment fee rule with ID#1 defines 25% surcharge fee that will be applied to amount debited from source card used for cash in operation.

All fee transactions are stored in Dworkin DB and grouped by one operation with main debit/credit transaction which allows easily to obtain whole transaction group from DB for reporting:

Each particular operation type requires additional development of fee rules management application. Here is example of transaction payment logic located in TransferTransactionPerformer described in Operation Processor service: