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.00', '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.00', '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