Sell your app

You can use Nucleus to sell your Electron app and automatically distribute a license to your user.

It will create a page with a simple checkout form like below. See it live here.

Demo

The best parts?

Using a license system instead of directly selling your app installer:

This guide will guide you through how to do that. It's damn fast.

Integrate with your app

If you don't have it already, include the Nucleus module in your app and init it with your app id:

$ npm install --save electron-nucleus
// Import the Nucleus Library and init with your app id
const Nucleus = require('electron-nucleus')('yourAppID')

After that, make a way for your users to input a license and store it somewhere.

You should check the license validity right away and on each boot.

Nucleus.checkLicense('SOME_LICENSE', (err, license) => {
    if (err) return console.error(err)

    if (license.valid) {
        console.log('License is valid :) Using policy '+license.policy)
    } else {
        console.log('License is invalid :( ')
    }
})

Create a policy

On Nucleus' side, head to your Nucleus dashboard, "Licenses" tab.

You'll need to create a license policy. A policy defines the restrictions you choose to apply to a license.

Create a policy

For example, if you set the version component of the policy to 'current', a license will only work on the version your app was at the time the license was bought.

Finally set a price for a license with this policy. For now the price is only in US Dollars.

You can create unlimited policies.

Add payment processors

Then, head to the 'Sell' section of your dashboard.

From there, you can choose which payment processors to enable. Optionally, enable test mode to try the integration.

Currently, Stripe (credit/debit cards), PayPal and Coingate (cryptocurrencies) are supported.

To use these services with Nucleus, copy your API keys from them to Nucleus. We'll assume you already have an account with these services.

Stripe

Create an account for the app you want to sell.

Head over to the API section of your Stripe dashboard.

Stripe keys

Now copy the tokens to Nucleus. Then hit "View test data" and copy the test keys.

PayPal

Head over to My Apps & Credentials, scroll down the page and create a new REST application.

PayPal app

Once the app is created, copy the client ID and secret to Nucleus.

PayPal app

Now hit "sandbox" on the top right toggle and copy your sandbox keys.

Coingate

Go to your account's apps. Hit 'New App' to create a new app with the configuration you want to use.

Coingate keys

Now copy your app ID, API key and API secret to Nucleus.

Coingate dispose of a copycat version of its service for testing purpose. Repeat the actions by replacing coingate.com with sandbox.coingate.com. to get sandbox keys.

The final step is to copy the link Nucleus generated. Go to the bottom of the 'Sell' section.

Copy links

You'll send it/show it to anyone who might be intested in buying your app :)

Go to the bottom of the page and copy link corresponding to the policy you want to sell.