If the money was directly deposited into your bank account, you can record it as a bank deposit. Then, use the A/R account and tag the customer's name so it becomes credits to them. You can use that to pay their invoice, like in the screenshots below.
If you just received the money and you placed it in your drawer or petty cash account, you can still make a deposit or create a journal entry, as shown below. Then, use it to pay the invoice.
That will do it. Always tag the customer's name when you use the A/R account in a bank deposit or a journal entry. Then, enter a description or memo for your reference in the future.
You can always go back to this thread if you need more help recording your transactions. Have a good one!