Saweria QRIS code generator
Project description
Saweria QRIS code generator
[!CAUTION] Using any kind of automation programs on your account can result in your account getting permanently banned by Saweria. Use at your own risk.
Installation
$ pip install saweriaqris Install this package
Usage:
use this within your code example below
creating a code
from saweriaqris import create_payment_qr, paid_status
myqr = create_payment_qr("nindtz", 10000, "Budi", "budi@saweria.co", "Semangat!")
qrcode = myqr[0]
transaction_id = myqr[1]
# Just feed the qrcode to your favourite qr code generator
# transaction_id for matching purpose to your webhook calls
checking transaction status
from saweriaqris import create_payment_qr, paid_status
is_paid = paid_status(transaction_id)
# is_paid is bool value
[!Tip] Best Practice: You are supposed to use Saweria's Webhook Integration to get realtime payment notification to your API.
- Set your Saweria Integration to point to your API (found in Integrations -> Webhook)
- You issue a payment code to your client.
- After successful payment, Saweria will do POST request (Webhook) to your API. Below example POST from Saweria Webhook:
{
"version": "2022.01",
"created_at": "2021-01-01T12:00:00+00:00",
"id": "00000000-0000-0000-0000-000000000000",
"type": "donation",
"amount_raw": 69420,
"cut": 3471,
"donator_name": "Someguy",
"donator_email": "someguy@example.com",
"donator_is_user": false,
"message": "THIS IS A FAKE MESSAGE! HAVE A GOOD ONE",
"etc": {
"amount_to_display": 69420
}
}
- Parse the JSON from the POST and challenge the id given from Saweria Webhook with the paid_status function.
- Only after it returns True, then you can update accordingly.
Example use case:
Discord bot Donate QRIS
Thank you
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
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 saweriaqris-0.1.9.tar.gz.
File metadata
- Download URL: saweriaqris-0.1.9.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5df9b16c89e85983d9d593f37a741cbb27042189198b4053e7870e80a90c59a
|
|
| MD5 |
a788ae887f9347702a23985de800e892
|
|
| BLAKE2b-256 |
795bcd0010729e11e445e043821cf91ce779e84f51fd96c9d83d2b57e7c0c333
|
File details
Details for the file saweriaqris-0.1.9-py3-none-any.whl.
File metadata
- Download URL: saweriaqris-0.1.9-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b6587a3e3232b6085d9513acd5d6fdb24b12fe410a9f22927029c101c64e734
|
|
| MD5 |
1398c4ccab000a264a44bb12d27974f4
|
|
| BLAKE2b-256 |
4f9c5a05c0cf02200f53dcb0b3235c3208abf6dbb71b704ad34b1012d36f0649
|