A payment changes cash and settles part or all of a posted invoice. Apply it to the intended document, using the amount supported by the receipt or payment evidence. Two invoices can belong to the same customer, so the name alone doesn't identify which balance should close.
An invoice's open amount equals its invoiced amount less payments and credits in this model. It prevents an application larger than that remainder. The simulator uses a compact payment action instead of the full Business Central payment-journal and bank-export workflow. No money moves outside the browser. After posting, inspect both the invoice balance and the bank side. A correct cash total can still hide application to the wrong customer document.