Online Voucher Generator
Coupon Code Generator
The Random Code Generator website is a tool to generate large amounts of random unique coupon codes. Other use of these codes can be for strong. Use The Random Code Generator to generate unlimited random codes. Can be used as random promotional codes, serial numbers, strong passwords, sweepstake codes, pincodes, voucher redeem codes and much more. Get more people to show up by making fun and unforgettable promo videos. Whether you want to use a template or dive in fresh, our online video maker is a.
Generate unique, random, and hard to guess coupon / voucher codes.Use cases: promo codes, loyalty coupons, gift vouchers, in-app purchases, referral links
This library originates from Voucherify.
Voucherify - programmable building blocks for coupon, referral, and loyalty programs.
Our developer friendly, API-first platform helps developers integrate digital promotions across any marketing channel or customer touchpoint - eventually giving full control over campaigns back to the marketing team.
Why Voucherify?
- RESTful API with pre-built client libraries and comprehensive documentation
- Configurable webhooks allow you to integrate Voucherify with any API service out there
- Get real-time visibility into every change in your system with monitoring & logs
- Explore the possibilities with dozens of working demos and test mode
- Livechat & Slack support
See the full documentation - https://docs.voucherify.io
Installation
In Node.js
Install with npm:
Include with require:
In a browser
Usage
Generate 5 codes, each 8 characters long:
Sample result: ['FR6bwx1q', 'ByamOdWV', '7roFwfQs', 'rmWlwvll', 'pgih5eAB']
Charset
Default charset is alphanumeric (numbers and letters). However, you can specify your own charset:
Sample result: ['386525', '676442', '019075']
You can also use one of the predefined charsets by calling voucher_codes.charset(name)
.
name | charset |
---|---|
'numbers' | '0123456789' |
'alphabetic' | 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' |
'alphanumeric' | '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' |
For example:
Result: ['odghy', 'kZEYc', 'eOTCl', 'wVCzD']
Prefix and Postfix
You can optionally surround each generated code with a prefix and/or postfix.
For instance:
Result: ['promo-WZ4x1t3U-2015']
Pattern
Codes may follow a specified pattern. Use hash (#
) as a placeholder for random characters.Notice that if pattern
is specified then length
is ignored.
Drakensang Online Voucher Codes
Example:
Result: ['P7-ofW-Ka']
Infeasible configs
There exist some configs that are not feasible. For example it's not possible to generate 1000 codes if you wantyour codes to be 2 characters long and consisting only of numbers. Voucher code generator detects such cases andthrows an error 'Not possible to generate requested number of codes.'
.
Config reference
attribute | default value | description |
---|---|---|
length | 8 | Number of characters in a generated code (excluding prefix and postfix) |
count | 1 | Number of codes generated. |
charset | alphanumeric | Characters that can appear in the code. |
prefix | ' | A text appended before the code. |
postfix | ' | A text appended after the code. |
pattern | '########' | A pattern for codes where hashes (# ) will be replaced with random characters. |
Testing
Install dependencies:
Run tests:
Peac Online Voucher
License
Online Payment Voucher Generator
Code released under the MIT license.