Activate pro sites plan by code (hook or sql or any way) looking for workaround

Hello guys,
i am going to use gravity forms for register(new blogs).
all the data like blog name,url and user name will be saved in gravity forms. so i can use this for creating "workaround" that will activate the pro plan based on user choose.

what i have, and how this can work:

i have create 3 packages in the pro sites and set the price only yearly.

i am going to create 3 pricing tables with "buy this plan" bouton.
so every plan will have id (1,2,3) that how i will know which plan the user choose.

the question is now how can i active by code (hook or sql) the pro plan? i don't want to give the user to choose the plan after the register process i want to this by code.

another thing is that the payment for the plan the user will pay in gravity forms so what i need is just to know how to active the plan based on what the user selected before (by id i will know which plan to activate him)

Thanks!