Atomic counters
Lock-free redemption uses Postgres advisory locks + SKIP LOCKED. Two phones tapping at once never double-spend a single-use code.
Issue, throttle, and redeem promo codes from your mobile app with one HTTP call. Per-user limits, atomic counters, instant analytics — without the lock-and-counter scar tissue.
Lock-free redemption uses Postgres advisory locks + SKIP LOCKED. Two phones tapping at once never double-spend a single-use code.
Cap redemptions by the user_id your client sends. One-per-user, three-per-user, or per-cohort — enforced server-side.
Redemptions stream into your dashboard the moment they happen. Top codes, sparklines, per-IP and per-user drilldowns — no warehouse, no waiting.
Spin up 100,000 unique codes from a prefix + length in seconds. Capacity math live, CSV download one click, instantly attributable per influencer or partner.
One endpoint, served from 14 regions. Your South African users hit Cape Town. Your Tokyo users hit Tokyo. No SDK wrapper, no platform-specific code.
Two key kinds, one model. Ship publishable in your app — it can only redeem. Keep secret on your server — it manages everything. Rotate in two clicks.
Promocodes is just HTTP. Drop a publishable key into your app, call /api/v1/redeem with the code and user id, and we handle the rest.
Pick a tab below — Swift, Kotlin, React Native, or raw curl. No SDK to update. No platform-specific code paths.
expired, limit_reached, unknown_code// iOS — Swift let body = ["code": code, "user_id": userID] var req = URLRequest(url: URL(string: "https://api.promocodes.dev/api/v1/redeem")!) req.httpMethod = "POST" req.setValue(publishableKey, forHTTPHeaderField: "X-Api-Key") req.httpBody = try JSONSerialization.data(withJSONObject: body) let (data, _) = try await URLSession.shared.data(for: req) let result = try JSONDecoder().decode(Redemption.self, from: data)
Start free with 500 codes. Upgrade when a campaign needs more — no per-seat fees, no platform tax.
Test the API and ship a small drop.
For shipped apps running active campaigns.
For indie studios running multiple drops.
For high-volume apps and global drops.
Sign up, generate a publishable key, paste one HTTP call into your app. Your next promo campaign goes out tonight.