Hi,
From your description, it seems that you want to generate the scratch card number and pin number in your system, right?
If so, I suggest that you can create a data table in your database with two columns, one is for scratch card number and another is for the pin number. You can generate the scratch card number and pin number by producing a new guid, and insert them into data table. So once the user enter the scratch card number and pin number, all those information will be authenticated by query for the corresponding row in that data table.
Thanks.
Michael Jin.
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.