How do bitcoin merchants know that it was YOU that payed them
because they most likely generated a new address for you to send your payment to.  Since you're the only one that was given that address, when the payment comes in for that address, they know it was  you that paid it.