Serial Codes Generator and Validator


Included support for Woocommerce products and WooCommerce PDF Invoices – generate your WooCommerce serial directly with a purchase.
Allows you to manage codes (serials and numbers). Your user enters the code on your page and checks if the code is valid.
If you use woocommerce, you can uset the option to auto generate a serial code for each sold product!

Shop: With Serial Code Generator your will be able to sell license keys and products with a serial number or activation key. The plugin can create on the fly a code for each sold item.

validation: You customer can validate a serial on your page. The code generator gives you a flexible pattern to generate codes upfront. You can also import your existing codes.

Build your own stolen serial database: Support your customer and yourself to protect stolen products to be sold to others. Mark reported stolen products as stolen and let others check the serials.

You can enter your codes within the WP admin area.
The codes can be generated automatically or you add your own codes manually using the serial code generator.
The serial code generator can create a bulk of serials or numbers as codes.
You are also able to add your own codes by just entering them below the serial code generator.
If needed you can assign the codes to a list. The list helps you to organize the codes.

The generated codes are unique for the generation session. After you are satisfied with the generated codes, you can start the code adding step.
The code adding step will check if the code is unique on the server and adds it.
If the code is already on the server, then it will be marked for you and not re-added.

The generator provides a lot of features:

  • Code prefix – you can enter a fixed prefix to each code
  • Length of code
  • Only letters
  • Uppercase, Lowercase or both
  • Exclusion of letters that are easy to missread (i,l,o,q,p)
  • Delimiter possible: [None, -, :, SPACE] – you decide after how many letters within the code
  • CVV code generation (only numbers)


  • Store Woocommerce orderid, itemid and productid
  • Use your serials to restrict purchases to only-with-code (purchase allowance code)
  • Add your own messages for the serial code validation form
  • Add your own message for the ”product stolen” validation message
  • Disable validation form for not logged in wordpress user
  • User can register to a code (with wordpress user id if needed) – This makes your code one-time usable
  • Display registered user information of a code during the validation if needed
  • One time check possible (with wordpress user id if needed) – Code will be marked as used after check
  • One time check can have maximum check amount based on code list
  • Several checks – Code will be marked as used after X confirmed checks
  • User URL Forward after the code was checked – to show more details
  • Webhooks – you can inform other systems about code validation steps

Build your own Stolen products database

You can set a serial or code to be stolen. This way you can offer your customers to report a stolen product. Buyers of used products can check the code and will be notified with a ”Product is stolen” warning.
This could increase real sales and help reducing theft of your products.
The check behaviour will be like ”inactive serial codes” but with the stolen message. You can change the stolen message with in the options area.

Protection with CVV

You can set a CVV (Code Verification Value) to protect your serial code. This allows you to print your serial code and the CVV number on your products and let the user enter both.
That way you increase the security of your serial codes and prevent stealing the serial code (If you are able hide the CVV on your packaging).
If you enter a CVV the user will be asked to enter this CVV too. If the CVV on your code is not set or empty it will be ignored and your customer is not asked for it.

Woocommerce support for auto-generating serial codes

= You can use this plugin to auto-generate serial codes for your woocommerce products =
– Create a code list
– Go to your woocommerce products and edit the product which should receive a serial code
– Click on ”Serial Codes and Sale Restrictions” in the attribute area of your product
– Choose the ”Code list”

Everytime this product is sold, it will get a new generated serial code. The new serial code will be added to the code list you set on your woocommerce product.
If the sold product quantity in the order is more than 1, then a code will be generated for each quantity.
E.g.: Your customer bought 2 of the same product within one order, then 2 serials will be generated and stored to the product item within this order.

Woocommerce support product purchase restriction

= You can use this plugin to protect the sale of a product without a purchase code =
– Create a code list
– Add codes to this list – these codes will be the allowance code to purchase a specific product
– Go to your woocommerce products and edit the product which should be restricted for buy-only-with-serial-code
– Click on ”Serial Codes and Sale Restrictions” in the attribute area of your product
– Choose the ”Code List for sale restriction”
– Activate the option ”Activate the purchase restrictions of product sales without a valid and unused serial code”

