Getting started

Node.js 0xPay integration package

circle-info

To authorize your requests and use SDK you have to obtain private key.

0xPay SDK allows to integrate and start work with Merchant Public API in several moves.

Getting started

Prerequisites

To start using 0xPay SDK you need merchant id and private key. So you must register an account and create a merchant to obtain API credentials.

circle-info

Note: If you want to receive and process webhook notifications, you will need to setup your merchant.

Installation

// NPM
npm i @0xpay/sdk
// Yarn
yarn add @0xpay/sdk

Create instance

import { XPay } from '@0xpay/sdk'

const MERCHANT_ID = 'your-merchant-id'
const MERCHANT_PRIVATE_KEY = 'your-merchant-private-key'

// Create XPay instance
const xpay = new XPay(MERCHANT_ID, MERCHANT_PRIVATE_KEY)

Get available crypto assets

Create receiving crypto address

Last updated