Python library for Cashify QRIS API integration.
Project description
py-cashify
Python library for interacting with Cashify QRIS API.
Features
- Create transaction
- Check transaction status
- Auto check transaction status using croniter
- Generate QRIS QR Code
Installation
Install from PyPI (after publish):
pip install py-cashify
Install for development:
pip install -r requirements.txt
Usage
Create Transaction
from py_cashify import CashifyAPI
api = CashifyAPI(license_key="YOUR_LICENSE_KEY")
response = api.create_transaction(
qris_id="qris123",
amount=10000,
use_unique_code=True,
package_ids=["package1"],
expired_in_minutes=10
)
print(response)
Check Transaction
status = api.check_transaction(transaction_id="TRANSACTION_ID")
print(status)
Auto Check Transaction (croniter)
from py_cashify import CashifyCronChecker
print("Checked status:", result)
cron_checker = CashifyCronChecker(
license_key="YOUR_LICENSE_KEY",
transaction_id="TRANSACTION_ID",
cron_expr="*/1 * * * *" # every minute
)
cron_checker.auto_check(callback=callback, max_checks=5)
Generate QRIS QR Code
from py_cashify import QrisMaker
qr_bytes = QrisMaker.make_qr(qr_string="YOUR_QR_STRING", size="500x500", style=2, color="ea580c")
if qr_bytes:
with open("qris.png", "wb") as f:
f.write(qr_bytes)
print("QR code saved as qris.png")
else:
print("Failed to generate QR code")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py_cashify-0.1.0.tar.gz
(40.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_cashify-0.1.0.tar.gz.
File metadata
- Download URL: py_cashify-0.1.0.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3d97cbff7f88305c2d24212a3219d7c145be2815af69d985378237f3df2b5ef
|
|
| MD5 |
99fdbf5a4d1649a48861dcdb5924d3bf
|
|
| BLAKE2b-256 |
644135477d6afab84599c155122b148c2772ed9cd3e9042fbcb96eec7f305319
|
File details
Details for the file py_cashify-0.1.0-py3-none-any.whl.
File metadata
- Download URL: py_cashify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bdedd83f513a939fa98a73d866d13c7db05ea4483f7e37f9c50c09c733cedfd
|
|
| MD5 |
67b3ae9cdde618db9695c3b80e389a60
|
|
| BLAKE2b-256 |
bcf52431aa74f5267762ef225d74d65217bdf60ec60c94fa26369535496c6deb
|