Hello I want to create a unique code generator that generates a code after a payment has been confirmed and sends a mail with the code in it

Hi Ash,

Here is an easy and fast way to generate i unique code.

import { v4 as uuidv4 } from 'uuid';

And use it like this


Kind of string : f5ae8d96-5ed3-4dbb-8c01-e0884829fecf

Kind regards,