LavaAPI - A simple library for accepting payments and using the LAVA Wallet

Overview

N|Solid

Python

This library was created to simplify the LAVA api provided on the official website, in the Python programming language.
Эта библиотека создана для упрощения работы с LAVA api, предоставленной на официальном сайте, на языке программирования Python.

Features - Возможности

  • Checking token validity - Проверка токена на валидность
  • Detailed validity check of the token - Подробная проверка токена на валидность
  • Checking wallet balance - Проверка баланса кошелька
  • Withdrawal from a wallet - Вывод из кошелька
  • Transfers between wallets - Переводы между кошельками
  • Transfer history of your wallet - История переводов вашего кошелька
  • Creating a bill for payment - Создания счета для оплаты
  • Information about the bill - Информация о созданном счете

Installation - Установка

Python version 3.6 or higher must be installed Необходимо установить Python версии не ниже 3.6

pip install requests
pip install lavaapi

Using - Использование

To get your TOKEN, you need to register in LAVA and get your key by following this link
Для получения вашего ТОКЕНА необходимо зарегистрироваться в LAVA и получить свой ключ по этой ссылке

API key = Token

Checking token validity - Проверка токена на валидность

Returns True or False
Возвращает True или False

CheckWallet("YOUR_TOKEN")

Detailed validity check of the token - Подробная проверка токена на валидность

Returns True if valid or String with error
Возвращает True если валидный или String с ошибкой, если токен невалидный

CheckWalletDetails("YOUR_TOKEN")

Checking wallet balance - Проверка баланса кошелька

Returns String
Возвращает String

CURRENCY: "USD", "EUR" or "RUB"

WalletBalance("YOUR_TOKEN", "CURRENCY")

Withdrawal from a wallet - Вывод из кошелька

Returns True or String with error Возвращает True или String с ошибкой

ACCOUNT_ID: Your account number (For example: R10007689)
AMOUNT: Withdrawal amount in Int
SERVICE: "qiwi", "yoomoney", "card", "advcash", "payeer", "mobile", "perfect"
WALLET_TO: Wallet, where the money will be withdrawn

WithdrawCreate("YOUR_TOKEN", "ACCOUNT_ID", AMOUNT, "SERVICE", "WALLET_TO")

Example:

WithdrawCreate("MY_TOKEN", "R10007689", 100, "qiwi", "88005553535")

Transfers between wallets - Переводы между кошельками

Returns True or String with error
Возвращает True или String с ошибкой

ACCOUNT_ID: Your account number (For example: R10007689)
AMOUNT: Transferable amount in Int
ACCOUNT_TO: Account to which the money will be transferred

TransferCreate("YOUR_TOKEN", "ACCOUNT_ID", AMOUNT, "ACCOUNT_TO")

Example:

TransferCreate("MY_TOKEN", "R10007689", 500, "R100126592")

Transfer history of your wallet - История переводов вашего кошелька

Returns an array of data
Возвращает массив данных

ACCOUNT_ID: Your account number (For example: R10007689)
**TYPE: "withdraw" or "transfer"
**LIMIT: Number of records that will be returned

** - Optional parameter - Необязательный параметр

TransactionsList("YOUR_TOKEN", "ACCOUNT_ID", type="TRANSLATION_TYPE", limit=MAX_TRANSLATION)

Example:

myTranslations = TransactionsList("MY_TOKEN", "R10007689", limit=3)
print(myTranslations[0]["amount"], myTranslations[0]["comment"])
1230.00 Hello

Full function output:

