A very simple JavaScript library for api.lvlup.pro/v4 and api.sandbox.lvlup.pro/v4.
npm i lvlup-js -S
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);
})()
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);
})()
LVLUP-JS Documentation
GitHub Repository
npm package
Bogusław Witek