Modeling payment rails, fee waivers, account balances, and internal wallet transfers as an auditable chain.
A virtual account deposit may arrive through several rails. Each rail can have a different fee: a percentage, a flat charge, a cap, a threshold waiver, or no fee at all. Monthly account maintenance may depend on the previous month's volume.
If the system stores only the net amount credited to the customer, neither the customer nor operations can reconstruct what happened.
Persist the components separately:
gross received payment rail transaction fee maintenance fee, if applicable net virtual-account credit rate used for any conversion wallet amount credited later
Enter fullscreen mode
Exit fullscreen mode
The provider webhook supplies evidence such as the rail and external amount. The platform applies the fee policy that was effective at the transaction time.…