To credit a payment to an invoice,
Navigate to your list of Payments by going to:
Select the payment you want to connect to an invoice
Click on the "Add New" button
Note: If you want to change the invoice this payment is connected to, click on the Remove button ("-") button in the "Credit this to an Invoice" section
Select the invoice you want to credit this payment to
Enter the amount of this invoice you want to credit to this invoice
To credit the full payment to an invoice, just full the total amount ($50 in this example)
Click on the Save button
The payment will now be connected and credited to the invoice and the invoice should say "Paid" or "Partially Paid" depending on the amount that was credited
Note: if the invoice does not change to show the accurate state, refresh your page