Please notice:
If you exceed your limit (no limits for premium user), then the code added to the sold product will be a text information: ”Please contact our support for the serial code”.
This way your business is not harmed and your customer can contact you to get a serial code manually.
The format of the serial code will be 12345-12345-12345-12345.

WooCommerce PDF Invoices support to display the serial codes on the PDFs

If you use ”WooCommerce PDF Invoices”, then the generated serial codes are displayed on the generated PDFs too!
The supported PDF plugin is from Ewout Fernhout.

WooCommerce Product Sale Restriction to code only

You can restrict purchases for a product to a code from a code list or any code you have. The purchase will mark the code as used and cannot be reused for the next purchase.
This allows you to offer products that can be only bought by customers, that have received already the purchase code.


  • Use the shortcode [sngmbhSerialcodesValidator]
  • The shortcode will be replaced by a form to enter the code and a button to check. This allows you to surround the form with your own heading and instruction.
  • Each code has a display version (e.g. XYZXYZ -> XYZ-XYZ), so it is easier for your user to read the serial code.
  • The check will remove the display delimiter ”-”, ”:”, ” ” for the check automatically.
  • So your user can enter the code with or without delimiter.

If you use CVV on a code and the user enter the code that requires a cvv, then your user will be ask to enter the CVV.
You can enter the CVV immediately with the code. Separate the value with a ”:”. E.g: XYZXYZ:1234.

It is possible to prefill the serial code validation form with a code.
Add the parameter ”code” to your page url to create a link that prefills the form.

Expert options

You can use your own input, trigger and output HTML element.
Add the id parameter to your HTML elements and pass them to the shortcode as corresponding parameter.
You can add also your own JS function name that will be called before the code is checked on the server and also if the result comes back.
[sngmbhSerialcodesValidator inputid=”” triggerid=”” outputid=”” jspre=”” jsafter=””]

Shortcode parameter In- & Output
You can use your own HTML input, output and trigger component. If you add the parameters (all 3 mandatory to use this feature), then the default input area will not be rendered.

inputid=”html-element-id”. The value of this component will be taken. It need to be an HTML input element. We will access the value-parameter of it.
triggerid=”html-element-id”. The onclick event of this component will be replaced by our function to call the server validation with the code.
outputid=”html-element-id”. The content of this component will be replaced by the server result after the check . We will use the innerHTML property of it, so use a DIV, SPAN, TD or similar for best results.

If you apply the inputid, our basic form will not be rendered. You need to add the input, a button (trigger) and an output element (div or similar) for the server answer.

Quick overview

Each code is unique. The list is only for your organisation and is not used for the code or the check of a valid code.

Plugin administration – where to find the plugin management area

It will add a new menu entry ”Serial Codes Validator” within the settings section.

More about the plugin on our website


Write to for support request.
For both plugins: The basic free and for the premium plugin.


Quick start is shown in this video.
– Go to the settings and click on menu ”Serial Codes Validator”.
– Click on button ”Add” next to the heading ”Codes”.
– Enter or generate codes.
– Save the codes.
– Add the shortcode [sngmbhSerialcodesValidator] to a page.

Premium Features

The premium plugin is now available with a lifetime license and 1 year support.

