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
Telegram Vc Video Player Bot

Telegram Video Player Bot Telegram bot project for streaming video on telegram video chat, powered by tgcalls and pyrogram Deploy to Heroku 👨‍🔧 The

Dihan Official 11 Dec 25, 2022
A quick way to verify your Climate Hack.AI (2022) submission locally!

Climate Hack.AI (2022) Submission Validator This repository contains code that allows you to quickly validate your Climate Hack.AI (2022) submission l

Jeremy 3 Mar 03, 2022
EZXT - A ccxt wrapped client for binance & ftx

EZXT Open source & beginner-friendly ccxt wrapped client for binance & ftx Want

Shaft 10 Oct 25, 2022
Gnosis-py includes a set of libraries to work with Ethereum and Gnosis projects

Gnosis-py Gnosis-py includes a set of libraries to work with Ethereum and Gnosis projects: EthereumClient, a wrapper over Web3.py Web3 client includin

Gnosis 93 Dec 23, 2022
Pure Python 3 MTProto API Telegram client library, for bots too!

Telethon ⭐️ Thanks everyone who has starred the project, it means a lot! Telethon is an asyncio Python 3 MTProto library to interact with Telegram's A

LonamiWebs 7.3k Jan 01, 2023
A python bot that stops muck chains

muck-chains-stopper-bot a bot that stops muck chains this is the source code of u/DaniDevChainBreaker (the main r/DaniDev muck chains breaker) guys th

24 Jan 04, 2023
Discord bot for name verifying. Created for TinkerHubGCEK discord server. Tinky is now deployed in heroku

Custom Discord bot This custom discord-python bot assigns roles to members joined at discord server. It looks and compares a list before verifying the

Edwin Jose George 2 Dec 16, 2021
This is a script to export logs from AWS CloudTrail to a local file.

cloudtrail-export-logs This is a script to export logs from AWS CloudTrail to a local file. Getting Started Prerequisites python 3 boto3 pip Installin

Claick Assunção de Oliveira 2 Jan 02, 2022
A Chip-8 emulator written using Python's default libraries

Chippure A Chip-8 emulator written using Python's default libraries. Instructions: Simply launch the .py file and type the name of the Chip8 ROM you w

5 Sep 27, 2022
An API wrapper library for opensea api.

Opensea API An API wrapper library for opensea api. Installation pip3 install opensea Usage Retrieving assets: from opensea import get_assets # This

Ankush Singh 38 Jul 17, 2022
A python telegram bot to fetch the details of an ipadress with help of ip-api

ipfetcher A python(Pyrogram) oriented telegram bot to fetch the details of an ipadress developed by @riz4d with the API of https://ip-api.com Deployme

Mohamed Rizad 5 Mar 12, 2022
Data and a Twitter bot for the EPA's DOCUMERICA (1972-1977) program.

documerica This repository holds JSON(L) artifacts and a few scripts related to managing archival data from the EPA's DOCUMERICA program. Contents: Ma

William Woodruff 2 Oct 27, 2021
BioThings API framework - Making high-performance API for biological annotation data

BioThings SDK Quick Summary BioThings SDK provides a Python-based toolkit to build high-performance data APIs (or web services) from a single data sou

BioThings 39 Jan 04, 2023
Uses discords api to see if a token has a valid payment method.

Discord Payment Checker Uses discords api to see if a token has a valid payment method. Report Bug · Request Feature Features Checks tokens Checks all

dropout 10 Dec 01, 2022
My personal template for a discord bot, including an asynchronous database and colored logging :)

My personal template for a discord bot, including an asynchronous database and colored logging :)

Timothy Pidashev 9 Dec 24, 2022
A custom discord bot maker in python

custom-discord-bot-maker Sorry for using Translator. Each description may be inaccurate. how to use 1. Make new application at https://discord.com/dev

2 Nov 29, 2021
A collection of tools for managing Jira issues for the RHODS project

RHODS-Jira-Tools A collection of tools for managing Jira issues for the RHODS project move_to_qa.py This script handles transitioning a given Jira iss

Alex Corvin 1 Sep 20, 2022
A Discord Bot coded using Python. Open to collaboration

DisPy-Bot A Discord Bot coded using Python. Open to collaboration La syntax pour intégrer le bot (imaginons la fonction lol_reponse dans le fichier au

BiMathAx 2 Mar 03, 2022
The wrapper you need for the osu!api v2

oppy (op.py) oppy is the wrapper for use on the osu! v2 API. Version 1.0.0 Installation To install please use pip to install oppy pip install op.py To

Wayde 2 May 01, 2022