pycryptopay-sdk


Namepycryptopay-sdk JSON
Version 1.7.1 PyPI version JSON
download
home_pagehttps://github.com/LulzLoL231/pyCryptoPayAPI/
SummaryPython API wrapper for CryptoPay API
upload_time2023-01-11 09:13:33
maintainer
docs_urlNone
authorMaxim Mosin
requires_python>=3.8.1,<4.0.0
licenseMIT
keywords cryptopay crypto
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyCryptoPayAPI
![CryptoPay](https://raw.githubusercontent.com/Foile/crypto-pay-api/24a2c869ddc78d12109319c180764ad055fbe687/media/header.svg)

**[Crypto Pay](http://t.me/CryptoBot/?start=pay)** is a payment system based on [@CryptoBot](http://t.me/CryptoBot), which allows you to accept payments in cryptocurrency using the API.

This library help you to work with **Crypto Pay** via [Crypto Pay API](https://help.crypt.bot/crypto-pay-api) in yours Python scripts.

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/LulzLoL231/pyCryptoPayAPI)](https://github.com/LulzLoL231/pyCryptoPayAPI/releases/latest) [![CodeQL](https://github.com/LulzLoL231/pyCryptoPayAPI/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/LulzLoL231/pyCryptoPayAPI/actions/workflows/codeql-analysis.yml) [![Library test](https://github.com/LulzLoL231/pyCryptoPayAPI/actions/workflows/lib-test.yml/badge.svg)](https://github.com/LulzLoL231/pyCryptoPayAPI/actions/workflows/lib-test.yml)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycryptopay-sdk)  
Documentation available on [English language](https://lulzlol231.github.io/pyCryptoPayAPI/en)  
Документация доступна на [Русском языке](https://lulzlol231.github.io/pyCryptoPayAPI/ru)

## Install
Via pip:
```
pip install pycryptopay-sdk
```
Via git:  
```
pip install git+https://github.com/LulzLoL231/pyCryptoPayAPI.git
```
Via source, *in source folder*:  
```
pip install ./
```

## Usage

### API  
First, you need to create your application and get an API token. Open [@CryptoBot](http://t.me/CryptoBot?start=pay) or [@CryptoTestnetBot](http://t.me/CryptoTestnetBot?start=pay) (for testnet), send a command `/pay` to create a new app and get API Token.  
Next step: try to call a simple `get_me()` method to check that everything is working well:

```python
from asyncio import run

from CryptoPayAPI import CryptoPay

cp = CryptoPay('YOUR_API_TOKEN')
print(run(cp.get_me()))  # Returns Application object.
```

You can use `testnet` for testing your applications. Defaults is `mainnet`.

```python
from CryptoPayAPI import CryptoPay

cp = CryptoPay('YOUR_API_TOKEN', testnet=True)
```

You can find all available methods in [Methods chapter](#api-methods).  
Also, you can get supported [assets](#schemasassets), [paid button names](#schemaspaidbuttonnames) and [invoice status](#schemasinvoicestatus):

```python
from asyncio import get_event_loop
from CryptoPayAPI import CryptoPay
from CryptoPayAPI.schemas import Assets, PaidButtonNames, InvoiceStatus


lp = get_event_loop()
cp = CryptoPay('YOUR_API_TOKEN')

print(lp.run_until_complete(cp.create_invoice(
    Assets.USDT, 5.25,
    description='Example page for $5.25!',
    paid_btn_name=PaidButtonNames.VIEW_ITEM,
    paid_btn_url='https://example.com'
)))  # Prints information about created invoice.

print(lp.run_until_complete(cp.get_invoices(
    Assets.USDT, status=InvoiceStatus.PAID
)))  # Prints all paid invoices.
```

### Webhooks
Use Webhooks to get updates for your app, Crypto Pay will send an HTTPS POST request to the specified URL, containing a JSON-serialized [Update](#schemasupdate).  
Read more about webhooks in [Crypto Pay Docs](https://help.crypt.bot/crypto-pay-api#webhooks)!  
Use `CryptoPay.process_webhook_update` function, for processing Crypto Pay requests.  
Check [webhook example](https://github.com/LulzLoL231/pyCryptoPayAPI/tree/main/examples/webhook-example.py) for more info.

#### CryptoPay.process_webhook_update
*Coroutine*. Processing webhook request, returns [Update](#schemasupdate) object.

Arguments:
  * **body** (`bytes`) - JSON content from Crypto Pay request in bytes.
  * **headers** (`dict[str, str]`) - Request headers.
```python
update = await cp.process_webhook_update(body, headers)
print(f'Recieved {update.payload.amount} {update.payload.asset}!')  # Recieved 10.0 ETH
```

Look full code in the [examples](https://github.com/LulzLoL231/pyCryptoPayAPI/tree/main/examples).


## API methods
* [get_me](#get_me)
* [create_invoice](#create_invoice)
* [transfer](#transfer)
* [get_invoices](#get_invoices)
* [get_balances](#get_balances)
* [get_exchange_rates](#get_exchange_rates)
* [get_currencies](#get_currencies)

### get_me
A simple method for testing your app's authentication token. Requires no parameters. Returns basic information about the app.  
Returns: [Application](#schemasapplication) object.

```python
cp.get_me()
```

### create_invoice
Use this method to create a new invoice. Returns object of created invoice.

Arguments:
* **asset** ([Assets](#schemasassets) | `str`) - Currency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`.
* **amount** (`float`) - Amount of the invoice in float. For example: `125.50`
* **description** (`str`) - *Optional*. Description of the invoice. Up to 1024 symbols.
* **hidden_message** (`str`) - *Optional*. The message will show when the user pays your invoice.
* **paid_btn_name** ([PaidButtonName](#schemaspaidbuttonname) | `str`) - *Optional*. Paid button name. This button will be shown when your invoice was paid. Supported names:

  * `viewItem` - View Item
  * `openChannel` - Open Channel
  * `openBot` - Open Bot
  * `callback` - Return
* **paid_btn_url** (`str`) - *Optional but requried when you use paid_btn_name*. Paid button URL. You can set any payment success link (for example link on your bot). Start with https or http.
* **payload** (`str`, up to 4kb) - *Optional*. Some data. User ID, payment id, or any data you want to attach to the invoice.
* **allow_comments** (`bool`) - *Optional*. Allow adding comments when paying an invoice. Default is True.
* **allow_anonymous** (`bool`) - *Optional*. Allow pay invoice as anonymous. Default is True.
* **expires_in** (`int`) - *Optional*. You can set the expiration date of the invoice in seconds. Use this period: 1-2678400 seconds.

Returns: [Invoice](#schemasinvoice) object of created invoice.

```python
cp.create_invoice(
    Assets.USDT, 5.25,
    description='Example page for $5.25!',
    paid_btn_name=PaidButtonNames.VIEW_ITEM,
    paid_btn_url='https://example.com'
)
```

### transfer
Use this method to send coins from your app to the user. Returns object of completed transfer.

Arguments:
* **user_id** (`int`) - Telegram User ID. The user needs to have an account in our bot (send /start if no).
* **asset** ([Assets](#schemasassets)) - Currency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`.
* **amount** (`float`) - Amount of the transfer in float. For example: `125.50`
* **spend_id** (`str`) - It is used to make your request idempotent. It's guaranteed that only one of the transfers with the same spend_id will be accepted by Crypto Pay API. This parameter is useful when the transfer should be retried (i.e. request timeout/connection reset/500 HTTP status/etc). You can use a withdrawal id or something. Up to 64 symbols.
* **comment** (`str`) - *Optional*. The comment of the invoice. The comment will show in the notification about the transfer. Up to 1024 symbols.

Returns: [Transfer](#schemastransfer) object of created transfer.

```python
cp.transfer(265300852, Assets.USDT, 3.0, 'pCBA226ghd', comment='donate')
```


### get_invoice
Use this method to get invoices of your app. On success, the returns array of [Invoice](#schemasinvoice).

Arguments:
* **asset** ([Assets](#schemasassets)) - *Optional*. Currency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`. Default: all assets.
* **invoice_ids** (`str`) - *Optional*. Invoice IDs separated by comma.
* **status** ([InvoiceStatus](#schemasinvoicestatus)) - *Optional*. Status of invoices. Available statuses: active, paid and expired. Default: all statuses.
* **offset** (`int`) - *Optional*. Offset needed to return a specific subset of  invoices. Default 0.
* **count** (`int`) - *Optional*. Number of invoices to return. Default 100, max 1000.

Returns: array of [Invoice](#schemasinvoice) objects.

```python
cp.get_invoices(
    schemas.Assets.USDT, status=schemas.InvoiceStatus.PAID, count=10
)
```

### get_balance
Use this method to get balance of your app. Returns array of assets.

Returns: array of [Balance](#schemasbalance) objects.

```python
cp.get_balance()
```

### get_exchange_rates
Use this method to get exchange rates of supported currencies. Returns array of currencies.

Returns: array of [ExchangeRate](#schemasexchangerate) objects.

```python
cp.get_exchange_rates()
```

### get_currencies
Use this method to supported currencies. Returns array of currencies.

Returns: array of [Currency](#schemascurrency) objects.

```python
cp.get_currencies()
```

## Constants and schemas
```python
from CryptoBotAPI import schemas
```

#### schemas.Asset
constant      | value
------------- | ------
`Assets.BTC`  | `BTC`
`Assets.TON`  | `TON`
`Assets.ETH`  | `ETH`
`Assets.USDT` | `USDT`
`Assets.USDC` | `USDC`
`Assets.BUSD` | `BUSD`

#### schemas.PaidButtonNames
constant                       | value
------------------------------ | -------------
`PaidButtonNames.VIEW_ITEM`    | `viewItem`
`PaidButtonNames.OPEN_CHANNEL` | `openChannel`
`PaidButtonNames.OPEN_BOT`     | `openBot`
`PaidButtonNames.CALLBACK`     | `callback`

#### schemas.InvoiceStatus
constant                | value
----------------------- | ---------
`InvoiceStatus.ACTIVE`  | `active`
`InvoiceStatus.PAID`    | `paid`
`InvoiceStatus.EXPIRED` | `expired`

#### schemas.Invoice
key                | type
------------------ | ------------------------------------
`invoice_id`       | `int`
`status`           | [InvoiceStatus](#schemasinvoicestatus)
`hash`             | `str`
`asset`            | [Assets](#schemasassets)
`amount`           | `decimal.Decimal`
`pay_url`          | `str`
`description`      | `Optional[str]`
`created_at`       | `datetime.datetime`
`allow_comments`   | `bool`
`allow_anonymous`  | `bool`
`expiration_date`  | `Optional[datetime.datetime]`
`paid_at`          | `Optional[datetime.datetime]`
`paid_anonymously` | `Optional[bool]`
`comment`          | `Optional[str]`
`hidden_message`   | `Optional[str]`
`payload`          | `Optional[str]`
`paid_btn_name`    | `Optional[`[PaidButtonNames](#schemaspaidbuttonnames)`]`
`paid_btn_url`     | `Optional[str]`

#### schemas.Transfer
key            | type
-------------- | -----------------------
`transfer_id`  | `int`
`user_id`      | `int`
`asset`        | [Assets](#schemasassets)
`amount`       | `decimal.Decimal`
`status`       | `Literal['completed']`
`completed_at` | `datetime.datetime`
`comment`      | `Optional[str]`

#### schemas.Application
key                               | type
--------------------------------- | -----
`app_id`                          | `int`
`name`                            | `str`
`payment_processing_bot_username` | `str`

#### schemas.Balance
key             | type
--------------- | ------------------
`currency_code` | `str`
`available`     | `decimal.Decimal `

#### schemas.ExchangeRate
key        | type
---------- | -----------------
`is_valid` | `bool`
`source`   | `str`
`target`   | `str`
`rate`     | `decimal.Decimal`

#### schemas.Currency
key             | type
--------------- | ------------------
`is_blockchain` | `bool`
`is_stablecoin` | `bool`
`is_fiat`       | `bool`
`name`          | `str`
`code`          | `str`
`url`           | `Optional[str]`
`decimals`      | `int`

#### schemas.UpdateType
constant                  | value
------------------------- | --------------
`UpdateType.INVOICE_PAID` | `invoice_paid`

#### schemas.Update
key            | type
-------------- | ------------------------------
`update_id`    | `int`
`update_type`  | [UpdateType](#schemasupdatetype)
`request_date` | `datetime`
`payload`      | [Invoice](#schemasinvoice)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LulzLoL231/pyCryptoPayAPI/",
    "name": "pycryptopay-sdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0.0",
    "maintainer_email": "",
    "keywords": "cryptopay,crypto",
    "author": "Maxim Mosin",
    "author_email": "max@mosin.pw",
    "download_url": "https://files.pythonhosted.org/packages/72/5b/7ee1975d8d502601bd8a624d88becc983949f80ca06604f43622d97c42af/pycryptopay_sdk-1.7.1.tar.gz",
    "platform": null,
    "description": "# pyCryptoPayAPI\n![CryptoPay](https://raw.githubusercontent.com/Foile/crypto-pay-api/24a2c869ddc78d12109319c180764ad055fbe687/media/header.svg)\n\n**[Crypto Pay](http://t.me/CryptoBot/?start=pay)** is a payment system based on [@CryptoBot](http://t.me/CryptoBot), which allows you to accept payments in cryptocurrency using the API.\n\nThis library help you to work with **Crypto Pay** via [Crypto Pay API](https://help.crypt.bot/crypto-pay-api) in yours Python scripts.\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/LulzLoL231/pyCryptoPayAPI)](https://github.com/LulzLoL231/pyCryptoPayAPI/releases/latest) [![CodeQL](https://github.com/LulzLoL231/pyCryptoPayAPI/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/LulzLoL231/pyCryptoPayAPI/actions/workflows/codeql-analysis.yml) [![Library test](https://github.com/LulzLoL231/pyCryptoPayAPI/actions/workflows/lib-test.yml/badge.svg)](https://github.com/LulzLoL231/pyCryptoPayAPI/actions/workflows/lib-test.yml)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycryptopay-sdk)  \nDocumentation available on [English language](https://lulzlol231.github.io/pyCryptoPayAPI/en)  \n\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 [\u0420\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435](https://lulzlol231.github.io/pyCryptoPayAPI/ru)\n\n## Install\nVia pip:\n```\npip install pycryptopay-sdk\n```\nVia git:  \n```\npip install git+https://github.com/LulzLoL231/pyCryptoPayAPI.git\n```\nVia source, *in source folder*:  \n```\npip install ./\n```\n\n## Usage\n\n### API  \nFirst, you need to create your application and get an API token. Open [@CryptoBot](http://t.me/CryptoBot?start=pay) or [@CryptoTestnetBot](http://t.me/CryptoTestnetBot?start=pay) (for testnet), send a command `/pay` to create a new app and get API Token.  \nNext step: try to call a simple `get_me()` method to check that everything is working well:\n\n```python\nfrom asyncio import run\n\nfrom CryptoPayAPI import CryptoPay\n\ncp = CryptoPay('YOUR_API_TOKEN')\nprint(run(cp.get_me()))  # Returns Application object.\n```\n\nYou can use `testnet` for testing your applications. Defaults is `mainnet`.\n\n```python\nfrom CryptoPayAPI import CryptoPay\n\ncp = CryptoPay('YOUR_API_TOKEN', testnet=True)\n```\n\nYou can find all available methods in [Methods chapter](#api-methods).  \nAlso, you can get supported [assets](#schemasassets), [paid button names](#schemaspaidbuttonnames) and [invoice status](#schemasinvoicestatus):\n\n```python\nfrom asyncio import get_event_loop\nfrom CryptoPayAPI import CryptoPay\nfrom CryptoPayAPI.schemas import Assets, PaidButtonNames, InvoiceStatus\n\n\nlp = get_event_loop()\ncp = CryptoPay('YOUR_API_TOKEN')\n\nprint(lp.run_until_complete(cp.create_invoice(\n    Assets.USDT, 5.25,\n    description='Example page for $5.25!',\n    paid_btn_name=PaidButtonNames.VIEW_ITEM,\n    paid_btn_url='https://example.com'\n)))  # Prints information about created invoice.\n\nprint(lp.run_until_complete(cp.get_invoices(\n    Assets.USDT, status=InvoiceStatus.PAID\n)))  # Prints all paid invoices.\n```\n\n### Webhooks\nUse Webhooks to get updates for your app, Crypto Pay will send an HTTPS POST request to the specified URL, containing a JSON-serialized [Update](#schemasupdate).  \nRead more about webhooks in [Crypto Pay Docs](https://help.crypt.bot/crypto-pay-api#webhooks)!  \nUse `CryptoPay.process_webhook_update` function, for processing Crypto Pay requests.  \nCheck [webhook example](https://github.com/LulzLoL231/pyCryptoPayAPI/tree/main/examples/webhook-example.py) for more info.\n\n#### CryptoPay.process_webhook_update\n*Coroutine*. Processing webhook request, returns [Update](#schemasupdate) object.\n\nArguments:\n  * **body** (`bytes`) - JSON content from Crypto Pay request in bytes.\n  * **headers** (`dict[str, str]`) - Request headers.\n```python\nupdate = await cp.process_webhook_update(body, headers)\nprint(f'Recieved {update.payload.amount} {update.payload.asset}!')  # Recieved 10.0 ETH\n```\n\nLook full code in the [examples](https://github.com/LulzLoL231/pyCryptoPayAPI/tree/main/examples).\n\n\n## API methods\n* [get_me](#get_me)\n* [create_invoice](#create_invoice)\n* [transfer](#transfer)\n* [get_invoices](#get_invoices)\n* [get_balances](#get_balances)\n* [get_exchange_rates](#get_exchange_rates)\n* [get_currencies](#get_currencies)\n\n### get_me\nA simple method for testing your app's authentication token. Requires no parameters. Returns basic information about the app.  \nReturns: [Application](#schemasapplication) object.\n\n```python\ncp.get_me()\n```\n\n### create_invoice\nUse this method to create a new invoice. Returns object of created invoice.\n\nArguments:\n* **asset** ([Assets](#schemasassets) | `str`) - Currency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`.\n* **amount** (`float`) - Amount of the invoice in float. For example: `125.50`\n* **description** (`str`) - *Optional*. Description of the invoice. Up to 1024 symbols.\n* **hidden_message** (`str`) - *Optional*. The message will show when the user pays your invoice.\n* **paid_btn_name** ([PaidButtonName](#schemaspaidbuttonname) | `str`) - *Optional*. Paid button name. This button will be shown when your invoice was paid. Supported names:\n\n  * `viewItem` - View Item\n  * `openChannel` - Open Channel\n  * `openBot` - Open Bot\n  * `callback` - Return\n* **paid_btn_url** (`str`) - *Optional but requried when you use paid_btn_name*. Paid button URL. You can set any payment success link (for example link on your bot). Start with https or http.\n* **payload** (`str`, up to 4kb) - *Optional*. Some data. User ID, payment id, or any data you want to attach to the invoice.\n* **allow_comments** (`bool`) - *Optional*. Allow adding comments when paying an invoice. Default is True.\n* **allow_anonymous** (`bool`) - *Optional*. Allow pay invoice as anonymous. Default is True.\n* **expires_in** (`int`) - *Optional*. You can set the expiration date of the invoice in seconds. Use this period: 1-2678400 seconds.\n\nReturns: [Invoice](#schemasinvoice) object of created invoice.\n\n```python\ncp.create_invoice(\n    Assets.USDT, 5.25,\n    description='Example page for $5.25!',\n    paid_btn_name=PaidButtonNames.VIEW_ITEM,\n    paid_btn_url='https://example.com'\n)\n```\n\n### transfer\nUse this method to send coins from your app to the user. Returns object of completed transfer.\n\nArguments:\n* **user_id** (`int`) - Telegram User ID. The user needs to have an account in our bot (send /start if no).\n* **asset** ([Assets](#schemasassets)) - Currency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`.\n* **amount** (`float`) - Amount of the transfer in float. For example: `125.50`\n* **spend_id** (`str`) - It is used to make your request idempotent. It's guaranteed that only one of the transfers with the same spend_id will be accepted by Crypto Pay API. This parameter is useful when the transfer should be retried (i.e. request timeout/connection reset/500 HTTP status/etc). You can use a withdrawal id or something. Up to 64 symbols.\n* **comment** (`str`) - *Optional*. The comment of the invoice. The comment will show in the notification about the transfer. Up to 1024 symbols.\n\nReturns: [Transfer](#schemastransfer) object of created transfer.\n\n```python\ncp.transfer(265300852, Assets.USDT, 3.0, 'pCBA226ghd', comment='donate')\n```\n\n\n### get_invoice\nUse this method to get invoices of your app. On success, the returns array of [Invoice](#schemasinvoice).\n\nArguments:\n* **asset** ([Assets](#schemasassets)) - *Optional*. Currency code. Supported assets: `BTC`, `TON`, `ETH` (only testnet), `USDT`, `USDC`, `BUSD`. Default: all assets.\n* **invoice_ids** (`str`) - *Optional*. Invoice IDs separated by comma.\n* **status** ([InvoiceStatus](#schemasinvoicestatus)) - *Optional*. Status of invoices. Available statuses: active, paid and expired. Default: all statuses.\n* **offset** (`int`) - *Optional*. Offset needed to return a specific subset of  invoices. Default 0.\n* **count** (`int`) - *Optional*. Number of invoices to return. Default 100, max 1000.\n\nReturns: array of [Invoice](#schemasinvoice) objects.\n\n```python\ncp.get_invoices(\n    schemas.Assets.USDT, status=schemas.InvoiceStatus.PAID, count=10\n)\n```\n\n### get_balance\nUse this method to get balance of your app. Returns array of assets.\n\nReturns: array of [Balance](#schemasbalance) objects.\n\n```python\ncp.get_balance()\n```\n\n### get_exchange_rates\nUse this method to get exchange rates of supported currencies. Returns array of currencies.\n\nReturns: array of [ExchangeRate](#schemasexchangerate) objects.\n\n```python\ncp.get_exchange_rates()\n```\n\n### get_currencies\nUse this method to supported currencies. Returns array of currencies.\n\nReturns: array of [Currency](#schemascurrency) objects.\n\n```python\ncp.get_currencies()\n```\n\n## Constants and schemas\n```python\nfrom CryptoBotAPI import schemas\n```\n\n#### schemas.Asset\nconstant      | value\n------------- | ------\n`Assets.BTC`  | `BTC`\n`Assets.TON`  | `TON`\n`Assets.ETH`  | `ETH`\n`Assets.USDT` | `USDT`\n`Assets.USDC` | `USDC`\n`Assets.BUSD` | `BUSD`\n\n#### schemas.PaidButtonNames\nconstant                       | value\n------------------------------ | -------------\n`PaidButtonNames.VIEW_ITEM`    | `viewItem`\n`PaidButtonNames.OPEN_CHANNEL` | `openChannel`\n`PaidButtonNames.OPEN_BOT`     | `openBot`\n`PaidButtonNames.CALLBACK`     | `callback`\n\n#### schemas.InvoiceStatus\nconstant                | value\n----------------------- | ---------\n`InvoiceStatus.ACTIVE`  | `active`\n`InvoiceStatus.PAID`    | `paid`\n`InvoiceStatus.EXPIRED` | `expired`\n\n#### schemas.Invoice\nkey                | type\n------------------ | ------------------------------------\n`invoice_id`       | `int`\n`status`           | [InvoiceStatus](#schemasinvoicestatus)\n`hash`             | `str`\n`asset`            | [Assets](#schemasassets)\n`amount`           | `decimal.Decimal`\n`pay_url`          | `str`\n`description`      | `Optional[str]`\n`created_at`       | `datetime.datetime`\n`allow_comments`   | `bool`\n`allow_anonymous`  | `bool`\n`expiration_date`  | `Optional[datetime.datetime]`\n`paid_at`          | `Optional[datetime.datetime]`\n`paid_anonymously` | `Optional[bool]`\n`comment`          | `Optional[str]`\n`hidden_message`   | `Optional[str]`\n`payload`          | `Optional[str]`\n`paid_btn_name`    | `Optional[`[PaidButtonNames](#schemaspaidbuttonnames)`]`\n`paid_btn_url`     | `Optional[str]`\n\n#### schemas.Transfer\nkey            | type\n-------------- | -----------------------\n`transfer_id`  | `int`\n`user_id`      | `int`\n`asset`        | [Assets](#schemasassets)\n`amount`       | `decimal.Decimal`\n`status`       | `Literal['completed']`\n`completed_at` | `datetime.datetime`\n`comment`      | `Optional[str]`\n\n#### schemas.Application\nkey                               | type\n--------------------------------- | -----\n`app_id`                          | `int`\n`name`                            | `str`\n`payment_processing_bot_username` | `str`\n\n#### schemas.Balance\nkey             | type\n--------------- | ------------------\n`currency_code` | `str`\n`available`     | `decimal.Decimal `\n\n#### schemas.ExchangeRate\nkey        | type\n---------- | -----------------\n`is_valid` | `bool`\n`source`   | `str`\n`target`   | `str`\n`rate`     | `decimal.Decimal`\n\n#### schemas.Currency\nkey             | type\n--------------- | ------------------\n`is_blockchain` | `bool`\n`is_stablecoin` | `bool`\n`is_fiat`       | `bool`\n`name`          | `str`\n`code`          | `str`\n`url`           | `Optional[str]`\n`decimals`      | `int`\n\n#### schemas.UpdateType\nconstant                  | value\n------------------------- | --------------\n`UpdateType.INVOICE_PAID` | `invoice_paid`\n\n#### schemas.Update\nkey            | type\n-------------- | ------------------------------\n`update_id`    | `int`\n`update_type`  | [UpdateType](#schemasupdatetype)\n`request_date` | `datetime`\n`payload`      | [Invoice](#schemasinvoice)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python API wrapper for CryptoPay API",
    "version": "1.7.1",
    "split_keywords": [
        "cryptopay",
        "crypto"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5eea9ac57e627921dc5a9f95adbd70fd54711a544cce01b5d91c21aa989baf93",
                "md5": "fbb7f52db782f5a6eea7487898d679f1",
                "sha256": "58f3249585c3b8841d7ca7499eeffd3b74d0929ae7a81c4096faf778e3f903d2"
            },
            "downloads": -1,
            "filename": "pycryptopay_sdk-1.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fbb7f52db782f5a6eea7487898d679f1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 12783,
            "upload_time": "2023-01-11T09:13:31",
            "upload_time_iso_8601": "2023-01-11T09:13:31.861576Z",
            "url": "https://files.pythonhosted.org/packages/5e/ea/9ac57e627921dc5a9f95adbd70fd54711a544cce01b5d91c21aa989baf93/pycryptopay_sdk-1.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "725b7ee1975d8d502601bd8a624d88becc983949f80ca06604f43622d97c42af",
                "md5": "68b768218abe2fb312517b78ab8fe774",
                "sha256": "8e08d409e5f284c719f41244b8a877a863d378b107eb809c6e0926c7798d0964"
            },
            "downloads": -1,
            "filename": "pycryptopay_sdk-1.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "68b768218abe2fb312517b78ab8fe774",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 15259,
            "upload_time": "2023-01-11T09:13:33",
            "upload_time_iso_8601": "2023-01-11T09:13:33.586590Z",
            "url": "https://files.pythonhosted.org/packages/72/5b/7ee1975d8d502601bd8a624d88becc983949f80ca06604f43622d97c42af/pycryptopay_sdk-1.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-11 09:13:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "LulzLoL231",
    "github_project": "pyCryptoPayAPI",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pycryptopay-sdk"
}
        
Elapsed time: 0.04876s