Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Python Myanmar Payments

PyPI Tests Python License

Python SDK for Myanmar payment gateways: KBZ Pay, Wave Pay, Wave Pay Mini App, 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

  • Six gateways, one pattern. KBZ Pay (PWA, QR and in-app), Wave Pay, Wave Pay Mini App, AYA Pay, Yoma MMQR and CyberSource, each with its own class and the same three steps.
  • One typed result per flow. RedirectPayment, FormPayment, QrPayment, AppPayment or MiniAppPayment holds exactly what the next step needs: a URL to redirect to, an auto-submitting form, a QR code, the signed order for the KBZ Pay mobile SDK or the signed payment for Wave's mini app SDK. See Payment Flows.
  • Exact amounts, checked against each gateway's rules. An Amount is kept as decimal text, takes an int of any size or a Decimal, and never passes through a float. 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 one PaymentStatus enum and gives you the acknowledgement the gateway expects. When a callback is late, ask KBZ Pay, AYA Pay or Yoma MMQR with status(). 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 with mypy --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 .env file and one 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 with httpx.MockTransport or 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

FastAPI adapter (optional)

The SDK works with FastAPI as is: use the async clients in your endpoints. The separate fastapi-myanmar-payments package adds optional conveniences on top of it: a lifespan that owns one AsyncMyanmarPayments, gateway dependencies, raw callback requests and acknowledgement responses. It is versioned and released independently (fastapi/v* tags).

pip install fastapi-myanmar-payments

Django adapter (optional)

The SDK works with Django as is: sync clients in sync views, async clients in async views. The separate django-myanmar-payments package adds optional conveniences on top of it: gateways from a MYANMAR_PAYMENTS setting with manage.py check validation, sync and async access, Yoma MMQR token caches on Django's cache, raw callback requests and acknowledgement responses. It is versioned and released independently (django/v* tags).

pip install django-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 Pay: redirect payments with line items and verified callbacks
  • Wave Pay Mini App: access tokens, signed payment payloads for Wave's JavaScript SDK 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.0a18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-myanmar-payments 4.0.0a18
File Size Uploaded Provenance Actions
python_myanmar_payments-4.0.0a18.tar.gz 112.2 kB With provenance Details for python_myanmar_payments-4.0.0a18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-myanmar-payments 4.0.0a18
File Interpreter ABI Platform Actions
python_myanmar_payments-4.0.0a18-py3-none-any.whl Python 3 none any Details for python_myanmar_payments-4.0.0a18-py3-none-any.whl

Total release size: 175.5 kB

Release files / python_myanmar_payments-4.0.0a18.tar.gz

Download URL python_myanmar_payments-4.0.0a18.tar.gz
Size 112.2 kB
Tags Source
SHA-256 checksum
How to use checksums
25232eb9d2cbb337144d4594b6bbb04146e0d19db8961d8f63b5b393374769c4
BLAKE2b-256 checksum
How to use checksums
138e3e368582b47da8c080b9a1871a53bf5fec597b65925a1a63ba625b60582b
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 21, 2026.

Transparency log

Release files / python_myanmar_payments-4.0.0a18-py3-none-any.whl

Download URL python_myanmar_payments-4.0.0a18-py3-none-any.whl
Size 63.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20811ea55c37a0309c2d247f3fc68e1cf7b5d74a126f61e6f7d0f31be9de9fa4
BLAKE2b-256 checksum
How to use checksums
f2a513a942c1dcd7fd394d98954fc0d7265c85e9837d429ab618e61eac6b3d17
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 21, 2026.

Transparency log

Security for python-myanmar-payments 4.0.0a18

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.

Select from 2 files

Attestation for python_myanmar_payments-4.0.0a18.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 21, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page