Skip to main content

CrystalPay api wrapper

Project description

pyCrystalPay

Install

From Pypi
pip install pycrystalpay

Async

Инициализация

from pycrystalpay import AsyncCrystalPay, types


client = AsyncCrystalPay(
    auth_login="mylogin",
    auth_secret="mysecret",
    wait_cooldown=True # auto wait 5 rps
)

Методы /invoice/

Создание платежа
/invoice/create

payment: types.InvoiceCreate = await client.invoice_create("100","purchase","1")

payment.url # Ссылка для оплаты
payment.id

Получение информации о платеже по id
/invoice/info

response: types.InvoiceInfo = await client.invoice_info("id_платежа")

if response.is_payed:
    ...

Методы /me/

/me/info

response: types.MeInfo = await client.me_info()

Методы /balance/

/balance/list

response: types.BalanceList = await client.balance_list(hide_empty=True)

/balance/get

response: types.BalanceGet = await client.balance_list(method="BITCOIN")

Методы /method/

/method/list

response: types.MethodList = await client.method_list(compact=True)

/method/get

response: types.MethodInfo = await client.method_get(method="BITCOIN")

/method/edit

response: bool = await client.method_edit(method="BITCOIN", enabled=True, extra_commission_percent=0)

Методы /payoff/

/payoff/create

response: types.PayoffCreate = await client.payoff_create(
        "SBPP2P",
        "somewallet",
        100,
        "amount"
)

/payoff/submit

response: types.PayoffData = await client.payoff_create(id="some_id")

/payoff/cancel

response: types.PayoffData = await client.payoff_cancel(id="some_id")

/payoff/get

response: types.PayoffData = await client.payoff_get(id="some_id")

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

pycrystalpay-0.0.2.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycrystalpay-0.0.2-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file pycrystalpay-0.0.2.tar.gz.

File metadata

  • Download URL: pycrystalpay-0.0.2.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pycrystalpay-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fb1b9d21423874a33d0682b25d76ed67681fcca6e8561f131950cedb68b0da43
MD5 665b27db8b8cc41af8f1993de41cf899
BLAKE2b-256 7538494492ca2664a44657f8837d66cc0bae4076b34d8901677ceb9a7b0f90d4

See more details on using hashes here.

File details

Details for the file pycrystalpay-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pycrystalpay-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pycrystalpay-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c325cb19f7525095f30dd3d1fdd2ee9ba8930efd50ace6f953f8039f47a0f5d1
MD5 904096b868c695fd6855c9cc67da93fa
BLAKE2b-256 5875ff9c9d136fbdf148c8efa03c851d5ae4c75a1a935ff6c7c8892d7adccae3

See more details on using hashes here.

Supported by

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