This release is a pre-release and may not be stable for production use.
Python Myanmar Payments
Python SDK for Myanmar payment gateways: KBZ Pay, Wave Money, AYA Pay, Yoma MMQR and CyberSource. Typed requests and results, exact amounts, sync and async clients. Built for humans and AI agents.
Every Myanmar payment gateway signs its requests and callbacks its own way, reports its own status codes and has its own rules for amounts. Python Myanmar Payments handles all of that behind one typed API for Django, Flask, FastAPI and any other framework: build the payment data, start the payment, then verify the callback the gateway sends back.
Why Python Myanmar Payments
- Five gateways, one pattern. KBZ Pay (PWA, QR and in-app), Wave Money, AYA Pay, Yoma MMQR and CyberSource, each with its own class and the same three steps.
- One typed result per flow.
RedirectPayment,FormPayment,QrPaymentorAppPaymentholds exactly what the next step needs: a URL to redirect to, an auto-submitting form, a QR code or the signed order for the KBZ Pay mobile SDK. See Payment Flows. - Exact amounts, checked against each gateway's rules. An
Amountis kept as decimal text, takes anintof any size or aDecimal, and never passes through afloat. Decimals, currency and limits follow each gateway's official documentation and are checked before any request is sent. See Amounts. - Verified callbacks.
handle_callback()checks the gateway's signature without a network call, maps its status onto onePaymentStatusenum and gives you the acknowledgement the gateway expects. When a callback is late, ask KBZ Pay, AYA Pay or Yoma MMQR withstatus(). See Callbacks & Status. - Errors that say what went wrong. A missing setting, an invalid field, a gateway error and a bad signature each raise their own exception, with a message that names the setting, the field or the gateway's code.
- Sync and async. Every gateway that calls an API has a sync class for Django, Flask and other WSGI code and an async twin with the same methods for FastAPI, Starlette and async Django views. The only dependency is
httpx, and the package is fully typed and checked withmypy --strict. - Same behavior in every language. The PHP, Go, Node.js and Python SDKs pass one shared set of test vectors for signing and callback verification, and read the same environment variables, so one
.envfile and one Yoma MMQR token cache serve them all. - Nothing stored for you. The package keeps no tables and no webhook log. Handling Webhooks shows the recommended flow as code you copy: verify, store, acknowledge, then process each call once.
- Easy to test. Every gateway call goes through
httpx, so your tests fake the responses withhttpx.MockTransportor respx, replay signed callbacks and never touch the network. See Testing.
Installation
Requires Python 3.10+. The only dependency is
httpx, which sends the gateway requests.
pip install python-myanmar-payments
uv add python-myanmar-payments
poetry add python-myanmar-payments
Documentation
The full documentation lives at laranex.vercel.app/python-myanmar-payments:
- Introduction: why the package exists and what it covers
- Installation: requirements, install command and a quick start
- AI Agent Skill: the skill that teaches coding agents to use the package
- Configuration: credentials, environment variables, endpoints, UAT, HTTP client and token cache
- Amounts: exact amounts and each gateway's amount rules
- Payment Flows: redirect, form, QR and in-app payments
- Callbacks & Status: verified callbacks, payment statuses and status checks
- Handling Webhooks: the recommended verify, store, acknowledge, process-once flow
- Framework Integration: Django, Flask and FastAPI, sync and async
- Testing: faking gateway calls and replaying signed callbacks in your tests
- KBZ Pay: PWA redirect, QR and in-app payments, status checks and callbacks
- Wave Money: redirect payments with line items and verified callbacks
- AYA Pay: hosted checkout for AYA Pay, other wallets and cards, with status checks
- Yoma MMQR: QR images, QR renewal, status checks and verified callbacks
- CyberSource: Secure Acceptance card payments through a signed hosted checkout form
- Results: every property of the payment result types
- PaymentCallback & Status: callbacks, status results, acknowledgements and the PaymentStatus values
- Errors: validation, API, signature and configuration errors
License
MIT. See LICENSE.
Metadata
Release files for python-myanmar-payments 4.0.0a15
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 |
|---|---|---|---|---|
| python_myanmar_payments-4.0.0a15.tar.gz | 81.4 kB | With provenance | Details for python_myanmar_payments-4.0.0a15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_myanmar_payments-4.0.0a15-py3-none-any.whl | Python 3 | none | any | Details for python_myanmar_payments-4.0.0a15-py3-none-any.whl |
Total release size: 134.8 kB
Release files / python_myanmar_payments-4.0.0a15.tar.gz
| Download URL | python_myanmar_payments-4.0.0a15.tar.gz |
|---|---|
| Size | 81.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef0b7277d32f7fd66843fe5bf2176eb26ae6f5ec75a5836aafd8b81e60e65f58
|
|
BLAKE2b-256 checksum How to use checksums |
23a57b6f15a9493c75fb1015b3a2369cd233d46d79edf9a54782a52df8808911
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 16, 2026.
Transparency logRelease files / python_myanmar_payments-4.0.0a15-py3-none-any.whl
| Download URL | python_myanmar_payments-4.0.0a15-py3-none-any.whl |
|---|---|
| Size | 53.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f3eb5ff35e49adc6cdd5d95321881aaf4f47684d743a16743d2577abf72c394
|
|
BLAKE2b-256 checksum How to use checksums |
9e62fed21af3c6a06c646aeb3e0f243d6f96f6bc0ebd857b61d8ccf8793ef548
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 16, 2026.
Transparency logSecurity for python-myanmar-payments 4.0.0a15
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
Both files in this release have been uploaded with provenance metadata.
Attestation for python_myanmar_payments-4.0.0a15.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 16, 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.