[
    {
        "id": "bc81edeb-3f81-156d-21bd-06c67010094f", // Номер транзакции
        "created_at": "1634902579",  // Время создания (unix timestamp)
        "created_date": "2021-10-22T11:36:19+00:00", // Время создания
        "amount": "1230.00", // Сумма транзакции
        "status": "success", // Статус транзакции
        "transfer_type": "transfer", // Тип перевода
        "comment": "Hello", // Комментарий
        "method": "-1", // Метод 1 - зачисление, -1 - расход
        "currency": "RUB", // Валюта
        "account": "R10000001", // Номер аккаунта
        "commission": "12.30", // Комиссия
        "type": "out", // Тип in - пополнение, out - перевод
        "receiver": "R10000000" // Номер аккаунта получателя
    },
    {
        "id": "3e22b0c8-2c4a-93d8-2f6d-b93ce824ee62",
        "created_at": "1634899536",
        "created_date": "2021-10-22T10:45:36+00:00",
        "amount": "1000.01",
        "commission": "0.00",
        "status": "pending",
        "transfer_type": "withdraw",
        "service": "card",
        "comment": null,
        "method": "-1",
        "currency": "RUB",
        "account": "R10000001"
    },
    {
        "id": "f569a6e7-14e4-1895-374c-c9dd6775c0ce",
        "created_at": "1634744391",
        "created_date": "2021-10-20T15:39:51+00:00",
        "amount": "1000.00",
        "status": "pending",
        "transfer_type": "transfer",
        "comment": "123123",
        "method": "1",
        "currency": "RUB",
        "account": "R10000001",
        "commission": 0,
        "type": "in",
        "sender": "system" // Отправитель
    },
]

Creating a bill for payment - Создания счета для оплаты

Returns Json array
Возвращает массив Json

ACCOUNT_ID: Your account number (For example: R10007689)
AMOUNT: Transferable amount in Int
**EXPIRE: The time in minutes after which the account will automatically close. By standard 1440
**SUCCESSURL: Url for redirection after successful payment
**FAILURL: Url for redirecting after unsuccessful payment
**SUBTRACT: Who to charge the commission to (1 - Write off from the client, 0 - Write off from the store). By standard 0
**COMMENT: Payment comment
**MERCHANTNAME: Merchant name (displayed in the translation form)

** - Optional parameter - Необязательный параметр

InvoiceCreate("YOUR_TOKEN", "ACCOUNT_ID", AMOUNT, expire=None, successUrl=None,
                  failUrl=None, subtract=0, comment=None, merchantName=None)

Example:

billCreate = InvoiceCreate("MY_TOKEN", "R10007689", 150, comment="DBD20RANK")
print("Payment link:", billCreate["url"])
Payment link: https://p2p.lava.ru/form?id=1ee31634-e3e0-34ce-1423-b5b4cb524c6a

Full function output:

{
    "status": "success",
    // Номер счета на оплату
    "id": "1ee31634-e3e0-34ce-1423-b5b4cb524c6a",
    // Ссылка на оплату
    "url": "https://p2p.lava.ru/form?id=1ee31634-e3e0-34ce-1423-b5b4cb524c6a",
    // Время истечения счета
    "expire": 1636983503,
    // Сумма счета
    "sum": "100.00",
    // URL для переадресации после успешной оплаты 
    "success_url": "https://lava.ru?success",
    // URL для переадресации после неудачной оплаты 
    "fail_url": "https://lava.ru?fail",
    // URL для отправки webhook
    "hook_url": "https://lava.ru?hook",
    // Дополнительное поле
    "custom_fields": "123",
    // ID и наименование мерчанта
    "merchant_name": "123",
    "merchant_id": "123",
}

Information about the bill - Информация о созданном счете

Returns Json array
Возвращает массив Json

ACCOUNT_ID: Your account number (For example: R10007689)
BILL_ID: Billed number

InvoiceInfo("YOUR_TOKEN", "BILL_ID")

Example:

billCreate = InvoiceInfo("MY_TOKEN", "R10007689", "1ee31634-e3e0-34ce-1423-b5b4cb524c6a")
print(billCreate["invoice"]["comment"])
На бигтести с колой

Full function output:

{
    "status": "success",
    "invoice": {
        // Номер счета на оплату
        "id": "1ee31634-e3e0-34ce-1423-b5b4cb524c6a",
        // Номер счета в системе клиента
        "order_id": "order_125",
        // Время истечение счета
        "expire": 1636983503,
        // Сумма счета
        "sum": "100.00",
        // Комментарий
        "comment": "На бигтести с колой",
        // Статус счета
        "status": "success",
        // URL для переадресации после успешной оплаты 
        "success_url": "https://lava.ru?success",
        // URL для переадресации после неудачной оплаты 
        "fail_url": "https://lava.ru?fail",
        // URL для отправки webhook
        "hook_url": "https://lava.ru?hook",
        // Дополнительное поле
        "custom_fields": "123"
    }
}

License

GNU General Public License (GPL)

Owner
Vlad Baccara
working hard
Vlad Baccara
Plataforma para atendimento a outras empresas que necessitam de atendimento técnico.

