mongolian-payment-hipay
HiPay payment gateway SDK for Python.
Installation
pip install mongolian-payment-hipay
Quick Start
from mongolian_payment_hipay import HiPayClient, HiPayConfig
client = HiPayClient(HiPayConfig(
endpoint="https://merchant.hipay.mn/api",
token="YOUR_BEARER_TOKEN",
entity_id="YOUR_ENTITY_ID",
))
# Create a checkout
checkout = client.checkout(50000)
print(checkout.qr_data)
print(checkout.checkout_id)
# Check checkout status
status = client.get_checkout(checkout.checkout_id)
print(status.status)
# Get payment details
payment = client.get_payment("payment-id")
print(payment.payment_brand)
# Submit a payment correction (refund)
correction = client.payment_correction("payment-id")
print(correction.correction_payment_id)
# Get a statement
statement = client.statement("2026-01-15")
for item in statement.data.list:
print(item.payment_id, item.amount)
Async Usage
from mongolian_payment_hipay import AsyncHiPayClient, HiPayConfig
async with AsyncHiPayClient(HiPayConfig(
endpoint="https://merchant.hipay.mn/api",
token="YOUR_BEARER_TOKEN",
entity_id="YOUR_ENTITY_ID",
)) as client:
checkout = await client.checkout(50000)
print(checkout.qr_data)
Environment Variables
You can load configuration from environment variables:
from mongolian_payment_hipay import HiPayClient, load_config_from_env
# Reads HIPAY_ENDPOINT, HIPAY_TOKEN, HIPAY_ENTITY_ID
config = load_config_from_env()
client = HiPayClient(config)
Checkout with Items
from mongolian_payment_hipay import CheckOutItem, CheckoutOptions
checkout = client.checkout(
50000,
CheckoutOptions(
ip_address="192.168.1.1",
items=[
CheckOutItem(
itemno="SKU001",
names="Product Name",
price=25000,
quantity=2,
brand="Brand",
measure="pcs",
vat=2500,
citytax=100,
)
],
),
)
Error Handling
from mongolian_payment_hipay import HiPayError
try:
checkout = client.checkout(50000)
except HiPayError as e:
print(e) # Error message
print(e.code) # Response code
print(e.details) # Validation error details
print(e.response) # Raw response body
License
MIT
Metadata
Release files for mongolian-payment-hipay 1.0.0
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 |
|---|---|---|---|---|
| mongolian_payment_hipay-1.0.0.tar.gz | 9.8 kB | Without provenance | Details for mongolian_payment_hipay-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mongolian_payment_hipay-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mongolian_payment_hipay-1.0.0-py3-none-any.whl |
Total release size: 19.2 kB
Release files / mongolian_payment_hipay-1.0.0.tar.gz
| Download URL | mongolian_payment_hipay-1.0.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
135fcb92b761efe00ba4232006094ec8cf85eb4b8450f773400049f86df3c915
|
|
BLAKE2b-256 checksum How to use checksums |
24b58cff871ddd7701b5ca87d52733ff292fa5419928fbbfa1b542c3ca4009c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / mongolian_payment_hipay-1.0.0-py3-none-any.whl
| Download URL | mongolian_payment_hipay-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6806a5dc2f1f5a787b0848872dbcacf1d46aec9b17ffb04e3267f3b8d6188a47
|
|
BLAKE2b-256 checksum How to use checksums |
3828b0cf75ff455deab4768fc68b2ffe105bf3f665a372b4d7670d812b98003a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Security for mongolian-payment-hipay 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.