AP Prepayment for Payment Service provider

Hello everyone,

I have a problem resolving the following scenario:

We have a Service Provider who pays lumper fees for us. We have to prepay an amount X let's say 2,000 USD and the service provider will pay the lumper fees until this amount is almost depleted. Afterwards they request additional payment. Those payments have been made with wire transfers and credit card.

We receive all receipts the provider pays lumper for. We need to have the prepayment recorded on a prepayment B/S account to keep track.

Also we want to enter the individual receipts so we can add information like customer and oder within the comment for the P/L entry.

Of course it will occure that the left over amount from the first prepayment is only 50 USD when the next lumper receipt is 150 USD so it has to use 50 USD from the first and 100 USD from the second prepayment.

Does anyone have an idea how to properly and least manual this scenario can be recorded?

Thanks in advance.

Markus