Some synonyms for giving away are:
- Gifting
- Rewarding/Awarding
From my retail experience, gifting is a more favourable word choice as it plays into a friendlier and customer serving relationship whereas give away sounds a tad belittling towards the customer and seems to carry a more negative connotation.
Rewarding and awarding are very similar in that they would be best used when the customer has to do something to get the discount code like show up to the store first or spin a wheel for a prize. If these codes are being just handed out randomly, I wouldn't use reward or award, as reward does mean to recognize and praise one for their actions.