1.0.5 • Published 7 years ago

payiota v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

payiota

Version Downloads

A Node.js wrapper around the Payiota.me API.

:cloud: Installation

$ npm i --save payiota

:clipboard: Example

const PayiotaAPI = require("payiota");

const payiota = new PayiotaAPI("your api key")

// Create an invoice
payiota.buy({
    // You will have to take care
    // of encrypting this on your side
    // if you are concerned about security
    custom: "some metadata",

    // Buy $42
    price: 42,
}).then(res => {
    console.log("transaction created", res)
}).catch(err => {
    console.error(err)
})

// Create an invoice for a later date
payiota.buy({
    custom: "some metadata",
    price: 42,
    address: "the address"
}).then(res => {
    console.log("transaction created", res)
}).catch(err => {
    console.error(err)
})

:question: Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. :bug:

:memo: Documentation

Payiota(key)

A Node.js wrapper around the Payiota.me API.

Params

  • String key: The Payiota API key.

buy(options)

Creates an invoice (address/price pair).

Params

  • Object options: An object containing the following fields:
    • price (Number): The price in usd
    • custom (String): A custom string metadata about the transaction.
    • action (String): The transaction action. Use update for invoices for a later date.
    • address (String): The address of saved invoice.

Return

  • Promise A promise resolving with the reponse from Payiota.me.

:yum: How to contribute

Have an idea? Found a bug? See how to contribute.

:scroll: License

MIT © Andy Lisac

website:

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago