How to be the middleman i.e take a commission on payments? [marketplaces etc]

Hey all!

Let’s say I had a marketplace where users can exchange payments but I wanted to take a % commission of each payment, how can I achieve that?

User A pays User B for a service

Possibility 1 - I receive the payment, take my cut, then pay user B
Possibility 2 - % is automatically taken and sent to me, rest is sent to User B

My assumption is to have a Stripe checkout where users make payment. This payment goes into my Stripe account, from there I pay User B. Only issue with this is 2x Stripe fees…

Any help would be seriously appreciated!

Here is my site Read-Only: LINK
(how to share your site Read-Only link)