Hello. I am developing an app that acts as a freelancer platform. Clients and Freelancers can register themselves on the app and the whole process like Upwork. Right now I am using strip for the payments though I plan on adding more payment methods in the app but right now I am sticking with the Stripe.
Now my concern here is that if the user selects his job as a one time fixed payment that is working fine and also if the job type of the user is pay by hour the user needs to specify the number of hours when creating the job and the amount he wants to pay per hour. This amount can be changed and proposed by the freelancer too.
Right now when the user hires a freelancer (per hour) the logic that is implemented is that the whole amount (number of hours * rate per hour) is charged from the user and transferred to the freelancer once the user marks the job as complete.
What I want to do is pay the user on a weekly basis i.e. we can say like a user has a work of four weeks and per hour rate is set to let suppose 150$ then the whole amount calculates to be 600$ which will be captured from the user at the time of hiring which is not a good approach so what I want to do is divide the payments on weekly basis while everything else remaining the same. Like 600$ is divided by 4 and each week the user is charged $140 and all of these payments being held in escrow and being transferred to the freelancer once the job is done.
Now I am not being able to process how to do this ? Can anyone point me in the right direction? I hope I explained the scenario well. Still if there are any questions I am happy to answer them.