You must enroll using the DD Perks app.
I signed up and wasn’t sure where the promo code goes. I finally realized you need a DD card to sign up. I bought a tiny amount to test it out (since I go to Dunkin’ anyway), and when I registered for the DD Perks afterwards, there was a place to enter the promo code. Make sure you fill out the promo code! And make sure you are creating a new account, not previously linked to DD Perks.
I want to note this process was confusing–I didn’t see any confirmation of the $5 gift card, even though the promo code went through. Dunkin’ is a legitimate company and their app has good reviews, but everyone else on twitter responding to them seemed confused that there is no confirmation for the $5 card (or notice saying the promo ran out) and were worried they didn’t get it.
I didn’t see the gift card on the app yet. So I logged into the browser version of DD Perks after that, and saw two gift cards sitting there–the small one I bought, and the $5 one from Dunkin’.