If you got a promo code for certain app, for example, LGC5YHNR3LAY, you can redeem the code on the Mac App Store for FREE.
To redeem a code on the Mac App Store:
For the Mac App Store on macOS 10.13 and earlier.
Step 1. Launch the Mac App Store, log in with your Apple ID, in ‘Feature’ page, you can find the ‘Quick Links’ section located on the right. Click ‘Redeem’
Step 2. Enter or copy-paste your redemption code into the text field. (If you didn’t login in step 1, you’ll be prompted to sign in with your Apple ID in this step)
Step 3. Click ‘Redeem’ button
Step 4. You’ll receive a thank you message telling you the certain app is being downloaded.
Note: Promo codes have an expiration date, usually 4 weeks from the date it was generated. So please redeem the code before the expiration date.
For the Mac App Store on macOS 10.14 or later.
Reference: http://support.apple.com/kb/HT4480