mongolian-payment-tokipay
TokiPay payment gateway SDK for Python.
Installation
pip install mongolian-payment-tokipay
Usage
from mongolian_payment_tokipay import TokiPayClient, TokiPayConfig, TokiPayPaymentInput
client = TokiPayClient(TokiPayConfig(
endpoint="https://api.tokipay.mn",
api_key="YOUR_API_KEY",
im_api_key="YOUR_IM_API_KEY",
authorization="YOUR_AUTH_TOKEN",
merchant_id="YOUR_MERCHANT_ID",
success_url="https://example.com/success",
failure_url="https://example.com/failure",
))
# Create a QR payment
result = client.payment_qr(TokiPayPaymentInput(
order_id="order_123",
amount=10000,
notes="Payment for order #123",
))
print(result.data.request_id)
Async usage
import asyncio
from mongolian_payment_tokipay import AsyncTokiPayClient, TokiPayConfig, TokiPayPaymentInput
async def main():
async with AsyncTokiPayClient(TokiPayConfig(
endpoint="https://api.tokipay.mn",
api_key="YOUR_API_KEY",
im_api_key="YOUR_IM_API_KEY",
authorization="YOUR_AUTH_TOKEN",
merchant_id="YOUR_MERCHANT_ID",
success_url="https://example.com/success",
failure_url="https://example.com/failure",
)) as client:
result = await client.payment_qr(TokiPayPaymentInput(
order_id="order_123",
amount=10000,
notes="Payment for order #123",
))
print(result.data.request_id)
asyncio.run(main())
Load config from environment
from mongolian_payment_tokipay import TokiPayClient, load_config_from_env
client = TokiPayClient(load_config_from_env())
Required environment variables: TOKIPAY_ENDPOINT, TOKIPAY_API_KEY, TOKIPAY_IM_API_KEY, TOKIPAY_AUTHORIZATION, TOKIPAY_MERCHANT_ID, TOKIPAY_SUCCESS_URL, TOKIPAY_FAILURE_URL.
Optional: TOKIPAY_APP_SCHEMA_IOS.
License
MIT
Metadata
Release files for mongolian-payment-tokipay 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_tokipay-1.0.0.tar.gz | 10.1 kB | Without provenance | Details for mongolian_payment_tokipay-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mongolian_payment_tokipay-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mongolian_payment_tokipay-1.0.0-py3-none-any.whl |
Total release size: 19.4 kB
Release files / mongolian_payment_tokipay-1.0.0.tar.gz
| Download URL | mongolian_payment_tokipay-1.0.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b913ee7a4e76f4ed97f2a11dec03ab0a2604d09b2b31c7621046a689c4634d4
|
|
BLAKE2b-256 checksum How to use checksums |
cb9ac0a958b1c01e5dbc6eadbe92e6f445bd4ef55666a3310d7eb6cf4219bf2b
|
| 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_tokipay-1.0.0-py3-none-any.whl
| Download URL | mongolian_payment_tokipay-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6c39a3a947617869b3adeac3165b8aa0893f1acb0d54f9d42046780f1e1583c
|
|
BLAKE2b-256 checksum How to use checksums |
6d22609ffd81f51491e49a2136d49f2786fb88f4cb406e3e33a49164b6018486
|
| 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-tokipay 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.