Mercenaries were usually bought by unit, from their sovereign or other commander, so that they would fight as a unit. It was generally too hard to recruit individual mercenaries one by one and make them all fight the same way. The commander or ruler was responsible for paying his men from the proceeds of the "sale," but mostly paid them as little as possible, and pocketed the difference.
Officers of the hiring army would be most likely check out a mercenary unit if this was a one-time transaction. If the hiring army had bought "regiments" from the same king before, they usually knew what they were getting.
Some details of which kings sold which troops to which people During the war of the Roses are here.
Another example of this was the Hessian mercenaries hired by the British during the Revolutionary War.