Bypass the header links
StockroomLane

Square gift card codes: 4 format rules for your till

By
StockroomLane Editorial Team
Posted
Sources checked
Time to read
14 min read

How this guide was made

Read the editorial standards

Square gift card codes come down to four format rules. A custom code must contain 8 to 20 characters, those characters must be alphanumeric, the code should avoid repeatable or easy-to-guess patterns such as 12345678, and the BIN shows whether a card is physical or digital ( Gift Cards API and Gift Card Activities API). Physical Square gift cards use BIN 778273 and digital ones use BIN 778332, so one look at the BIN settles the question.

Tidy takeaways

Custom codes must be 8 to 20 alphanumeric characters

Custom codes are the ones you choose yourself. Square's Gift Cards API documentation sets the limits for them: the custom GAN must contain 8 to 20 alphanumeric characters ( Gift Cards API and Gift Card Activities API). Those two limits cover length and character type, so you can check both at the counter.

Rule Requirement
Shortest allowed code 8 characters
Longest allowed code 20 characters
Allowed characters Letters and digits only

Counting is the quickest check. A code shorter than 8 characters falls under the minimum, and a code longer than 20 characters runs past the maximum. Alphanumeric means the code can hold letters and digits, so a space, hyphen, or punctuation mark breaks the rule. When you type a code from a notepad or a sticky label, read it back one character at a time before you press save. A single dropped digit can turn a valid code into a short one, and a single extra character can push it past the limit.

Staff who set codes regularly benefit from a simple routine. Choose the code, count its characters, confirm that every character is a letter or a digit, and then record the final version in the same form it was entered. Keeping the written record identical to the code on the till avoids confusion later. Length alone is not enough protection, which is why Why guessable codes invite fraud covers patterns.

Physical and digital card prefixes compared

A BIN, or bank identification number, is a run of digits that identifies the issuer or type of a card. Square's documentation names two BINs for its gift cards: 778273 for physical cards and 778332 for digital cards ( Gift Cards API and Gift Card Activities API). The table puts the two side by side.

Measure Physical card Digital card
BIN 778273 778332
Digits in BIN 6 6
Card form Physical Digital

The practical use at the till is direct. When a record or a number shows 778273, you know the card is physical. When it shows 778332, you know it is digital. That distinction helps when a customer asks which form their card takes, and it helps when you group gift card sales by form in a report.

Keep in mind that the BIN classifies the card, not the customer or the amount on it. A card's balance and its linked profiles are separate facts. The documentation ties BIN 778273 to physical Square gift cards and BIN 778332 to digital ones, so read it for that purpose and look at the balance and links separately when you need them.

Why guessable codes invite fraud

Square's guidance on custom codes is direct. To mitigate the risk of fraud, the documentation says, do not use repeatable patterns or GANs that are easy to guess, and it gives 12345678 as the example to avoid ( Gift Cards API and Gift Card Activities API). Someone outside the business can try a pattern like that without any inside knowledge, because the pattern itself is the guess.

The reason this matters becomes clearer from a legal finding in the state of Washington. That finding states that "unscrupulous persons often fraudulently use the card accounts of others by stealing the card itself or by obtaining the necessary information to fraudulently charge the purchase of goods and services to another person's account" ( RCW 19.200.010). The finding names the core problem: a person who obtains the necessary information can charge someone else's account. A code that is easy to guess supplies that information without touching the card itself.

Treat a custom code the way you would treat a password. Avoid repeated digits, simple counting sequences, and any pattern you have used on another card. A code that looks random to an outsider is harder to guess, and that is the purpose of the rule. Before you save, ask whether a stranger could predict the code from its shape alone. If the answer is yes, change it.

Linking one card to up to 10 profiles

Square caps the links between gift cards and customer profiles in both directions. According to the Gift Cards API documentation, the maximum number of gift cards you can link to a customer profile is 50, and the maximum number of customer profiles you can link to a gift card is 10 ( Gift Cards API and Gift Card Activities API). The table lays out both limits on the same measures.

Measure Each customer profile Each gift card
Maximum linked 50 gift cards 10 customer profiles
Counted item Gift cards Customer profiles
Limit applies to Gift cards on the profile Profiles on the card

