cardlinky
Usage
Firstly, you need to create an account and а shop in https://cardlink.link/. After confirmation, you will be able to get a token and a shop ID to work with the API.
Creating a bill and getting a payment link:
from cardlinky import Cardlinky
def print_bill_url(token: str, shop_id: str, amount: float) -> None:
# Creating an instance of the class
cardlinky = Cardlinky(token)
# Create a bill and save it
bill = cardlinky.create_bill(amount=amount, shop_id=shop_id)
# Getting a payment link and printing
print(bill.link_url)
print_bill_url("YOUR-TOKEN", "YOUR-SHOP-ID", 100.0)
# https://cardlink.link/link/GkLWvKx3
Getting a bill status:
from cardlinky import Cardlinky
def print_bill_status(token: str, bill_id: str) -> None:
# Creating an instance of the class
cardlinky = Cardlinky(token)
# Create a bill and save it
bill_status = cardlinky.get_bill_status(bill_id=bill_id)
# Getting a status and printing
print(bill_status.status)
print_bill_status("YOUR-TOKEN", "BILL-ID")
# Status.NEW
Installation
pip install cardlinky
Dependencies:
| Package | Version |
|---|---|
requests |
>=2.28.2 |
Metadata
Release files for cardlinky 1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cardlinky-1.7.tar.gz | 10.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cardlinky-1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / cardlinky-1.7.tar.gz
| Download URL | cardlinky-1.7.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
985f205f7d379071c8f6f331bc444001b21200452d691d381ee449bc68b4b633
|
|
BLAKE2b-256 checksum How to use checksums |
694fd86b9057b7924abfb26c959d076368de99c945be4111c71acae869a798d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.11.3 Windows/10
|
Release files / cardlinky-1.7-py3-none-any.whl
| Download URL | cardlinky-1.7-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4785560149e7570f15473b85cc3c90d956679ea1f9c20561fc7be0660966b85
|
|
BLAKE2b-256 checksum How to use checksums |
4f9bad17f4a33d4402ee384f903ef55ed652873f4b597ff7657c78e0befdefb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.11.3 Windows/10
|
Security for cardlinky 1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.