Skip to main content

Bitpapa Pay async python wrapper

Project description

Bitpapa Pay asynchronous api wrapper

Docs: https://apidocs.bitpapa.com/docs/apidocs/wvea40l9be95f-integracziya-bitpapa-pay

Installation

Install bitpapa-pay

pip install bitpapa-pay

Usage/Examples

import asyncio

from bitpapa_pay import TelegramBitpapaPay


async def main():
    bitpapa_pay = TelegramBitpapaPay(api_token="api_token")
    result = await bitpapa_pay.create_invoice("USDT", -100)
    print(result.model_dump())
    print(
        result.invoice.id,
        result.invoice.currency_code,
        result.invoice.amount,
        result.invoice.status,
        result.invoice.created_at,
        result.invoice.updated_at,
        result.invoice.url
    )
    result = await bitpapa_pay.get_invoices()
    for invoice in result.invoices:
        print(
            invoice.id,
            invoice.currency_code,
            invoice.amount,
            invoice.status,
            invoice.created_at,
            invoice.updated_at,
            invoice.url
        )
    result = await bitpapa_pay.get_exchange_rates_all()
    print(result)


if __name__ == "__main__":
    asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitpapa_pay-0.1.4.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

bitpapa_pay-0.1.4-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page