Hi Finn,
I spent days solving the same problem! Here is what does/doesn't work and a recommendation:
- Stripe webhook. These aren't simple to use with Apps Script. The reason is: Apps Script allows anonymous GET, but not anonymous POST, the POST from the webhook will not reach your app unless it passes IAMs authentication OK. Getting this to work reliably is possible, but tricky.
- Reload spreadsheet. A good option, but as you say adds friction.
Recommendation:
- What I've done is: from the add on, show a purchase dialog. The dialog opens a stripe checkout page, and has an "activate license" button. The user clicks the button after the purchase, and the system checks, then applies the license. It is not totally automatic, but very robust
BTW: if you use Stripe checkout, be aware the user can change the email address in the checkout, and the purchase will then be dis-associated from their Google account. You'll need to add logic to deal with this.
Ed