DePay Sales v1 is live 🛒 🛍️

Sales

The ultimate guide to integrate decentralized sales.

DePay Sales allows you easily sell tokens directly from your website or Dapp while accepting thousands of crypto assets as means of payment.


Quick start

<script src="https://unpkg.com/depay-widgets@1/dist/umd/index.js"/>
DePayWidgets.Sale({
  amount: {
    min: '1',
    start: '10',
    step: '1'
  },
  token: '0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb'
});

Preparation

In order to to sell tokens in a decentralized way on any blockchain you need to have a decentralized liquidity pool (dex pair) on any decentralized exchange:


Sale widget

The DePay sale widget allows you easily sell tokens directly from your website or Dapp while accepting thousands of crypto assets as means of payment.

Installation

You can either load the depay-widgets package via unpkg's CDN:

<script src="https://unpkg.com/depay-widgets@1/dist/umd/index.js"/>

or you install depay-widgets via the package manager of your choice and ship it as part of your application bundle:

yarn add depay-widgets
npm install depay-widgets --save

and load the DePayWidgets package wherever you need it:

import DePayWidgets from 'depay-widgets';

Configuration

You need to pass a configuration object to DePayWidgets.Sale which needs to contain the fields:

amount

The amount object contains the amount of preselected tokens when the widget opens (start), the minimum amount of tokens the user can select in the widget (min) and by which number the amount increments/decrements when changed by the user (step). "20".

The BigNumber of that amount will be calculated internally including finding the right amount of decimals for the given token. So please just pass the amount in a human readable form: e.g. "20" for 20 USDT and not "2000000" (BigNumber).

token

The address of the token you want to receive.

Use our sale configurator in order to simplify configuration.

callback

A function that will be called once the sale has been successfully confirmed by the network.

The widget will call the `callback` function passing a callback object as an argument:

{
  tx: 'the transaction hash of the confirmed transaction'
}


Sale configurator

Use our sale configurator in order to simplify the configuration:

DEPAY
DePayWidgets.Sale({
  amount: {
    min: '1',
    start: '10',
    step: '1',
  },
  token: '0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb'
});

Support

Need additional help
?

Feel free to reach out in order to get additional help:

Ask the community
Open an issue
Start a conversation