A Node.js wrapper around the Payiota.me API.
$ npm i --save payiota
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
// Buy $42
price: 42,
custom: "some metadata",
}).then(res => {
console.log("transaction created", res)
}).catch(err => {
console.error(err)
})
// Update
payiota.buy({
verification: verificationKey,
address: "the address"
}).then(res => {
console.log("new price of in IOTA's ", res)
}).catch(err => {
console.error(err)
})
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. 🐛
A Node.js wrapper around the Payiota.me API.
- String
key
: The Payiota API key.
Creates an invoice (address/price pair).
- Object
options
: An object containing the following fields:price
(Number): The price in usdcustom
(String): A custom string metadata about the transaction.action
(String): The transaction action. Useupdate
for invoices for a later date.address
(String): The address of saved invoice.
- Promise A promise resolving with the reponse from Payiota.me.
Have an idea? Found a bug? See [how to contribute][contributing].
MIT © [Andy Lisac][website]
[website]: [contributing]: /CONTRIBUTING.md [docs]: /DOCUMENTATION.md