First, the clerks who open your payments are human beings, and it's decent of you to not waste their time.
The first and normal way is that you include the payment slip in the return envelope. This payment slip positively identifies your account. It typically has "machine readable" features such as bar codes, MICR, or OCR-friendly fonts, which allow a high level of automation - scan both sides of each paper, identify the slip and OCR the numbers/barcode off it, then identify the check and submit the image through the clearinghouse system.
If the slip is definitely associated with a check, they don't care whose name is on the check.
Now, if the slip and check get separated, this will probably get direct human intervention. They will attempt to match it to one of their accounts. The evidence they will use are:
- The name and address preprinted on the check
- The account number you wrote on the "memo" line
- The minimum payment (or statement balance) versus the amount of the check
They will consider it a certainty if both are present and match; even a partial match will suffice. I omit numerals 7-12 when writing a credit card number:
4688 13xx xxxx 5041
They will see an account with my name/address, and also ending in 5041, and be satisfied that they have the right account.
For instance I have two accounts with one bank. If I simply sent a check with no slip and no account number, they would not know what account to apply it to.
If there is still ambiguity, they'll then compare the check amount to an amount they suggested on the bill. Suppose I write a $245.31 check. I have 3 accounts there: the "statement balances" are $10,431.44, $245.77, and $3544.13. The "minimum payments" are $245.31, $10.00, and $81.14. They will apply it to the first account.
If they cannot match it to a particular account with any measure of certainty, if they can uniquely identify a single customer from the address info, they may call you on the phone. Otherwise, they will return the check to the street address on the check, unless they captured a return address on the envelope. By the time you get the check and letter back, and you pay it again, your payment might be late.