I am developing a website with PHP in which a user can rent a product. Along with the rental price the user also has to pay a security deposit which is usually the actual product price. The payments are being done by credit card.
I want the rental fees to deposited immediately to the seller's account, but the deposit fee should be on hold. When the buyer returns the product, the seller should have the option to return the security deposit to the bank account of the user from where the fee was taken. If I found that a product is somewhat damaged and it would cost me $10 to fix it, then I should be able to deduct $10 from the security deposit and return the remainder of the deposit to the buyer.
I can't use PayPal because PayPal does not hold money already transferred to the other account, meaning the other person (the seller) can withdraw the money sent to him. Something like a wallet to be built on my site will help me, as it's done in Paytm Wallet web application, but it must also be able to handle escrow payments. Can you recommend another solution for my website in which escrow payments are possible?