Both limits matter in daily work. A customer who collects gift cards may reach 50 linked cards on one profile, and a single card shared among several households may reach 10 linked profiles. Once a profile or a card hits its ceiling, the next link would exceed the documented maximum, so check the current count before you add a link rather than after.

The two numbers differ widely, so count the links on each side separately. A profile can be nearly full while the card it is about to link to has plenty of room, or the reverse. Checking both counts before each link keeps the record consistent and prevents a link from being refused at the moment a customer is waiting at the counter.

Activity history before March 2, 2016

Square's documentation sets a date boundary for activity history. ACTIVATE, CLEAR_BALANCE, and IMPORT activities that occurred before March 2, 2016 are not included in ListGiftCardActivities results or in the activity history shown in the Square Dashboard ( Gift Cards API and Gift Card Activities API). The table shows how each of those three activity types is treated.

Activity type Shown in API list or Dashboard before March 2, 2016?
ACTIVATE No
CLEAR_BALANCE No
IMPORT No

For a card activated before that date, the history you see may begin later than the card's first use. An empty or thin history for an old card is therefore not proof that nothing happened to it, because ACTIVATE, CLEAR_BALANCE, and IMPORT activities that predate the cutoff are excluded from both views. This matters most for the three activity types the documentation names. Activation, balance clears, and imports are the entries that explain how a card reached its current state, and those are exactly the entries that go missing from the view.

When you explain a balance to a customer, read the dated records you can see and keep the March 2, 2016 boundary in mind. For a card activated before March 2, 2016, the visible history may begin later than its first use, so do not assume it shows the full history. Cards activated on or after that date show their activation in the history, so the March 2, 2016 boundary applies only to older cards. That habit prevents you from drawing a conclusion from a gap that the system itself creates.

What Ohio's gift card definition leaves out

Ohio's revised code defines "gift card," and that definition carves out one product: "'Gift card' does not include a prepaid calling card used to make telephone calls" ( Section 1349.61 - Ohio Revised Code). The exclusion is useful to know. A prepaid card loaded for phone calls falls outside the state's definition, even though it is also a prepaid card that a customer buys in advance.

For a shop, the point is not to become an expert on card definitions. It is to notice that "prepaid card" and "gift card" are not always the same thing. If your till sells prepaid phone cards next to Square gift cards, keep the two products in separate categories in your records and your conversations. That way a staff member does not assume a rule written for one applies to the other.

The exclusion is also narrow. It names prepaid calling cards used to make telephone calls and nothing more. The quote does not say that every other stored-value product is covered or exempt, and it does not describe how Square's codes are treated under Ohio law. Read it as a definition and nothing else. When a question about legal obligations comes up, check the official text and, where needed, ask someone qualified rather than inferring an answer from one exclusion.

Washington's fraud finding and the till

A state finding describes how card accounts are fraudulently used. It states that "unscrupulous persons often fraudulently use the card accounts of others by stealing the card itself or by obtaining the necessary information to fraudulently charge the purchase of goods and services to another person's account" ( RCW 19.200.010). A finding explains the reasoning behind a law. It does not set a rule for your till. Still, its description of the threat matches what counter staff can run into.

The sentence names two routes. One is physical: someone steals the card itself. The other is informational: someone obtains the details needed to charge another person's account. A custom code belongs to the second route. If a code can be guessed, it becomes information a stranger can use without ever holding the card. That is why the code format matters at the counter, even when the card never leaves the customer's hand.

Apply the finding to ordinary till habits. Keep any written copy of a code out of sight of other customers, and clear it away once the code is saved. Do not read a full code aloud where others can hear it, and limit who has access to a card's code to the people who need it. These habits are general good practice rather than requirements stated in the finding, but they follow directly from the two routes the legislature described.

Which one should you pick?

When you set a custom code, you are choosing among options that the documented rules sort cleanly.

Option Length Characters Pattern check
Code that is not guessable from a pattern, 8 to 20 characters Within 8 to 20 Letters and digits Meets the guidance
Repeatable pattern such as 12345678 8 characters, within range Digits only Fails the fraud guidance
Code shorter than 8 or longer than 20 characters Outside 8 to 20 Depends on the code Fails on length alone

