2
10 Comments

How to Sell Extension with Gumroad Licence Key

I have chrome extension right now to sell i am using google groups hence the extension is not publically available until you buy

i saw gumroad https://help.gumroad.com/article/76-license-keys#cURLexample

can help but i have no idea how to use curl in js any suggestions? or any other option to sell (generate new licence key) and check in the chrome extension.

or else i have to code a custom backed the biggest downside is then i have to code the affiliate option fully custom as well

but if i can make it work with gumroad they can handle the affiliate option as well

So how to use curl in JS?

posted to Icon for group Browser Extension Makers
Browser Extension Makers
on December 16, 2020
  1. 1

    Hey @theindianappguy, I'm curious — what is the affiliate option you're looking to take advantage of in Gumroad?

  2. 1

    Just fyi - best if you setup a simple intermediatery server because you'll run into cors issues.

    1. 1

      hey @shash7, why would he run into CORS issues? Here's an extension that uses Gumroad's API that doesn't even have the content_security_policy field in the manifest.json: https://robwu.nl/crxviewer/?crx=https%3A%2F%2Faddons.mozilla.org%2Fen-US%2Ffirefox%2Faddon%2Fds-amazon-quick-view-ext%2F

      1. 1

        It didn't work for me.
        @theindianappguy maybe try connecting to gumroad directly. Seems to be working for some extensions.

    2. 1

      have you implemented this before? if so can you help please

      1. 1

        Sure, so you'll need a simple express server. That will route all your gumroad based routes to gumroad.
        In your extension you'll need to add your server to the csp allowed list inside manifest.json

        "content_security_policy": "connect-src http://localhost:4000 https://yourserver.com "
        

        ---
        Just beware that the Gumroad license api is notoriously lacking in features. For instance, if you want to programmatically deactive/reactive a user's license key, you'll need to write your own logic on your server. Generally, you shouldn't be worried about this unless you're making heaps of sales.

        1. 1

          Thanks a lot what do you think if i implement this myself, i mean if i am using my server why don't just create a key and save to server and check

          if i am using my own server i may not use gumroad option then

  3. 1

    There's no curl in javascript but u can use any variation of XHR, for instance, fetch would work just fine.

    1. 1

      yep didn't know how to convert curl to be used as fetch this helped thanks for reply

Trending on Indie Hackers
AI runs 70% of my distribution. The exact stack. User Avatar 191 comments I used $30,983 of AI tokens last month in Claude code on $200/mo plan User Avatar 86 comments 30 days ago I posted here with $0 revenue. Here's what actually happened next. User Avatar 83 comments my reddit post got 600K+ views. here's exactly what i did User Avatar 43 comments I turned someone’s tweet into an app idea and it has made ~$3000 so far in 4 months. User Avatar 37 comments How to spot high-intent customers in 5 minutes, for free. User Avatar 35 comments