Skip to content

UniPay UZ

PyPI version Python Versions License: MIT

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_mode toggle 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

pip install unipay-uz

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.