Async qpay payment API client
Project description
QPay API Integration client
QPay API integration made simpler and safer with data validation and auto token refresh.
Package document at: https://pypi.org/project/qpay-client/
QPay document at: https://developer.qpay.mn
Made with ❤️
Features
- The client manages and refreshes access token
- Async/Await
- Pydantic data validation
Installation
Using pip:
$ pip install qpay-client
Using poetry:
$ poetry install qpay-client
Using uv:
$ uv add qpay-client
Usage
Basic Example
from decimal import Decimal
import asyncio
from qpay_client.v2 import QPayClient
from qpay_client.v2.schemas import InvoiceCreateSimpleRequest
client = QPayClient()
response = asyncio.run(client.invoice_create(InvoiceCreateSimpleRequest(
invoice_code = "TEST_INVOICE",
sender_invoice_no = "1234567",
invoice_receiver_code = "terminal",
invoice_description = "test",
sender_branch_code = "SALBAR1",
amount = 1500,
callback_url = "https://api.your-domain.mn/payments?payment_id=1234567",
)))
print(response)
Methods
Invoice methods:
invoice_create
invoice_cancel
Payment methods:
payment_get
payment_check
payment_cancel
payment_refund
payment_list
Ebarimt methods:
ebarimt_create
ebarimt_get
License
MIT License
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 qpay_client-0.1.1.tar.gz.
File metadata
- Download URL: qpay_client-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db17b5a574c55a09a8a12a80d74dbf9857b71b8920dfdbfe14e5e4fc1a04da8c
|
|
| MD5 |
65aecac6626dd37bfe62d3b6fa224eb1
|
|
| BLAKE2b-256 |
42d98982bc7b5ad9743cb496f55cd626f5cb0ffe1d727735551f370dfe711ed4
|
File details
Details for the file qpay_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: qpay_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97bd20d19101f6ddf028dc766f0810061256be619c8f497de30350d8d26fef4d
|
|
| MD5 |
4a0b2272cf8af331541ca228c26a357a
|
|
| BLAKE2b-256 |
2da3f37fd0b9534d41ee3ed0064d3a7b7ca75f9c7113b92a9dffd7fecc5f94d4
|