lvlup-js
Version:
Simple library for LVLUP V4 API
43 lines (33 loc) • 1.14 kB
Markdown
**A very simple JavaScript library for [api.lvlup.pro/v4](https://api.lvlup.pro/v4) and [api.sandbox.lvlup.pro/v4](https://api.sandbox.lvlup.pro/v4).**
------
```plain
npm i lvlup-js -S
```
```javascript
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);
})()
```
```javascript
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);
})()
```
[](https://github.com/boguslawwitek/lvlup-js/blob/master/LICENSE)
[](https://bwitek.dev/lvlup-js)<br>
[](https://github.com/boguslawwitek/lvlup-js)<br>
[](https://www.npmjs.com/package/lvlup-js)
Bogusław Witek