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 an bill
my_first_bill = qiwi.create_bill(10, '15m')
# Getting a payment link
payUrl = my_first_bill.payUrl
# Checking the payment status
bill_state = qiwi.bill_status(my_first_bill)

You can get SECRET_KEY on official website.

Syntax
qiwi.create_bill(amount, expDT='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:

amount = 10
qiwi.create_bill(amount, expDT='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.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

gQiwiAPI-1.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gQiwiAPI-1.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for gQiwiAPI-1.3.tar.gz
Algorithm Hash digest
SHA256 b4962e5c334795290f5d9979431c8913c3ce0b93e654476a5f5b3c3e6f337986
MD5 1925648d42d9df19f381caa078ec76af
BLAKE2b-256 6c887b941b4ee9df7630ff6ad9ac977755c97b00cb963166ef5de1ac10eea728

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gQiwiAPI-1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for gQiwiAPI-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 92fbb1cf452309b027adff4c8d4ec5bc867698387be32e2270f039bfe2e55bb1
MD5 c272436e2127428134dfe6c098ea1865
BLAKE2b-256 cd60992174b92abbccd81d64c6073b064533899078433ada533a0479155b7d92

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