Based on the information and my understanding, most often the money on the two-sided marketplace goes directly to the seller's bank account (minus the fees of the provider) after the buyer received service/product.
Is it legally possible to add money to the balance so the seller can later buy someone else's service/product with the money he earned?
Answer: Yes, it is possible. And it is legal.
Your information is not accurate. Most modern marketplaces (fiverr.com, odesk.com, elance.com) allow sellers to use the money they win (which is collected in a virtual wallet), and make purchases in the site.
When the buyer makes a purchase, the money is actually paid to the company (and the seller only receives money from the company when he makes a withdrawal request). Unless a withdrawal request is made, that’s if the seller decides to shop from his earnings, the money is kept by the company.
If you have further questions on marketplaces, payments and related stuff, you can call me.
There are legal, regulatory and risk implications to retaining and handling funds as a marketplace.
The good thing is with marketplace platforms becoming more mainstream, the payment solutions ( such as Stripe, BrainTree, WePay etc) have also evolved to support their unique needs/services provided.
Depending upon your marketplace model you could choose to just transfer funds to the Seller minus your fees/commission OR hold onto funds (for a certain period) giving your users the ability to withdraw funds upon their choosing.
The payment solutions you choose vary by the use case, and the solution providers take responsibility for legal, regulatory and risk implications.
I have experience in payments for maketplaces and would be happy to share more feedback and suitable solutions over a call.