Your benefits
* Unlimited Code Lists
* Unlimited Codes
* Save IP address of users using the code validation check on your page
* De- and re-activate codes
* Security: Block IPs after x retries within 60 minutes – prevent brute force


  • Management Area You can manage lists and see all codes. The code list is searchable.
  • Codes Generator Set the settings and generate codes. Or enter your own.
  • Frontend The shortcode will be replaced by a form. The checks deliver different messages.
  • Options 1 Validation messages
  • Options 2 User & Login tracking
  • Options 3 Registration to code & Display information to the user
  • Options 4 User redirection & Webhooks


  • WordPress 5.0 or greater
  • PHP version 7.0 or greater
  • MySQL version 5.0 or greater


  1. Install using the WordPress built-in Plugin installer, or Extract the zip file and drop the contents in the wp-content/plugins/ directory of your WordPress installation.
  2. Activate the plugin through the ’Plugins’ menu in WordPress.
  3. Go to Settings > ”Serial Codes Validator” and add codes.
  4. Add the shortcode [sngmbhSerialcodesValidator] to a page to display the code validation form.


24 augusti 2021
i find all the options that i need from the prefix to the check code and redirection after verification. only one thing that couldn't work is that the code is not received in the email after purchase a woocomerce product 🙁 ... i don't konw why !! please help me if there are a solution.
9 juni 2021
Everything works smoothly. The support is top notch!
12 april 2021
Very limited plugin. No settings. You cant change the standard text shown on the form. No import of codes. Code generation is poorly without a prefix field you can enter.
28 september 2020
I was Looking verification plugin quite sometimes, had installed and tested multiple plugin but none can fit my purpose. But since i found this plug in, I use it as basic user and OMG! it work really well and easy to navigate. Not so long after , I had emailed to developer to ask multiple request at certerin issue, and guess what..within 24 hours he updated the plug in as what we requested! very responsive. Soon after I bought for PREMIUM package. I had many times exchange email with developer about certain feature or issue and he will response very quickly. Overall, Great plugins great developer and support. Well Done !
10 juli 2020
From start. i was looking a code generator for my products. i downloaded this and install the free version. use it and love it but some options miss. i have email to author and in a few hours received message back. i have request him some options like unique code and brut force . in few days he just create this options email me back with link to see and job done . only god things to tell abut him and his products. Keep up the good work . TOP
Läs alla 5 betyg

Bidragsgivare och utvecklare

”Serial Codes Generator and Validator” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer


2.1.1 – 2021-10-25

  • Bug fix for non woocommerce users

2.1.0 – 2021-10-25

  • New options to restrict purchases of individual products. The purchase is possible only with a serial code
  • The displayed texts for the purchase allowance code can be customized
  • Added Option if an order is delete or a refund is activated to free up used purchase allowance code
  • Renamed WooCommerce serial code section to ”Serial Codes and Sales Restrictions”

2.0.12 – 2021-10-21

  • bugfix on option value

2.0.11 – 2021-10-11

  • New options to control the color of the validation button
  • Added support for compression
  • New option to prevent the serial code put in the outgoing email to the customer for a WooCommerce sale
  • Add your pre-text for the serial code also to the outgoing email to the customer for a WooCommerce sale

2.0.10 – 2021-10-02

  • New option to add your own text if the serial code is printed on the PDF invoice for a WooCommerce sale
  • New option to prevent the serial code printed on the PDF invoice of a WooCommerce sale

2.0.9 – 2021-10-01

  • bug fix for woocommerce reusing serial code and optimization of code update parts

2.0.8 – 2021-09-29

  • bug fix for woocommerce reusing serial code

2.0.7 – 2021-09-23

  • Display if a code is used in the code table
  • Bug fix storing used registration information

2.0.6 – 2021-09-07

  • New option to use existing codes for WooCommerce purchases, if they are not already register to a user purchase
  • New option to change the text on the WooCommerce purchases, if you run out of the free plugin codes amounts – only for basic plugin, not applicable for premium plugin, because they can generate an unlimited amount of codes

2.0.5 – 2021-08-24

  • Added serial code information to the email notification ”order completed”

2.0.4 – 2021-08-23

  • New option to change the check-button on the serial code validation frontend form
  • New option to change the placeholder value of the input field on the serial code validation frontend form

2.0.3 – 2021-08-16

  • New paramater ”userid” for redirects and webhooks added
  • fixed to recognize if the user is logged in

