saweriaqris


Namesaweriaqris JSON
Version 0.1.7 PyPI version JSON
download
home_pageNone
SummarySaweria QRIS code generator
upload_time2025-02-03 14:13:43
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords qris saweria payments
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Saweria QRIS code generator

[![PyPI - Version](https://img.shields.io/pypi/v/saweriaqris)](http://pypi.org/project/saweriaqris/)
[![PyPI Downloads](https://static.pepy.tech/badge/saweriaqris)](https://pepy.tech/projects/saweriaqris)
[![Discord](https://img.shields.io/discord/878859506405228574)](https://discord.gg/GzjyMZnpb7)
[![GitHub License](https://img.shields.io/github/license/nindtz/saweriaqris)](https://mit-license.org/)

> [!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 <br>

## Usage:

use this within your code
example below

creating a code

```python
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

```python
from saweriaqris import create_payment_qr, paid_status

is_paid = paid_status(transaction_id)

# is_paid is bool value
```

<br>

> [!Tip]
> Best Practice: You are supposed to use Saweria's Webhook Integration to get realtime payment notification to your API.

1. Set your Saweria Integration to point to your API (found in Integrations -> Webhook)
2. You issue a payment code to your client.
3. After successful payment, Saweria will do POST request (Webhook) to your API.
   Below example POST from Saweria Webhook:

```json
{
	"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
	}
}
```

4. Parse the JSON from the POST and challenge the id given from Saweria Webhook with the paid_status function.
5. Only after it returns True, then you can update accordingly.

## Example use case:

Discord bot Donate QRIS<br>
<img width="401" alt="image" src="https://github.com/user-attachments/assets/f607cc45-5836-4c19-abe2-b2b1f8393d1b" />

#### Thank you

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "saweriaqris",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "qris, saweria, payments",
    "author": null,
    "author_email": "nindtz <nindita@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/7c/8a/0b647ced1c6cb096190d00d1fc8a3533183cef0f81e76dea6b3e0f0a5610/saweriaqris-0.1.7.tar.gz",
    "platform": null,
    "description": "## Saweria QRIS code generator\n\n[![PyPI - Version](https://img.shields.io/pypi/v/saweriaqris)](http://pypi.org/project/saweriaqris/)\n[![PyPI Downloads](https://static.pepy.tech/badge/saweriaqris)](https://pepy.tech/projects/saweriaqris)\n[![Discord](https://img.shields.io/discord/878859506405228574)](https://discord.gg/GzjyMZnpb7)\n[![GitHub License](https://img.shields.io/github/license/nindtz/saweriaqris)](https://mit-license.org/)\n\n> [!CAUTION]\n> Using any kind of automation programs on your account can result in your account getting permanently banned by Saweria. Use at your own risk.\n\n### Installation\n\n`$ pip install saweriaqris` Install this package <br>\n\n## Usage:\n\nuse this within your code\nexample below\n\ncreating a code\n\n```python\nfrom saweriaqris import create_payment_qr, paid_status\n\nmyqr = create_payment_qr(\"nindtz\", 10000, \"Budi\", \"budi@saweria.co\", \"Semangat!\")\nqrcode = myqr[0]\ntransaction_id = myqr[1]\n\n# Just feed the qrcode to your favourite qr code generator\n# transaction_id for matching purpose to your webhook calls\n```\n\nchecking transaction status\n\n```python\nfrom saweriaqris import create_payment_qr, paid_status\n\nis_paid = paid_status(transaction_id)\n\n# is_paid is bool value\n```\n\n<br>\n\n> [!Tip]\n> Best Practice: You are supposed to use Saweria's Webhook Integration to get realtime payment notification to your API.\n\n1. Set your Saweria Integration to point to your API (found in Integrations -> Webhook)\n2. You issue a payment code to your client.\n3. After successful payment, Saweria will do POST request (Webhook) to your API.\n   Below example POST from Saweria Webhook:\n\n```json\n{\n\t\"version\": \"2022.01\",\n\t\"created_at\": \"2021-01-01T12:00:00+00:00\",\n\t\"id\": \"00000000-0000-0000-0000-000000000000\",\n\t\"type\": \"donation\",\n\t\"amount_raw\": 69420,\n\t\"cut\": 3471,\n\t\"donator_name\": \"Someguy\",\n\t\"donator_email\": \"someguy@example.com\",\n\t\"donator_is_user\": false,\n\t\"message\": \"THIS IS A FAKE MESSAGE! HAVE A GOOD ONE\",\n\t\"etc\": {\n\t\t\"amount_to_display\": 69420\n\t}\n}\n```\n\n4. Parse the JSON from the POST and challenge the id given from Saweria Webhook with the paid_status function.\n5. Only after it returns True, then you can update accordingly.\n\n## Example use case:\n\nDiscord bot Donate QRIS<br>\n<img width=\"401\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f607cc45-5836-4c19-abe2-b2b1f8393d1b\" />\n\n#### Thank you\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Saweria QRIS code generator",
    "version": "0.1.7",
    "project_urls": {
        "Funding": "https://ko-fi.com/nindtz",
        "Source Code": "http://github.com/nindtz/saweriaqris"
    },
    "split_keywords": [
        "qris",
        " saweria",
        " payments"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4381d3c4048e43cc0677579ed86915d6c18e3c0020790653c2e39f17e277569d",
                "md5": "d6d5f940aed1b2ad6af00e5ba48a73e9",
                "sha256": "15b2b04c173ffdd32c0ba818a32f9a4a2b64e77591d3858aa2a558ba8fbbfbb9"
            },
            "downloads": -1,
            "filename": "saweriaqris-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d6d5f940aed1b2ad6af00e5ba48a73e9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4818,
            "upload_time": "2025-02-03T14:13:42",
            "upload_time_iso_8601": "2025-02-03T14:13:42.611764Z",
            "url": "https://files.pythonhosted.org/packages/43/81/d3c4048e43cc0677579ed86915d6c18e3c0020790653c2e39f17e277569d/saweriaqris-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7c8a0b647ced1c6cb096190d00d1fc8a3533183cef0f81e76dea6b3e0f0a5610",
                "md5": "b07a304c3c54873eaf8dfcf91f21ffba",
                "sha256": "79a31fea672600f8aae742e2626de563455da7505dc6aef06ee17e035484711d"
            },
            "downloads": -1,
            "filename": "saweriaqris-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "b07a304c3c54873eaf8dfcf91f21ffba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4560,
            "upload_time": "2025-02-03T14:13:43",
            "upload_time_iso_8601": "2025-02-03T14:13:43.737625Z",
            "url": "https://files.pythonhosted.org/packages/7c/8a/0b647ced1c6cb096190d00d1fc8a3533183cef0f81e76dea6b3e0f0a5610/saweriaqris-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-03 14:13:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nindtz",
    "github_project": "saweriaqris",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "saweriaqris"
}
        
Elapsed time: 0.76672s