I'm building an application that will use a payment gateway such as square or stripe. After I have successfully transferred the funds to my gateway account I need to split the money into shares such as 20% commission fee and 80% to the agency that provides the actual service. After I have split the money I need to send it to their individual bank accounts. The question is:
Can something like this be done using standard payment gateways and if it cannot be done, is there any other options to implement this?