Unlocking paid features

110 views
Skip to first unread message

Finn Smith

unread,
Mar 3, 2025, 5:47:36 PMMar 3
to Google Apps Script Community
This is related to the question I asked over the weekend. I'm finishing an add-on that I would like to list as a fremium product. I have Stripe checkout working on my site, and I have a MongDB database that tracks subscriptions.

When the user opens the add-on sidebar, it checks if they've paid. If they haven't, then the premium features are disabled. That isn't a challenge.

The question is this—how do I force the add-on to unlock premium features right after the user has paid? I imagine they'll have the spreadsheet open, then they'll go to my site and pay, then come back. If they've just paid but they see the premium features disabled, it would be a frustrating experience. I can put language in the checkout that they should reload the spreadsheet, but I bet a lot of people would just expect the premium features to be unlocked.

How does everyone else solve this? I have a separate GAS project that is listening for Stripe webhooks, then updating Mongo and a log sheet. I thought about setting up a doPost to listen for the Stripe webhook (or something from my other directory), but I don't know if that would work in a published add-on, and it feels over-engineered.

Ed Robinson

unread,
Mar 5, 2025, 1:09:50 PMMar 5
to Google Apps Script Community
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

Finn Smith

unread,
Mar 13, 2025, 9:12:19 AMMar 13
to Google Apps Script Community
Hi Ed,

Thanks for the information. I played around with Stripe webhooks, but I tend to agree that it isn't reliable. Or, I should say, I can't figure it out.

I've been trying out a client-side check that runs every five minutes. It works locally, but I'm not sure if it will run properly in a published add-on, so I'm considering adding an "activate subscription" button, as you've described.

Regarding Stripe, what I've been doing is linking to a pricing page on my site. There, I have a button that initiates a checkout. I have language on the checkout page reminding users that they should enter the email associated with their Sheets account. Are you just initiating a checkout directly from the add-on and passing the logged-in user's email?

If you want to chat about monetizing add-ons, you can reach me at h...@instantcurrency.tools. Thanks so much for your help!

-Finn

Ed Robinson

unread,
Mar 13, 2025, 11:17:50 PMMar 13
to Google Apps Script Community
My view is: The most important thing is making the process reliable, trustworthy + easy-to-understand for the end user. 

If I purchase something online, I want to know immediately that "it worked" and my credit card info is OK. 
Maybe you can do this with the 5 min client-side check. For me, I found a user-initiated "activate license" button is the most reliable + understandable option.

I'm happy to share how this works - if anyone is interested. I'm super busy getting my app ready for marketplace in the next few days. I'm happy to share info after this is done

Ed  

Reply all
Reply to author
Forward
0 new messages