mongolian-payment-golomt
Golomt Bank payment gateway SDK for Python.
Provides both synchronous and asynchronous clients for the Golomt Bank ecommerce payment API, with automatic HMAC-SHA256 checksum generation and bearer token authentication.
Installation
pip install mongolian-payment-golomt
Quick Start
Synchronous
from mongolian_payment_golomt import GolomtClient, GolomtConfig, CreateInvoiceInput
client = GolomtClient(GolomtConfig(
endpoint="https://ecommerce.golomtbank.com",
secret="your-hmac-secret",
bearer_token="your-bearer-token",
))
# Create an invoice
invoice = client.create_invoice(CreateInvoiceInput(
amount=1000,
transaction_id="txn-001",
return_type="POST",
callback="https://yoursite.com/callback",
get_token=False,
social_deeplink=False,
))
# Get payment URL
url = client.get_payment_url(invoice.invoice)
print(url)
# Check transaction status
status = client.inquiry("txn-001")
print(status.status)
client.close()
Asynchronous
import asyncio
from mongolian_payment_golomt import AsyncGolomtClient, GolomtConfig, CreateInvoiceInput
async def main():
async with AsyncGolomtClient(GolomtConfig(
endpoint="https://ecommerce.golomtbank.com",
secret="your-hmac-secret",
bearer_token="your-bearer-token",
)) as client:
invoice = await client.create_invoice(CreateInvoiceInput(
amount=1000,
transaction_id="txn-001",
return_type="POST",
callback="https://yoursite.com/callback",
get_token=False,
social_deeplink=False,
))
print(invoice.invoice)
asyncio.run(main())
Load Config from Environment
from mongolian_payment_golomt import GolomtClient, load_config_from_env
config = load_config_from_env()
client = GolomtClient(config)
Required environment variables:
| Variable | Description |
|---|---|
GOLOMT_ENDPOINT |
Base URL of the Golomt Bank API |
GOLOMT_SECRET |
HMAC-SHA256 secret key |
GOLOMT_BEARER_TOKEN |
Bearer token for Authorization header |
API Reference
GolomtClient / AsyncGolomtClient
| Method | Description |
|---|---|
create_invoice(input) |
Create a payment invoice |
inquiry(transaction_id) |
Check transaction status |
pay_by_token(amount, token, transaction_id, lang) |
Pay using a saved token |
get_payment_url(invoice, lang, payment_method) |
Build payment redirect URL |
Constants
| Class | Values |
|---|---|
Lang |
MN, EN |
PaymentMethod |
PAYMENT, SOCIALPAY |
ReturnType |
POST, GET, MOBILE |
License
MIT
Metadata
Release files for mongolian-payment-golomt 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_golomt-1.0.0.tar.gz | 8.4 kB | Without provenance | Details for mongolian_payment_golomt-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mongolian_payment_golomt-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mongolian_payment_golomt-1.0.0-py3-none-any.whl |
Total release size: 16.9 kB
Release files / mongolian_payment_golomt-1.0.0.tar.gz
| Download URL | mongolian_payment_golomt-1.0.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95223f6b09eaf1974830245af51f1ca203f839614c2ea54010ed6d767e325c65
|
|
BLAKE2b-256 checksum How to use checksums |
6d6b8fd10d4992dc8dee4eb70902a30d5b7e9035de970249eb85a805c594821e
|
| 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_golomt-1.0.0-py3-none-any.whl
| Download URL | mongolian_payment_golomt-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18a70cb7cd600ab5bafba2b3f88f805d179ff980d40130d5cf273e1a590857fa
|
|
BLAKE2b-256 checksum How to use checksums |
5d33af81e9511afe29da2404f6eeeac286b63145a11b363126bff8ba0b9ffd03
|
| 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-golomt 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.