From a Programming View this sounds complicated. However, as you like to use a Merchant Account and a Payment Gateway, you need to review the abilities they have and what they allow you to do.
If you are allowed to make batch payments to the suppliers from your Merchant Account, you need to setup a Database which handles all Buyer and Seller Transaction Data to perform the Batch Payments.
Keep an eye on Security, if you have to handle Payment Transaction Data like Bank Account Numbers or Credit Cards Numbers. Better you don't need to handle them as this kind of Data needs superior Security, but you may have access to them through your Merchant Account.
Your System must be able to handle the Payment Status correctly, so if a payment is pending from the View of your Merchant Account Provider, you will not pass it through to the Seller until it turns to have the Status "settled" or what ever Status make it finally balance it into your Account.
Don't bother with Factoring, as you don't want to have the risks for not getting payments from either of the invloved parties of a transaction. If it is possible for you the Setup the aforesaid System, you don't need to bother with Factoring anyway.
Most importantly your System and your behavior must show that you and your System are trustworthy. This means, passing payments correctly and so on. If you fail to proof this, you might not get another chance with this kind of service.