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)

You might also like...
:snake: A simple library to fetch data from the iTunes Store API made for Python = 3.5

itunespy itunespy is a simple library to fetch data from the iTunes Store API made for Python 3.5 and beyond. Important: Since version 1.6 itunespy no

Simple library for logging to Loggly

#Hoover A python wrapper used to hit the Loggly. API For more information on Hoover see http://wiki.loggly.com/hooverguide ##Install With this git rep

A simple Python library to integrate with the Heron Data API
A simple Python library to integrate with the Heron Data API

Heron Python This library provides easy access to the Heron Data API from applications written in Python. Documentation No language-specific docs are

This repo contains a simple library for work with Eitaa messenger's api

Eitaa PyKit This repo contains a simple library for work with Eitaa messenger's api PyPI Page : https://pypi.org/project/Eitaa-PyKit Install via pip p

A simple use library for bot discord.py developers

Discord Bot Template It's a simple use library for bot discord.py developers. Ob

TM1py is a Python package that wraps the TM1 REST API in a simple to use library.
TM1py is a Python package that wraps the TM1 REST API in a simple to use library.

By wrapping the IBM Planning Analytics (TM1) REST API in a concise Python framework, TM1py facilitates Python developments for TM1. Interacting with T

iCloudPy is a simple iCloud webservices wrapper library written in Python

iCloudPy 🤟 Please star this repository if you end up using the library. It will help me continue supporting this product. 🙏 iCloudPy is a simple iCl

Simple-nft-tutorial - A simple tutorial on making nft/memecoins on algorand
Simple-nft-tutorial - A simple tutorial on making nft/memecoins on algorand

nft/memecoin Tutorial on Algorand Let's make a simple NFT/memecoin on the Algora

Beyonic API Python official client library simplified examples using Flask, Django and Fast API.
Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Owner
Vlad Baccara
working hard
Vlad Baccara
A python package to easy the integration with Direct Online Pay (Mpesa, TigoPesa, AirtelMoney, Card Payments)

A python package to easy the integration with Direct Online Pay (DPO) which easily allow you easily integrate with payment options once without having to deal with each of them individually;

Jordan Kalebu 2 Nov 25, 2021
A customizable, multilanguage Telegram shop bot with Telegram Payments support

Greed A customizable, multilanguage Telegram shop bot with Telegram Payments support! Demo Send a message to @greedtestbot on Telegram to view a demo

Stefano Pigozzi 328 Dec 29, 2022
Set of classes and tools to communicate with a Noso wallet using NosoP

NosoPy Set of classes and tools to communicate with a Noso wallet using NosoP(Noso Protocol). The data that can be retrieved consist of: Node informat

Noso Project 1 Jan 10, 2022
Ethereum transactions and wallet information for people you follow on Twitter.

ethFollowing Ethereum transactions and wallet information for people you follow on Twitter. Set up Setup python environment (requires python 3.8): vir

Brian Donohue 2 Dec 28, 2021
Trust-minimized Bitcoin wallet

coldcore Trust-minimized, airgapped Bitcoin management This is experimental software. Wait for a formal release before use with real funds. A trust-mi

James O'Beirne 121 Jan 1, 2023
Announces when a web3 wallet receives a token

excitare_cito v2.0 by Bogdan Vaida ([email protected]) Announces when a web3 wallet receives a token. You can create an account on Pushsafer.com

null 1 Nov 30, 2021
DeFi wallet on Chia Network.

DeFi wallet on Chia Network.

GobyWallet 21 Aug 12, 2022
CryptoApp - Python code to pull wallet balances from a variety of different chains through nothing other than your public key.

CryptoApp - Python code to pull wallet balances from a variety of different chains through nothing other than your public key.

Zach Frank 4 Dec 13, 2022
Aio-binance-library - Async library for connecting to the Binance API on Python

aio-binance-library Async library for connecting to the Binance API on Python Th

GRinvest 10 Nov 21, 2022
A simple library for interacting with Amazon S3.

BucketStore is a very simple Amazon S3 client, written in Python. It aims to be much more straight-forward to use than boto3, and specializes only in

Jacobi Petrucciani 219 Oct 3, 2022