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 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, QrPayment or AppPayment holds 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 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 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 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

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

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

Built distribution (wheel)

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

Total release size: 135.1 kB

Release files / python_myanmar_payments-4.0.0a14.tar.gz

Download URL python_myanmar_payments-4.0.0a14.tar.gz
Size 81.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9f8c70bfdf458448742dedbe6036540c9d67199600f7b9b91ae21ad5273ad769
BLAKE2b-256 checksum
How to use checksums
525d9119931cc34b45c604925193fb8cc3d57fa7659ebeca3cba30e1df83344c
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 log

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

Download URL python_myanmar_payments-4.0.0a14-py3-none-any.whl
Size 53.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6611824f560ec43c40f7868af92ac823411b84b4b06c70f66986a84dbd290615
BLAKE2b-256 checksum
How to use checksums
1141eaead830b152531fb54a48514859df92b54f72eda2dd7654e800e1a132fc
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 log

Security for python-myanmar-payments 4.0.0a14

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