Thank someone politely
ありがとうございます is the polite thank-you. The short ありがとう is for friends.
JLPTN5
ありがとうございます
Use ありがとうございます with anyone outside your closest circle: someone in a shop, a teacher, the person who just held a door for you. A common reply is いいえ, “not at all”. When the favour is already done you hear ありがとうございました instead.