Showing ID When Paying With a Card

Do you have to hand over your driver's license when a merchant asks?