It isn't that basic. First, using Receive Payment with no charges applied creates Uncategorized Income on Cash Basis reporting and Negative AR on Accrual Basis reporting.
Negative AR = Backwards. That really is a Liability. However, if you are a cash basis reporting entity, you are not allowed to carry this as Liability or Negative AR. You have to carry it as Income.
So, you use an Other Charge Item on a Sales receipt when you first get the funds. That item is linked to Income or the Liability, as required for your accounting needs. You never want Negative AR and avoid using Receive Payment when there are no open Charges.
You invoice for the work as if they are going to pay you.
You use the same Prepayment Item on a Credit memo for the date of the invoice, to apply it to the real charges, and "use up" the prepayment.
You will need to run reports to manage Prepayment and avoid over-crediting.
There are some good help topics. Here:
Ask you Accountant about your Requirements as Cash or Accrual.
This assumes you are not responsible for Trust Accounting. Trust Liability accounting is handled a bit differently.