7
18 Comments

Taking payments from inside an extension?

Howdy folks, have a quick question for ya'll.

Has anyone built an extension where users are able to pay from inside the extension.

Why am I asking this?
For my latest project, I saw that taking users to gumroad first -> buying and getting the license key -> going to CWS and installing -> then entering the license key - introduces a lot of friction.

Instead of that, adding stripe payments or something similar from inside the extension would eliminate a lot of problems I reckon.

  1. 2

    If you can have your users authenticate via a normal (https) websitr and pass the authentication token back to the extension, then you can also do subscription setup, payment gateway stuff etc. from that normal website, just like a typical SaaS. That's what we do and works quite well.

    On a tangent to that, due to how difficult Google has been recently with extension updates, I think it's worth building as much of your extension as possible as a normal web page and leave just the stuff that needs additional privileges in the extension itself, with a message passing protocol between the two, as that will let you update most of your functionality without updating your extension, which these days will mean you can update much more rapidly.

    1. 1

      The delay times associated with updates has been something I’ve been struggling with. Could you elaborate a bit more on what you mean when your say “ building as much of your extension as possible as a normal web page and leave just the stuff that needs additional privileges in the extension itself”?

      Do you mean just using/adding an iframe to you extension?

      Thanks!

      1. 1

        You can pass messages between a web page and your extension, see https://developer.chrome.com/extensions/messaging#external-webpage

        What I mean is build as much functionality as possible (and all of your UI) as a web site, and leave just the stuff that requires access to elevated privileges in the extension. I don't mean to necessarily do the UI as an iframe within your extension, although there may be cases where that works.

        1. 1

          I'm still slightly confused. If you're building your UI as a website, how are you loading this UI into your extension without an iframe?

          Thanks again for your help!

          1. 1

            Depends on the specifics of UI and behavior. In my extension's case, our browser action pops up a separate window which loads a web page directly. If you're using a browser action panel then you'd need an iframe.

  2. 2

    Hey Shash!

    This is a tricky one but there are a couple work arounds. First of all, I'm not familiar with Gumroad's capabilities and if they have API's etc. but chrome extensions exist under a chrome:// URL and are not TLS secured. This means that many payment providers do not allow you to accept payments on that 'domain' because it does not have https://

    When building @partizion I used stripe for payments and faced this exact problem. Depending on how you handle authentication, you could possibly pass login or build a separate app for taking payments.

    I know this isn't exactly the help you were looking for but if you are going to go with stripe (Whom I strongly recommend, they're great) you won't be able to take payments DIRECTLY in your chrome extension.

    1. 1

      Yep gotcha. Since extensions aren't tls secured, I can't collect payments even via a built-in form which sends card details to a proxy server which sends them to stripe?

  3. 2

    Haven’t done it but I love the idea!

  4. 1

    If you don't want to build your own thing, you can use ExtensionPay! It's free to use, works across browsers, is easy to integrate into your extensions, and doesn't require your users to copy and paste (and lose) license keys.

  5. 1

    Sorry a bit late to the game and I'm reading these comments now.

    @shash7 what did you end up doing?

  6. 1

    Hey Shash,

    Chrome does offer its own payment system if you are only targeting the Chrome browser. But if you are like me and offer your extension for Chrome, Firefox, Opera, and Edge, then implementing your own upgrade solution would be best.

    The way I do it for my Weather Extension is to show the upgrade link within the extension. The link is specific to the user so when they upgrade, their account is upgraded automatically. No need for them to enter a license key. This has worked great across browsers.

    Let me know if you have any questions.

    1. 1

      When you say you give them a unique link, that makes perfect sense, but do you have some authentication system in place also? How do you identify a user has paid if they switch browsers or if they switch physical machines?

      I know of chrome's sync storage so that could maybe be used for storing data across machines but only for chrome. I don't know how reliable it is, or if it gets wiped out on uninstall etc. never really dug into it.

      1. 2

        I use chrome's storage sync but that does not always work if they do not log in with the same chrome profile. I have a way for users to reactivate their accounts using their license key. Also, they can contact me and I can manually upgrade the new install for them. It is not perfect but works well for my extension.

        1. 1

          Good into, thanks!

    2. 1

      Hey I've checked out your extension before.
      From my understanding, Chrome's payment system is brutally lacking in features:

      • The analytics are piss poor
      • No coupons(as far as I know)
      • No webhooks(as far as I know)
      • No way to add metadata in the payment flow(as far as I know)
      • Poor documentation
      • Still need to use something custom if I publish my extension on Firefox, Safari, etc.
        To top it off, they have the galls to charge 10% of the price.

      Also, it seems that lately they have disabled in-app purchases for some reason.

      1. 1

        Oh and forgot to mention I use stripe and PayPal. I definitely recommend adding PayPal as an option to upgrade. A lot of people still use PayPal.

      2. 1

        I would definitely go with your own solution. If it’s not recurring it’s pretty easy to implement with stripe checkout 👍

Trending on Indie Hackers
Getting first 908 Paid Signups by Spending $353 ONLY. 24 comments I talked to 8 SaaS founders, these are the most common SaaS tools they use 20 comments What are your cold outreach conversion rates? Top 3 Metrics And Benchmarks To Track 19 comments How I Sourced 60% of Customers From Linkedin, Organically 12 comments Hero Section Copywriting Framework that Converts 3x 12 comments Join our AI video tool demo, get a cool video back! 12 comments