Skip to main content

A simple API for creating a payment link

Project description

gQiwiAPI by Gnifajio

A simple API for creating a payment link

Installation

git clone https://github.com/gnifajio/gQiwiAPI.git
pip install -r requirements.txt
cd gQiwiAPI
python3 setup.py install

or

pip install gQiwiAPI

Usage

# Initialization
from gQiwiAPI import Qiwi

SECRET_KEY = 'Your secret key for managing payments'
qiwi = Qiwi(SECRET_KEY)
# Creating a bill
my_first_bill = qiwi.new(10, '15m')
# Getting a payment link
payUrl = my_first_bill.payUrl
# Checking the payment status
bill_state = qiwi.status(my_first_bill)
# Checking the payment status by id
state_by_id = qiwi.check_id(my_first_bill.bill_id)

You can get SECRET_KEY on official website.

Syntax
class Qiwi:
    def new(self, amount, comment=None, exp_dt='15m'): ...

amount - the amount of the payment in rubles. comment - comment expDT - the validity time of the link.

About amount I will only say that you can pass str, int and float there and everything will work fine.

The default comment is set to None, and is not used. You can add a comment to the payment like this:

qiwi.create_bill(self, 10, comment='Test', expDT='30m')

expDT is set in the format nd:nh:nm:ns, where

n - int d - days h - hours m - minutes s - seconds

You can pass both integer and fractional numbers to n, the order is also not important. For example:

from gQiwiAPI import Qiwi

qiwi = Qiwi('SECRET_KEY')
amount = 10
qiwi.new(amount, exp_dt='0.3d:77m:0.5h')

Links

QIWI: API of P2P accounts. Invoicing.

QIWI: Authentication data.

TODO

  • Expand the API
    • Add customer support
    • Add customFields support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gQiwiAPI-1.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

gQiwiAPI-1.4-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file gQiwiAPI-1.4.tar.gz.

File metadata

  • Download URL: gQiwiAPI-1.4.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for gQiwiAPI-1.4.tar.gz
Algorithm Hash digest
SHA256 3a59e5879d6581a3d10aebafb36b8fa992690823844beb1e0d7409435ff895ca
MD5 f7cddb34d91fa9f5cbf4cbb370571f47
BLAKE2b-256 c39430c26aa0a47e12c0c7213319a7564cc04577edc1ba1cc2595c58ca0939a5

See more details on using hashes here.

File details

Details for the file gQiwiAPI-1.4-py3-none-any.whl.

File metadata

  • Download URL: gQiwiAPI-1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for gQiwiAPI-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5b833087dba3eff524dd804e2ff6f31922b946c5a5aec33922f63b93f8b71ada
MD5 80c6d3ab0564a98af7b3cb7bbe68cee4
BLAKE2b-256 a2e9c56f4f6e5ea19f73c5f2b10cf78bf3d2a9f4a9e3cf8b6322e8a7c76614da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page