0.1.3 • Published 4 years ago

lvlup-js v0.1.3

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

LVLUP-JS

A very simple JavaScript library for api.lvlup.pro/v4 and api.sandbox.lvlup.pro/v4.


Installation

npm i lvlup-js -S

Example #1 (Production)

const LvlupApi = require('lvlup-js');
const lvlup = new LvlupApi('API-KEY');

(async () => {
    const linkForPayment = await lvlup.createPayment('32', 'https://example.site/redirect', 'https://example.site/webhook');
    console.log(linkForPayment);
})()

Example #2 (Sandbox)

const LvlupApi = require('lvlup-js');
const lvlup = new LvlupApi('API-KEY', {env: 'sandbox'});

(async () => {
    const linkForPayment = await lvlup.createPayment('32', 'https://example.site/redirect', 'https://example.site/webhook');
    console.log(linkForPayment);
})()

License

MIT

Links

LVLUP-JS Documentation GitHub Repository npm package

Author

Bogusław Witek