Skip to main content
BatchCard
Guides

Using Custom Code Prefixes

This takes about 3 minutes.

By the end of this guide, you'll know how to add custom prefixes to your gift card codes for branding and organization.

What code prefixes are

A code prefix is a custom string added to the beginning of every gift card code in a batch. For example, if you set the prefix SPRING, your codes might look like SPRING7K2M9QX4RB.

Prefixes help you:

  • Brand your codes — recipients see a recognizable name when they use the code
  • Organize batches — quickly identify which campaign or event a code belongs to
  • Track sources — filter and search gift cards by prefix in your Shopify admin

Set a prefix during batch creation

  1. Open BatchCard. In the Create gift cards card, click Create batch under Manual.
  2. Fill in the batch details (name, quantity, value).
  3. Enter your code prefix in the prefix field.
  4. Click Create.

Every gift card in the batch will use this prefix.

Set a prefix via spreadsheet import

If you're importing from a spreadsheet, add a code_prefix column to your file. Each row can have a different prefix.

valuequantitycode_prefix
25.0010SPRING
50.005VIP

Prefix format rules

RuleDetail
LengthNo minimum. A one-character prefix is accepted, and so is no prefix at all
Room in the codeThe prefix and suffix together must leave at least 8 random characters
CharactersLetters (A-Z) and numbers (0-9) only
CasePrefixes are converted to uppercase
UniquenessMultiple batches can use the same prefix

There is no maximum prefix length on its own. Every code keeps at least 8 random characters so codes stay unique, and the prefix and suffix share whatever room is left.

On the manual form, codes are 16 characters by default, so the prefix and suffix can take up to 8 characters between them. Set Total Code Length to 20, the longest code Shopify accepts, and that budget grows to 12.

On a spreadsheet import you do not set a code length. BatchCard grows the code to fit the prefix and suffix in the row, up to 20 characters, so a combined prefix and suffix of up to 12 characters is accepted there. See the Code Prefix column reference.

Keep prefixes short and meaningful. Good examples: SPRING, VIP2026, REWARD, HOLIDAY. Avoid using special characters or spaces.

Examples of good prefixes

Use casePrefixWhy it works
Seasonal promotionSPRINGShort, clear, identifies the campaign
Employee rewardsREWARDEasy to filter when reviewing gift cards
VIP customersVIP2026Includes the year for easy tracking
Partner campaignACMEIdentifies the partner company

What happens without a prefix

If you don't set a prefix, Shopify generates codes with its default format. The codes still work the same way. Prefixes are purely organizational.

Learn more

Ready to try this? Install BatchCard free.

Create bulk gift cards from a CSV or form. Set up your first batch in minutes.

Install Free on Shopify

On this page