UniPay UZ¶
One unified Python API for Uzbekistan's payment gateways β Payme, Click, Uzum, Paynet & Octo. First-class integrations for Django, FastAPI, and Flask.
UniPay UZ handles the heavy lifting of API communication, webhook verification, and transaction state management behind a single, predictable interface, so you can focus on your product instead of five different provider SDKs.
Features¶
- π Unified interface β one consistent API across all providers; stop writing redundant wrappers.
- πΊπΏ Five gateways β Payme, Click, Uzum, Paynet, and Octo.
- π§° Framework integrations β out-of-the-box Django and FastAPI support (Flask planned).
- π Webhook base classes β handle async payment callbacks by overriding a couple of methods.
- π Factory pattern β instantiate any gateway by name with
create_gateway(...). - π§ͺ Test mode β explicit
is_test_modetoggle on every gateway. - π³ Card & receipt operations β Payme cards/receipts and Click card-token flows.
- π§± Extensible β add a new gateway by subclassing
BasePaymentGateway.
Documentation¶
- Installation β pip install + framework extras.
- Quickstart β first checkout link in minutes.
- Gateways β per-provider reference (Payme, Click, Uzum, Paynet, Octo).
- Django & FastAPI β webhook integration guides.
- Exceptions β the error hierarchy.
Install¶
At a glance¶
from unipay_uz import PaymeGateway
payme = PaymeGateway(
payme_id="MERCHANT_ID_HERE",
payme_key="SECRET_KEY_HERE",
is_test_mode=True,
)
checkout_url = payme.create_payment(
id="ORD-998877",
amount=250000, # UZS
return_url="https://your-platform.uz/checkout/success",
account_field_name="order_id",
)
Or instantiate by name with the factory:
from unipay_uz import create_gateway
click = create_gateway("click", service_id="...", merchant_id="...", secret_key="...")
Continue to the Quickstart.
If UniPay UZ saves you time, please β star it on GitHub β it helps other developers in Uzbekistan find it.