Hi Andrew,
I use Firebase and just store the license based on their logged in email: Session.getEffectiveUser().getEmail();
Then I store a salted and hashed version of that in Firebase.
I use Romain's library: MYeP8ZEEt1ylVDxS7uyg9plDOcoke7-2l
Then here is my calls to store:
var firebaseUrl = "https://<<yourProject>>.
firebaseio.com";
var secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
I do some calls here to hash+salt email for security and make them Firebase safe using encodeAsFirebaseKey which return newDomain and newUser
//now send the info we want to Firebase
//use Romain's library to update data. We can update even if the path does not exist yet
var database = FirebaseApp.getDatabaseByUrl(firebaseUrl, secret);
var addPremiumToUser = database.updateData("users/"+newDomain+"/"+newUser,{"license":"true"});
Also need to make sure to make the email address Firebase ready. I use a function from Romain's Github:
Hope that helps!
I also hook in payment through Stripe elements and initially store the license on Firebase after that all through server side Apps Script.