The CreditCardPrefixIndexGen Generator generates credit cards via the Luhn algorithm defining the startIndex, cardPrefix, and cardLength.  This Generator must reference another Attribute's Generator via the startIndex parameter; its value will dynamically determine the index of the card number for each iteration. 


The following parameters may be configured for the CreditCardPrefixIndexGen Generator. Items with an asterisk* are required.   

  • cardIndex* - References another Attribute's Generator to dynamically determine the index of the card number during each iteration. Default is 0.

  • cardPrefix* - Defines the prefix of the credit card. Default example is 26444.

  • cardLength* - Defines the fixed length of the credit card. The exact length is necessary in order to correctly generate cards using the Luhn algorithm. Default is 16.

Example: Generate 16-Digit Credit Card Numbers with 26444 Prefix Ranging from 1-10,000

For this example, the CreditCardPrefixIndexGen Generator will need to be linked with the RandomGen Generator. 

The RandomGen Generator is used to set the cardIndex range, as shown below:

Note: To learn more about linking Generators, please see this knowledge base section: Linked Generators.

The RandomGen Generator is referenced by the cardIndex parameter in the CreditCardPrefixIndexGen Generator configuration, as shown below: 

Sample Output

gen1 = cardIndex range

gen2 = Result