Manat for Python
One API for Azerbaijani online payment providers: Kapital Bank, Azericard, Payriff, Epoint, GoldenPay and Yığım. Python 3.10+, no dependencies (standard library only, RSA included).
pip install keytd-manat
import os
from manat import Manat, azn
from manat.providers import KapitalBank
pay = Manat(KapitalBank(username=os.environ["KB_USER"], password=os.environ["KB_PASSWORD"]))
result = pay.create_payment("A-1001", azn("25.50"), "https://shop.az/payment/return") # 2550 qəpik
if result.next.type == "redirect":
return redirect(result.next.url)
Store result.payment_id with the order. It is what get_status, refund, capture and cancel take.
Providers
from manat.providers import Azericard, Epoint, GoldenPay, KapitalBank, Payriff, Yigim
KapitalBank(username, password, environment="test")
Azericard(terminal, private_key_pem, "My Shop", "https://shop.az", gateway_public_key=gateway_pem, environment="test")
Payriff(secret_key)
Epoint(public_key, private_key)
GoldenPay(auth_key, merchant_name, environment="test")
Yigim(merchant, api_key, biller, environment="test")
| Provider | create_payment | verify_callback | get_status | refund | capture | cancel |
|---|---|---|---|---|---|---|
| Kapital Bank | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Azericard | ✓ (form POST) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Payriff | ✓ | ✓ | ✓ | ✓ | ✓ | — |
| Epoint | ✓ | ✓ | ✓ | ✓ | — | — |
| GoldenPay | ✓ | ✓ | ✓ | ✓ | — | — |
| Yığım | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Every provider takes base_url (or gateway_url), transport and timeout keyword arguments.
Callbacks
Pass what your handler received, with the raw body. Unsigned redirects and webhooks are never trusted: the adapter
re-reads the payment from the provider's API. Epoint's browser redirect is unsigned and rejected with
invalid_signature; call get_status there.
event = pay.verify_callback(request.method, query=request.args, body=request.get_data(as_text=True))
if event.status == "paid":
... # fulfil event.payment_id; for Azericard store event.provider_ref for refunds
Refunds, capture, cancel
pay.refund(payment_id) # full refund
pay.refund(payment_id, amount=azn("10.00")) # partial
pay.capture(payment_id) # after intent="authorize"
pay.refund(payment_id, provider_ref=event.provider_ref) # Azericard
Errors
Everything raises manat.ManatError. error.code is one of invalid_request, invalid_signature, provider_error,
network_error, unsupported_operation; provider_code, provider_message and raw hold what the provider said.
Tests
cd python && PYTHONPATH=src:tests python3 -m unittest discover -s tests
Metadata
Release files for keytd-manat 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| keytd_manat-0.2.2.tar.gz | 28.1 kB | With provenance | Details for keytd_manat-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| keytd_manat-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for keytd_manat-0.2.2-py3-none-any.whl |
Total release size: 63.0 kB
Release files / keytd_manat-0.2.2.tar.gz
| Download URL | keytd_manat-0.2.2.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fcf18ed2a852c2cb8fb45288d6f1a1b2f366d228253108de79bc75054f95ce22
|
|
BLAKE2b-256 checksum How to use checksums |
bbb012681adde02fcb352d9bb6d1465a8a4de9eeb283d1a5d00d22fb4a06c3c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / keytd_manat-0.2.2-py3-none-any.whl
| Download URL | keytd_manat-0.2.2-py3-none-any.whl |
|---|---|
| Size | 34.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ebb6599e96a6b8190ce4e20c02396dffa1531f9624263a5141f47a8e67de8f3
|
|
BLAKE2b-256 checksum How to use checksums |
734c79bfb3cbdbba3f0c76fb175b4c1f7e36e54df8f4765ef4847c2dde39480c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logSecurity for keytd-manat 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for keytd_manat-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.