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.0a21

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.0a21
File Size Uploaded Provenance Actions
python_myanmar_payments-4.0.0a21.tar.gz 118.4 kB With provenance Details for python_myanmar_payments-4.0.0a21.tar.gz

Built distribution (wheel)

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

Total release size: 182.6 kB

Release files / python_myanmar_payments-4.0.0a21.tar.gz

Download URL python_myanmar_payments-4.0.0a21.tar.gz
Size 118.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c49208a284c3d40ce6bfe95b448fbe2edf5739b849cec85e9dc1d45b1a4146ab
BLAKE2b-256 checksum
How to use checksums
5bd50bac7961ee193efe3a455536d8ee6dd60bed04f085ef6642ef57364b2f8c
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 Nov 11, 2026.

Transparency log

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

Download URL python_myanmar_payments-4.0.0a21-py3-none-any.whl
Size 64.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af8065b6df87b42e6234591cc012dc6d438962bbc6e18c427812a9ecb9000203
BLAKE2b-256 checksum
How to use checksums
3d67571d759984eee1cef2f394f7ab9ad784b343d02196162da6ecb2d4e1975d
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 Nov 11, 2026.

Transparency log

Security for python-myanmar-payments 4.0.0a21

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.0a21.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 Nov 11, 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