CodeDrop: giving away promo codes without the chore

CodeDrop is a small web app I built to give away App Store promo codes for iOS apps. You share one link, each person signs in with Apple, and they get a unique and private redemption code.

I'm using it right now for Bola & the Abyss: sproutworx.com/codedrop/a/the-abyss.

The problem

Giving away promo codes is a chore. There are two common ways to tackle it, both of which annoy me.

Post the whole list. It's quick for me, but now everyone has to try codes one by one until they find one that hasn't been used. Usually a few people (or bots) grab a handful each, and the list is dead in an hour.

Hand them out one at a time. Everyone gets a working code, but it eats an entire day of answering DMs and replies, keeping track of who got what, and saying sorry to the people who showed up late.

Then there are Apple's rules, which most people don't know about:

None of this is hard on its own. It's just a lot of small, fiddly work, every time I want to promote an app.

What I wanted

The approach

Each of these needs turned into a feature.

One page, one button

Every app gets a single page: icon, name, price, and a "Get my code" button. Everything else (screenshots, description, ratings) sits below the button for anyone who wants to read more. The page pulls those details from the App Store automatically, so adding a new app is just pasting its ID in the admin panel.

The CodeDrop page for Bola & the Abyss: icon, name, price, and a Get my code button

Sign in with Apple as the gate

To get a code, you sign in with Apple, solving three problems at once:

I don't keep your name or email. I store a scrambled (salted and hashed) version of the Apple ID, which is enough to say "this person already has a code" and nothing more.

Never the same code twice

The most important rule is that two people can never get the same code, even if they click at the exact same moment. Handing out a code is a single all-or-nothing step: it marks the code as taken, records who got it, and counts it against the day's limit together. If any part fails, none of it happens. Unclaimed codes are never shown anywhere public, so there's no list to scrape.

The code page: your code, a Redeem button, and Apple's terms for your country

Country checks and the right terms

The page checks which country you're visiting from. If the app isn't sold there, you get a polite "not available in your region" instead of a code that won't work.

For the terms, I took Apple's wording and built in all 175 App Store countries, each with the Apple company that sells apps there. Your code page shows the version for your country, filled in with your country name, the expiry date, and my developer name. I don't have to copy and paste anything per country.

Pacing and alerts

Each app can have a daily cap, so a post that takes off doesn't burn every code in one afternoon. There are also limits on how fast any one browser or network can try, to slow down anyone trying to game it.

I get an email when an app is running low on codes, and another if claims suddenly jump, so I can pause it if something looks off.

An admin side that's quick to use

I generate codes in App Store Connect, paste them in, review them, and save. I can pause an app, change the cap, or see how many codes are left.

The most useful tool turned out to be a preview. I can see the exact page a visitor in Japan, Brazil, or Germany would see, terms and all, without using up a real code.

Cheap to run

It runs on AWS, built with CDK, and there are no servers sitting around waiting. Each request runs as a Lambda function behind an API Gateway HTTP API, served from the same CloudFront setup as the rest of sproutworx.com. Codes and claims live in a single DynamoDB table billed per request. Secrets sit in SSM Parameter Store, and a small hourly job sends low-stock and spike alerts through SNS. When nobody is claiming codes, it costs next to nothing, and even a busy day is a matter of cents. There's no paid service in the middle of it.

What's next

A few things I'd like to add:

If you'd like a free copy of Bola & the Abyss, here's the link: sproutworx.com/codedrop/a/the-abyss

All posts