Anyone successfully added IAP support to a Mac App by Electron?


#1

Hi, has anyone tried implementing In-App Purchase function to Mac App by Electron?
Thanks!!


#2

What you’d probably want to do is set up “feature-licenses” for your app, where you can associate e.g. feature X and Y with user A. Easiest way to do this would be with setting up a backend API that manages user accounts that have associated license purchases for each add-on. And then you can query the backend API when the user logs in to determine what they’re allowed to do within your app.

I actually wrote the above licensing dance a few too many times for my own apps, so I ended up creating a SaaS for other devs called Keygen. You can use it to handle users, licensing for in-app purchases and a lot more. In case you’re curious how to implement, I have an example Electron app that you can poke around that implements feature licenses.

Edit: I just realized that this was a question about In-App Purchases for the App Store—I’ve never shipped an Electron app to the App Store, so my above service is only for apps sold independently. My bad, apparently I can’t read. :upside_down_face:


#3

Your idea is nice, but Apple won’t allow this… I have to use official IAP.


#4

Yeah, sorry about that! I misread your post and didn’t realize you were talking about in-app purchases for the App Store. I’ve heard (again, haven’t tried it myself) that this in-app purchases npm module works for the macOS App Store and not just the iOS App Store like the readme says. Hope that helps!


#5

That module is for validation only, it is not a complete solution.
Thank you!


#6

Did you ever figure it out? I need to implement in-app purchase in my Mac app now as well.


#7

I need to do in app purchases in my Electron app for the Mac App Store. It doesn’t seem like anyone has figured out how to do that yet, so I’ve created a post on Stackoverflow with a 300 reputation points worth of bounty. If you think you can get more specific with how you’d do in app purchases, please let me know in there: