Skip to main content

mongolian-payment-storepay

StorePay payment gateway SDK for Python. Supports both synchronous and asynchronous usage.

Installation

pip install mongolian-payment-storepay

Usage

Synchronous

from mongolian_payment_storepay import StorePayClient, StorePayConfig, StorePayLoanInput

client = StorePayClient(StorePayConfig(
    app_username="your_app_username",
    app_password="your_app_password",
    username="your_username",
    password="your_password",
    auth_url="https://auth.storepay.mn",
    base_url="https://api.storepay.mn",
    store_id="your_store_id",
    callback_url="https://example.com/callback",
))

# Create a loan
loan_id = client.loan(StorePayLoanInput(
    description="Order #001",
    mobile_number="99112233",
    amount=50000,
))

print(loan_id)  # Loan ID

# Check loan status
confirmed = client.loan_check(str(loan_id))
print(confirmed)  # True if confirmed

# Check user possible amount
amount = client.user_possible_amount("99112233")
print(amount)

# Clean up
client.close()

Asynchronous

import asyncio
from mongolian_payment_storepay import AsyncStorePayClient, StorePayConfig, StorePayLoanInput

async def main():
    async with AsyncStorePayClient(StorePayConfig(
        app_username="your_app_username",
        app_password="your_app_password",
        username="your_username",
        password="your_password",
        auth_url="https://auth.storepay.mn",
        base_url="https://api.storepay.mn",
        store_id="your_store_id",
        callback_url="https://example.com/callback",
    )) as client:
        loan_id = await client.loan(StorePayLoanInput(
            description="Order #001",
            mobile_number="99112233",
            amount=50000,
        ))

        confirmed = await client.loan_check(str(loan_id))
        print(confirmed)

asyncio.run(main())

Configuration from Environment Variables

from mongolian_payment_storepay import StorePayClient, load_config_from_env

client = StorePayClient(load_config_from_env())

Required environment variables:

Variable Description
STOREPAY_APP_USERNAME OAuth app username
STOREPAY_APP_PASSWORD OAuth app password
STOREPAY_USERNAME Basic Auth username
STOREPAY_PASSWORD Basic Auth password
STOREPAY_AUTH_URL Auth server URL
STOREPAY_BASE_URL API base URL
STOREPAY_STORE_ID Merchant store ID
STOREPAY_CALLBACK_URL Callback URL for loan notifications

License

MIT

Metadata

Release files for mongolian-payment-storepay 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mongolian-payment-storepay 1.0.0
File Size Uploaded Provenance Actions
mongolian_payment_storepay-1.0.0.tar.gz 9.1 kB Without provenance Details for mongolian_payment_storepay-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mongolian-payment-storepay 1.0.0
File Interpreter ABI Platform Actions
mongolian_payment_storepay-1.0.0-py3-none-any.whl Python 3 none any Details for mongolian_payment_storepay-1.0.0-py3-none-any.whl

Total release size: 17.2 kB

Release files / mongolian_payment_storepay-1.0.0.tar.gz

Download URL mongolian_payment_storepay-1.0.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0a89f9de9722a48bd0ac399a83a39f927b66d60e084e65b742adb4bdb2003ed0
BLAKE2b-256 checksum
How to use checksums
780081238070207cd10aee013c68d22b1bcfc93be4db5660511b30f044f136e0
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_storepay-1.0.0-py3-none-any.whl

Download URL mongolian_payment_storepay-1.0.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03fad3893eaf1c16e703e81f89491c469fc327f98122b70edc1d977c7bffcb8c
BLAKE2b-256 checksum
How to use checksums
dcae7e71ec7484485721e4a2f6524bef0f4632bfa34552db846093e27aa525a6
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-storepay 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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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