Security

A prize is money. We treat every entry like a payment.

Promotions attract abuse the moment they go live: scripted guessing, retried requests, shared codes and races for the last prize. This page lists the controls LuckLogic runs today. Nothing here is a roadmap item.

Redemption integrity

Atomic prize allocation
A redemption and the prize it wins are written in one database transaction. The prize row is locked before it is assigned, so the last prize can only ever be won once.
Single-use codes
Each code is locked for the duration of its redemption and a unique constraint sits behind the lock. A second request for the same code gets CODE_ALREADY_REDEEMED with the original time.
Idempotent requests
Send an Idempotency-Key and a retried request returns the stored response instead of running again. The same key with a different body is refused.
Concurrent redemption protection
Simultaneous requests queue on the code, then on the participant's limit, then on the prize, always in that order, so they cannot deadlock. A request that waits too long is told to retry rather than left hanging.

Abuse protection

Per-participant limits
A campaign caps redemptions per participant over a window of up to 31 days, for example three a day. The counter is updated inside the redemption transaction, so two parallel requests cannot both slip under the cap.
Per-IP rate limiting
The hosted page and widget cap redemptions per IP address. The ceiling comes from the campaign's security preset: 10, 5 or 3 a minute for standard, enhanced and high-value campaigns.
Invalid-code budget
Guessing is cut off before it gets anywhere. After 20, 10 or 5 invalid codes in ten minutes, by preset, an address is refused before any lookup. A 10-character code from the 28-character alphabet is one of about 300 trillion, so even with two million valid codes a random guess hits one roughly once in 150 million tries.
Captcha where configured
Enhanced and high-value campaigns require a Cloudflare Turnstile check on the public entry page. The token is verified server-side on every redemption.
Per-key throttling
Each API key has a request-rate ceiling, so a runaway loop in one integration cannot take capacity from everyone else. It answers API_RATE_LIMIT_EXCEEDED with a Retry-After.

API security

Separate environments
sk_test_ keys see only sandbox campaigns and sk_live_ keys see only production campaigns. They never mix, and sandbox-only helpers such as force-win do not exist for live keys.
Campaign-locked publishable keys
The widget uses a pk_ key bound to one campaign and an exact list of origins. It can redeem a code on that campaign from those sites and do nothing else. Secret keys are workspace-wide; there are no finer per-endpoint scopes today.
Server-side usage
Secret keys belong on your server. The consumer's code goes to your backend and your backend calls LuckLogic. The docs and the SDK are written around that pattern.
Revocation and hashing
A key is shown once at creation and stored only as a SHA-256 hash. Admins can revoke any key at any time; the record keeps who created it, when it was last used and when it was revoked.
Portal access
Portal roles are viewer, developer and admin per workspace, and brand users are scoped to one client. Sessions are httpOnly cookies, passwords are scrypt-hashed, sign-up is Turnstile-checked and every state-changing request is origin-checked.

Webhooks

HMAC signatures
Every delivery carries X-LuckLogic-Signature: t=<time>,v1=<hmac>, an HMAC-SHA256 over the timestamp and the raw body with the endpoint's secret.
Timestamp verification
The signed timestamp lets your receiver reject replays. The reference check in the docs and the SDK's verifyWebhook() refuse anything older than five minutes.
Retries
A delivery that does not get a 2xx within 10 seconds is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours. Each attempt is logged with its status code and error.
Dead letters
After the sixth failed attempt the delivery is marked failed and kept. The delivery log shows it, and it can be replayed from the API or the portal once your endpoint is fixed.

Auditability

Every entry attempt
Wins, losses, unknown codes, reused codes and rate-limited attempts are all logged with their outcome, reason, participant, request id and latency, and kept for 12 months. The log is queryable per campaign.
Prize allocations
Each winning moment records which redemption claimed it and when, so every prize traces back to one entry and every unawarded moment is visible in the stats.
Claim changes
Claims have an append-only event history: created, auto-approved, approved, rejected, collected, fulfilled or expired, each with the actor and an optional note.
Campaign changes
Changing a live production campaign's dates or prize quantities requires a reason, and the change log keeps who, when, why, and the before and after values.
Administrative activity
API keys record their creator, last use and revocation. Member and invitation changes are visible in the portal. There is no separate workspace-wide admin audit log yet; that is the honest answer.

Data

No name, email or phone number
LuckLogic never needs personal details to decide an outcome. Limits are enforced on participant_id, an opaque reference you choose, such as a CRM id or a hash. The consumer relationship stays in your systems.
IP addresses
The hosted page and widget use the consumer's IP for rate limiting. It is removed from entry records and the entry log after 12 months, and rate-limit counters are deleted as soon as their window ends.
Codes
Codes are stored only as keyed hashes. A database export does not reveal a single printable code.
Deletion
Accounts can be deleted and workspaces closed from the portal. The privacy policy lists every retention period, and the data processing terms set out our role as processor.
Hosting

Where it runs.

Component Provider Region
API, database, background worker and the hosted entry page Railway EU (Amsterdam)
Code export files Cloudflare R2 EU jurisdiction
Portal and Verify app Vercel EU (Frankfurt)
This website Vercel Global edge
Transactional email Resend United States

All traffic to the API, portal and hosted page is TLS. The database is reached over the hosting platform's private network and is not exposed to the internet. Code export links are signed and expire after 15 minutes. LuckLogic does not hold ISO 27001 or SOC 2 certification and does not claim to; if your client's procurement needs one, tell us and we will say plainly where we stand.

Questions about data handling or a DPA?

The data processing terms are part of our terms of service. For anything they do not answer, write to us and a person will reply.