Skip to content

Latest commit

 

History

History
106 lines (69 loc) · 2.63 KB

README.md

File metadata and controls

106 lines (69 loc) · 2.63 KB

NodeJS SDK for the TelePay API

TelePay client library for NodeJS, so you can easely process cryptocurrency payments using the REST API.

Installation

Install the package with npm:

npm install telepay-node

Install the package with yarn:

yarn add telepay-node

Using the library

Refer to the TelePay Docs and follow the first steps guide, you'll get your TelePay account and API key.

To make requests to the TelePay API, you need to import the client.

Import and use the client

const Telepay = require("telepay-node")

const telepay = new Telepay(secret_api_key)

API endpoints

The API endpoints are documented in the TelePay documentation, refer to that pages to know more about them.

Every method returns a Promise.

getMe

Info about the current merchant. Read docs.

telepay.getMe()

getBalance

Get your merchant wallet assets with corresponding balance. Read docs

telepay.getBalance()

getAssets

Get assets supported by TelePay. Read docs.

telepay.getAssets()

getInvoices

Get your merchant invoices. Read docs.

telepay.getInvoices()

getInvoice

Get invoice details, by ID. Read docs.

telepay.getInvoice(number)

createInvoice

Creates an invoice, associated to your merchant. Read docs.

telepay.createInvoice(asset,blockchain,network,amount,description,metadata, success_url, cancel_url, expires_at)

transfer

Transfer funds between internal wallets. Off-chain operation. Read docs.

telepay.transfer(asset, blockchain, network, amount, username, message)

getWithdrawFee

Get estimated withdraw fee, composed of blockchain fee and processing fee. Read docs.

telepay.transfer(asset, blockchain, network, amount, to_address, message)

withdraw

Withdraw funds from merchant wallet to external wallet. On-chain operation.Read docs.

telepay.withdraw(asset, blockchain, network, amount, to_address, message)

ToDo

  • Webhooks