---
title: "Lucky number: let people enter a code to win"
description: "Print codes on packaging, receipts or flyers, upload them, and let people type them in to see if they won. With every setting and common problems."
url: https://scratcher.io/help/games/lucky-number-codes
language: en
---

1. [Help center](https://scratcher.io/help)
2. [Games and formats](https://scratcher.io/help/games)
3. Lucky number: let people enter a code to win

# Lucky number: let people enter a code to win

Print codes on packaging, receipts or flyers, upload them, and let people type them in to see if they won. With every setting and common problems.

In a **Lucky Number** game, people type in a code, for example from a bottle cap, a receipt or a flyer. If the code is valid, they take part in the prize game. Each code can be used once, or more times if you allow it.

## Set it up step by step

1. Add the **Lucky Number** game to a page.
2. On the **Content** tab, choose the **Type of characters**: **Numbers**, **Letters** or **Letters and numbers**.
3. Set how many **Characters** the code has. It must be the same as the length of your codes. Set the **Characters per row**, so long codes wrap nicely on phones.
4. Click **Manage codes** and add your codes:
    - **File (.csv)**: click **Select file to upload** and choose a CSV file with one code per row. You see a **Preview of codes (first 10 codes)**. Click **Upload codes**.
    - **Manual**: type a code and click **Add**. You see "Code was added". Click **Back to list**.
5. Add prizes to the game as usual. See [Add a prize](https://scratcher.io/help/prizes/add-a-prize).
6. Set the **Error message** and **Retry message**: what people see when a code is wrong.
7. Test with a real code in the preview, and check that the code is marked as used.

A valid code lets the player take part. Whether they win, and what, is decided by your prize settings, as in any other game. If every valid code should win a prize, make sure the win chance and the quantity of your prizes cover it.

## Manage your codes

The code list (**Total codes**) shows every code, whether it **Is used**, with a search (**Type to search…**) and **Refresh**.

- **Max uses**: with **Allow multiple uses** on, set how often each code can be used, or **Unlimited**. Double-click the number to edit it (**Double-click to edit**).
- **Edit active period**: with **Code active period** on, set the dates each code is valid.
- **Delete code** removes one code. **Delete all unredeemed codes** removes every code that hasn't been used. **Delete all codes** removes all of them.

## Settings and add-ons

- **Characters to show**: some boxes are already filled in as a hint, so people type fewer characters.
- **Allow multiple uses** ("Let visitors redeem the same code more than once"): the same code can be used more than once, up to its **Max uses**.
- **Code active period** ("Set a time window during which each code is valid"): codes only work in their own period. Great when you print new codes for each week.

On the **Styles** tab, set the font and the colors of the boxes (**Background**, **Text** and **Error**), the **Border**, **Size** and **Gap**.

## Common problems

- **"The code doesn't work", but it's in the list.** The code has already been used (check **Is used**), has reached its **Max uses**, or is outside its active period. Codes also belong to one game: a code uploaded to another game or campaign doesn't work here.
- **The boxes don't fit the code.** Set **Characters** to the length of your codes, and choose the **Type of characters** that matches them, for example **Letters and numbers** for codes like "AB12CD".
- **A valid code didn't win.** The code only lets people play. Check the prizes' win chance, quantity and active period. See [Set the win chance and prize limits](https://scratcher.io/help/prizes/win-chance-and-limits).
- **The upload failed.** Use a CSV file with one code per row and no other columns. Check the preview of the first 10 codes before you upload.
- **People type wrong codes on purpose.** People can try again after a wrong code. Combine the game with a participation limit and the protections in [Prevent cheating](https://scratcher.io/help/forms/prevent-cheating).

## Tip

Lucky Number is great with QR codes in stores: put a QR code on the poster that opens the campaign, and print the codes on receipts or packaging.

Games and formats

- [Which game should I choose?](https://scratcher.io/help/games/game-formats-overview)
- [Scratch cards, wheels and other luck games](https://scratcher.io/help/games/luck-games)
- [Spin the wheel: slices, design and settings](https://scratcher.io/help/games/spin-the-wheel)
- [Scratch cards: cards, icons and cover](https://scratcher.io/help/games/scratch-cards)
- [Slot machine, spin, dice and mystery box](https://scratcher.io/help/games/slot-spin-dice-and-mystery-box)
- [Skill games: drop, memory, puzzle and more](https://scratcher.io/help/games/skill-games)
- [Catch objects (drop) and hit the target](https://scratcher.io/help/games/catch-drop-and-hit-the-target)
- [Smash it, tap it, memory, puzzle, match matrix and bubble shooter](https://scratcher.io/help/games/more-skill-games)
- [Finish conditions, timer and points in skill games](https://scratcher.io/help/games/finish-conditions-timer-and-points)
- [Quizzes and personality tests](https://scratcher.io/help/games/quizzes-and-personality-tests)
- [Quiz questions and answers in detail](https://scratcher.io/help/games/quiz-questions-and-answers)
- [Quiz results, branching and calculations](https://scratcher.io/help/games/quiz-results-groups-and-calculator)
- [Design your quiz: layout, progress bar and buttons](https://scratcher.io/help/games/quiz-design)
- [Polls, surveys, votes and product finders](https://scratcher.io/help/games/polls-surveys-and-product-finders)
- [Advent and Christmas calendars: set one up step by step](https://scratcher.io/help/games/advent-and-christmas-calendars)
- [Every calendar setting explained](https://scratcher.io/help/games/calendar-settings)
- [The advanced calendar: a different game or prize behind every door](https://scratcher.io/help/games/advanced-calendar)
- [Calendar problems and how to fix them](https://scratcher.io/help/games/calendar-troubleshooting)
- [Leaderboards: rank players by points or time](https://scratcher.io/help/games/leaderboards-and-predictions)
- [Score predictions for football and other sports](https://scratcher.io/help/games/score-predictions)
- [Lucky number: let people enter a code to win](https://scratcher.io/help/games/lucky-number-codes)
- [Countdowns, pre-registration and campaign ended pages](https://scratcher.io/help/games/special-pages)

## Related articles

- [Share your campaign link and QR code](https://scratcher.io/help/sharing/share-your-campaign-link): Find the preview, live, custom and embed links, download a QR code and share the campaign in newsletters, SMS, social media and in store.
- [Add a prize](https://scratcher.io/help/prizes/add-a-prize): Add a prize to your game: name, image, value, how many there are, the chance to win and how it is redeemed.
- [Give discount codes as prizes](https://scratcher.io/help/prizes/discount-codes): Use one shared code or upload a list of unique codes, so every winner gets their own code.

## Still need help?

Real people are here to help. If you already use Scratcher, the quickest way is the chat inside the platform.

- **[Chat with us](https://platform.scratcher.io/login)**

    Log in and click the chat button in the bottom-right corner. Rex answers right away, and our team is a click away.
- **[Book a meeting](https://scratcher.io/book-a-meeting)**

    A free 30-minute video call with our team: a tour, campaign ideas or help with your setup.
- **[Email us](mailto:contact@scratcher.io)**

    Write to contact@scratcher.io and we will get back to you.