The first option is the only one that satisfies both the length rule and the pattern guidance. The Gift Cards API documentation requires 8 to 20 alphanumeric characters for a custom code, and it warns against repeatable or easy-to-guess patterns, using 12345678 as its example. The second option shows that meeting the length rule is not enough. 12345678 has eight characters and still falls on the wrong side of the guidance. The third option fails on length no matter how it looks.

So choose the first option every time. Once the card is recorded, check the BIN against the form the customer received, so the record matches the card in hand. Choosing a code that passes both tests at the start keeps the code within the documented rules from the start.

Checking a code before you hand it over

Before a code leaves the counter, run two checks. The first is length and character type. The custom GAN must contain 8 to 20 alphanumeric characters, so count the characters, confirm each one is a letter or a digit, and make sure no space or punctuation mark has slipped in. Then read the code back against the source you typed it from, one character at a time.

The second check is the pattern. Square's documentation says to avoid repeatable patterns or GANs that are easy to guess, and it gives 12345678 as the example. Look at the code's shape rather than just its length. Are the digits in sequence? Do they repeat in blocks? Does the code echo a date, a counter, or a code you have already used? Any of these means you should choose a different code.

A simple routine keeps both checks fast: count, scan the characters, look for patterns, then save. Write the final code exactly as it appears on the till so the written record and the card match. If a check fails, do not pad a short code with filler characters to reach eight. Choose a new code that meets both rules from the start.

Fraud checks at the till

Fraud checks at the till combine the format rules with a habit of noticing unusual requests. Start with the BIN. Physical Square gift cards use BIN 778273 and digital ones use BIN 778332. When a card's record shows a BIN that does not match the form the customer presented, stop and check before going further. A mismatch is a reason to look again, not proof of wrongdoing, but it is the kind of inconsistency a careful check exists to catch.

Next, consider the Washington finding. Someone who obtains a card's necessary information can charge another person's account without holding the card. A request that depends on knowing a code, rather than on the card in hand, deserves attention. If someone asks you to read out, reveal, or change a code they do not appear to own, slow down and confirm before acting.

Practical steps that fit a busy counter:

  • Compare the BIN with the card form before completing the sale.
  • Keep codes out of view of other customers.
  • Use codes that meet the length and pattern rules from the start.
  • Pause when a request depends on information the person cannot show.

These steps will not guarantee protection, and none of them is a Square requirement stated in the quotes. They are habits that follow from how the BINs and the fraud guidance are described. Keep them short enough that staff will use them every time.

Related guides: Gift card disclosures: 5 checks before your shop sells · Card and cash sales: 3 amount limits for your till · Card surcharge rules: 6 checks before you ring a sale.

Reader questions

Can a customer profile link to more than 50 gift cards? No. The Gift Cards API documentation states that the maximum number of gift cards you can link to a customer profile is 50. Check the current count before adding a link.

How many customer profiles can one gift card link to? Up to 10. The documentation gives 10 as the maximum number of customer profiles you can link to a gift card.

Why does a card's activity history start later than its activation? ACTIVATE, CLEAR_BALANCE, and IMPORT activities that occurred before March 2, 2016 are not included in ListGiftCardActivities results or in the Square Dashboard's activity history. For an older card, the visible history may be incomplete for that reason.

How can I tell a physical card from a digital card by its number? Look at the BIN. The documentation lists 778273 for physical cards and 778332 for digital ones.

Does Ohio's definition of gift card include prepaid phone cards? No. Ohio's definition states that "Gift card" does not include a prepaid calling card used to make telephone calls. Keep the two categories separate in your records.

Does Washington's finding set a rule for my till? Not directly. The state finding describes how card accounts are fraudulently used, by stealing the card or by obtaining the information needed to charge another person's account. It explains why careful code handling matters, but it is a finding rather than a counter procedure.

Why does the BIN matter if the amount on the card is what counts? The BIN tells you the form of the card, not its balance or linked profiles. Read it for that purpose, and check the balance and links separately when you need them. The documentation's BIN list is what you use to identify the form.

Sources

Keep reading

See every guide