Documentation
Node.js

Node.js

This is the Sellgate Node SDK. It is a simple SDK that allows you to easily integrate crypto payments into your Node.js application.

Installation

npm install sellgate

Usage

import { sellgate } from 'sellgate';
 
const checkout = sellgate.createCheckout({
  title: 'Premium Subscription',
  description: '1-year access to all premium features',
  currency: 'USD',
  price: '99.99',
  crypto: [
    {
      network: 'ETH',
      coin: 'ETH',
      address: '0xB1DA646D1cD015d205a99198e809724D5C78109d',
    },
  ],
  webhook: 'https://example.com/webhook',
  return: 'https://example.com/thank-you',
})
 
console.log(checkout.url);
 
const address = sellgate.createAddress({
  crypto: {
    network: 'ETH',
    coin: 'ETH',
    address: '0xB1DA646D1cD015d205a99198e809724D5C78109d',
  },
  webhook: 'https://example.com/webhook',
})
 
console.log(address.receive_address)