What is the difference between had and got?

The two sentences are examples of causative constructions. Without further context they essentially mean the same in this case. But it cannot be claimed that 'they are fully interchangeable in all situations'.

There is a section on the difference in meaning in The Grammar Book: An ESL / EFL Teacher's Course (p653):

Have. The verb have suggests a routine hiring or selecting in which a relation of authority is implied, as between customer-businessperson or creditor-debtor:

  • We had Ray mow the lawn. (He does it every week.)
  • I had the barber trim my hair. (It is his profession.)
  • Fred had John give him $5. (It was part of the debt that John owed Fred.)
  • ?He had a stranger on the street give him directions.

The questioned example above is inappropriate since it suggests a relation of authority which does not exist between two strangers in a chance meeting. The action performed must also relate to the specific area of authority.

Get. The verb get often tends to convey the sense that some difficulty was involved; perhaps the subject of the main clause used persuasion or coercion on the subject of the embedded clause:

  • I got Ray to give me $5. (He had refused earlier.)

Martin (1981)*, in a discourse analysis of causatives, provides support for the distinctions made above. In one of his native speaker survey questionnaire items, 20 out of 23 respondents chose get when it was clear that some difficulty was involved:

  • I had a lot of trouble finding someone to do it, but I finally
    (a) had the lawn mowed. (= 3) - (b) got the lawn mowed (= 20)

This Ngram shows that I had my hair cut is more common than I got my hair cut, which supports the contention made in The Grammar Book. But, interestingly, it shows a significant increase in I got my hair cut over the last few decades.

So nobody is going to pull you up if you say I got my hair cut, particularly if some difficulty was involved. For example:

  • After looking all day in town for a barber I finally got my hair cut at the airport just before departure.

The main difference between the two is one of formality. I had my hair cut is (pretty much) always acceptable, whereas I got my hair cut is fairly informal.

In conversation I might use either, but got sounds less educated.

Reference: Perfect English Grammar:

We can also use 'subject + get + object + past participle'. This has the same meaning as 'have', but is less formal.