MasterCard  or Visa card doesn't work in Iran due sanctions against Iran. You can use IntravelCard as an alternative to your MasterCard in Iran. IntravelCard is a prepaid travel card for tourists who visit Iran.