2.0.2 – 2021-08-15

  • added JS redirect to free plugin
  • JS redirect will be executed after an optional activated ”user registration” is done

2.0.1 – 2021-07-20

  • bugfixes

2.0.0 – 2021-07-19

  • Add all premium features (except IP Tracker, IP Brute Force Protection, Bulk action for stolen and deactive code, overruling the onetime rules within a code list) to the free basic plugin
  • Optimized performance
  • Warning: Reduced the max values from 1.000 to 500 – you will keep your codes above this value, but cannot add more as long as you do not have the premium plugin
  • You can now overwrite the message for ”Code and CVV is not valid”

1.1.13 – 2021-06-17

  • Adding ”Stolen” status to the serial code, you can set your serial code now to status ”stolen”
  • Changed color of activ serial to green
  • Changed color of inactiv serial to gray
  • Color of ”stolen” status will be red for better recognition within the admin area
  • Fixed code sorting in admin area

1.1.12 – 2021-06-07

  • Fix code error
  • Added Woocommerce functionality: Auto-generate a serial code for each sold product item
  • Remove Order information from the code and woocommerce order
  • Support WooCommerce PDF Invoices: Serial code is printed on the PDF invoice

1.1.11 – 2021-04-13

  • Optimization for frontend calls
  • Fixed list table display elements per page

1.1.10 – 2021-04-12

  • You can enter now a prefix within the code generator

1.1.9 – 2021-04-09

  • Fix search paging on codes
  • Removed warning message about the plugin version

1.1.8 – 2021-03-18

  • Fix code creation without CVV
  • Loading wp jquery-ui-dialog.css in case your theme do not have it

1.1.7 – 2021-03-14

  • Adding security level with CVV (Code Verification Value) option
  • Updating to WordPress 5.7
  • Small optimizations

1.1.6 – 2021-03-02

  • Minor optimization and premium connector fix
  • Export fixed

1.1.5 – 2021-01-28

  • You can now add codes to be imported multiple times with the code generator.
  • Shortcode is extended. You can use now your own input, trigger and output html element. Just add the id parameter to your html elements and pass them to the shortcode.
  • You can add now also your own JS function name that will be called before the code is checked on the server and also if the result comes back.
  • [sngmbhSerialcodesValidator inputid=”” triggerid=”” outputid=”” jspre=”” jsafter=””]

1.1.4 – 2020-11-24

  • Export for premium optimized

1.1.3 – 2020-10-21

  • Added a range chooser and order selector for export, to prevent disruption of long running execution if you have a lot of codes and a slow server

1.1.2 – 2020-10-02

  • Fixed messages for premium text

1.1.1 – 2020-09-29

  • Fixed messages for code is expired message und code is already registered

1.1.0 – 2020-09-27

  • Optimization for the timeout issue while adding the serial codes. Display now the progress and store the codes in sequenz with chunks of 100 codes.

1.0.9 – 2020-09-26

  • Added bulk operation on codes. Delete the selected codes within the table in the admin area.

1.0.8 – 2020-09-21

  • Added chooser for code-export delimiter and filesuffix

1.0.7 – 2020-09-14

  • Added object return value for more premium features

1.0.6 – 2020-09-10

  • You can now add your own codes as a comma separated list and mix ”,” with newlines if needed

1.0.5 – 2020-07-11

  • Repaired to detected the premium plugin, with changed plugin folder name

1.0.4 – 2020-07-08

  • Repaired empty messages
  • Added CSV export function for codes

1.0.3 – 2020-07-01

  • Added option to empty tables

1.0.2 – 2020-06-25

  • Added Premium Hooks and callbacks to the validator
  • Added option to connect registered user to a code (premium hook), so that the code can be validated only once

1.0.1 – 2020-06-15

  • Added Premium Hooks and callbacks options
  • Expand the table for IPs
  • Add your own messages for the code check reply

1.0.0 – 2020-06-13

  • Initial Public Release