Plataforma para atendimento a outras empresas que necessitam de atendimento técnico. É possível que os usuarios de empresas parceiras registrem solici

Kelvin Alisson Cantarino 2 Jun 29, 2022
Talon accessibility - Experimental Talon integrations using macOS accessibility APIs

talon_accessibility Experimental Talon integrations using macOS accessibility AP

Phil Cohen 11 Dec 23, 2022
RedFish API Toolkit

RedFish API Toolkit RedFish API Toolkit Build Status GitHub Actions Travis CI Requirements requirements.txt requirements-dev.txt Dependencies Document

Larry Smith Jr. 1 Nov 20, 2021
Pluggable Telethon - Telegram UserBot

A stable pluggable Telegram userbot, based on Telethon.

Team Ultroid 2.3k Dec 30, 2022
Python script to decode the EU Covid-19 vaccine certificate

vacdec Python script to decode the EU Covid-19 vaccine certificate This script takes an image with a QR code of a vaccine certificate as the parameter

Hanno Böck 244 Nov 30, 2022
Python Library for Accessing the Cohere API

Cohere Python SDK This package provides functionality developed to simplify interfacing with the Cohere API in Python 3. Documentation See the API's d

cohere.ai 42 Jan 03, 2023
FTX auto lending bot with python

FTX auto lending bot Get the API key Check my article for step by step + screenshots Setup & Run Install python 3 Install dependency pip install -r re

Patompong Manprasatkul 1 Dec 24, 2021
Best Buy purchase bot

B3 Best-Buy-Bot. Written in Python NOTICE: Don't be a disgrace to society. Don't use this for any mass buying/reselling purposes. About B3 is a bot th

Dogey11 8 Aug 15, 2022
API Wrapper for seedr.cc

Seedr Python Client Seedr API built with 💛 by Souvik Pratiher Hit that Star button if you like this kind of SDKs and wants more of similar SDKs for o

Souvik Pratiher 2 Oct 24, 2021
Secure Tunnel Manager

Making life easy of those who are in need of OpenSource alternative of AWS Secure Tunnel.

Suyash Chavan 1 Sep 27, 2022
Implementation of the paper 'Sentence Bottleneck Autoencoders from Transformer Language Models'

Introduction This repository contains the code for the paper Sentence Bottleneck Autoencoders from Transformer Language Models by Ivan Montero, Nikola

Ivan Montero 14 Dec 28, 2022
Manage AWS Secrets the easy way

AWStanding Easily load variables from AWS Parameter store into environment variables. Why to AWStanding? Because it handles AWS pagination so the amou

Juan Ignacio Sánchez Sampayo 13 Dec 30, 2022
Dribble sign up screen built in python and kivy

Dribble sign up screen built in python and kivy contains Dribble icon with icon position and shadow animation.

1 Dec 06, 2021
Weee - Advanced project's versions bumper

Weee - Advanced project's versions bumper

Yan Kurbatov 2 Jun 06, 2022
A simpler way to make forms, surveys, and reaction input using discord.py.

discord-ext-forms An easier way to make forms and surveys in discord.py. This module is a very simple way to ask questions and create complete forms i

thrizzle 16 Nov 06, 2022
Python client for ETAPI of Trilium Note.

Python client for ETAPI of Trilium Note.

33 Dec 31, 2022
Upvotes and karma for Discord: Heart 💗 or Crush 💔 a comment to give points to an user, or Star ⭐ it to add it to the Best Of!

🤖 Reto Reto is a community-oriented Discord bot, featuring a karma system, a way to reward the best comments, leaderboards, and so much more! React t

Erik Bianco Vera 3 May 07, 2022
Deezer client for python

Deezer Python Client A friendly Python wrapper around the Deezer API. Installation The package is published on PyPI and can be installed by running: p

Bruno Alla 103 Dec 19, 2022
Opasium AI was specifically designed for the Opasium Games discord only. It is a bot that covers the basic functions of any other bot.

OpasiumAI Opasium AI was specifically designed for the Opasium Games discord only. It is a bot that covers the basic functions of any other bot. Insta

Dan 3 Oct 15, 2021
Telegram Userbot built with Pyrogram

Pyrogram Userbot A Telegram Userbot based on Pyrogram This repository contains the source code of a Telegram Userbot and the instructions for running

Athfan Khaleel 113 Jan 03, 2023