creditCardType

Generate a credit card type.

{"type": "creditCardType"}

// 'MasterCard', 'Visa'

creditCardNumber

Generate a credit card number with a given type. By default, a random type is used. Supported types are ‘Visa’, ’ MasterCard’, ‘American Express’, and ‘Discover Card’.

Optionally, a second and third parameter may be supplied. These define if the credit card number should be formatted, and which separator to use.

{"type": "creditCardNumber"}

// '4556817762319090', '5151791946409422'

{"type": "creditCardNumber", "param": ['Visa']}

// '4539710900519030', '4929494068680706'

{"type": "creditCardNumber", "param": ['Visa', true]}

// '4624-6303-5483-5433', '4916-3711-2654-8734'

{"type": "creditCardNumber", "param": ['Visa', true, '::']}

// '4539::6626::9844::3867', '4916::6161::0683::7022'

creditCardExpirationDate

Generate a credit card expiration date (DateTime). By default, only valid dates are generated. Potentially invalid dates can be generated by using false as input.

{"type": "creditCardExpirationDate"}

// DateTime: between now and +36 months

{"type": "creditCardExpirationDate", "param": [false]}

// DateTime: between -36 months and +36 months

creditCardExpirationDateString

Generate a credit card expiration date (string). By default, only valid dates are generated. Potentially invalid dates can be generated by using false as input.

The string is formatted using m/y. Optionally, a second parameter can be passed to override this format.

{"type": "creditCardExpirationDateString"}

// '09/23', '06/21'

{"type": "creditCardExpirationDateString", "param": [false]}

// '01/18', '09/21'

{"type": "creditCardExpirationDateString", "param": [true, 'm-Y']}

// '12-2020', '07-2023'

creditCardDetails

Generate an array with credit card details. By default, only valid expiration dates will be generated. Potentially invalid expiration dates can be generated by using false as input.

{"type": "creditCardDetails"}

// ['type' => 'Visa', 'number' => '4961616159985979', 'name' => 'Mr. Charley Greenfelder II', 'expirationDate' => '01/23']

{"type": "creditCardDetails", "param": [false]}

// ['type' => 'MasterCard', 'number' => '2720381993865020', 'name' => 'Dr. Ivy Gerhold Jr.', 'expirationDate' => '10/18']

iban

Generate an IBAN string with a given country and bank code. By default, a random country and bank code will be used.

The country code format should be ISO 3166-1 alpha-2.

{"type": "iban"}

// 'LI2690204NV3C0BINN164', 'NL56ETEE3836179630'

{"type": "iban", "param": ['NL']}

// 'NL95ZOGL3572193597', 'NL76LTTM8016514526'

{"type": "iban", "param": ['NL', 'INGB']}

// 'NL11INGB2348102199', 'NL87INGB6409935479'

swiftBicNumber

Generate a random SWIFT/BIC number string.

{"type": "swiftBicNumber"}

// 'OGFCTX2GRGN', 'QFKVLJB7'