[<img src="https://blockbee.io/static/assets/images/blockbee_logo_nospaces.png" width="300"/>](image.png)
# BlockBee's Python Library
Python implementation of BlockBee's payment gateway
## Table of Contents
1. [Requirements](#requirements)
2. [Installation](#installation)
3. [API and utils](#api-and-utils)
4. [Checkout](#checkout)
5. [Payouts](#payouts)
6. [Help](#help)
7. [Changelog](#changelog)
## Requirements:
```
Python >= 3.0
Requests >= 2.20
```
## Installation
```shell script
pip install python-blockbee
```
[on pypi](https://pypi.python.org/pypi/python-blockbee)
or
[on GitHub](https://github.com/blockbee-io/python-blockbee)
## API and utils
### Importing in your project file
```python
from blockbee import BlockBeeHelper
```
### Generating a new Address
```python
from blockbee import BlockBeeHelper
bb = BlockBeeHelper(coin, own_address, callback_url, parameters, bb_params, api_key)
address = bb.get_address()['address_in']
```
#### Where:
* ``coin`` is the coin you wish to use, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...).
* ``own_address`` is your own crypto address, where your funds will be sent to.
* ``callback_url`` is the URL that will be called upon payment.
* ``params`` is any parameter you wish to send to identify the payment, such as `{orderId: 1234}`.
* ``bb_params`` parameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/create).
* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).
* ``address`` is the newly generated address, that you will show your users in order to receive payments.
#### Response sample:
```
0x0E945b1554c8029A6B9bE1F7A24ae75d2F44d8DB
```
### Getting notified when the user pays
> Once your customer makes a payment, BlockBee will send a callback to your `callbackUrl`. This callback information is by default in ``GET`` but you can se it to ``POST`` by setting ``post: 1`` in ``blockbeeParams``. The parameters sent by BlockBee in this callback can be consulted here: https://docs.blockbee.io/#operation/confirmedcallbackget
### Checking the logs of a request
```python
from blockbee import BlockBeeHelper
bb = BlockBeeHelper(coin, own_address, callback_url, parameters, bb_params, api_key)
data = bb.get_logs()
```
> Same parameters as before, the ```data``` returned can b e checked here: https://docs.blockbee.io/#operation/logs
#### Response sample:
```json
{
"status": "success",
"callback_url": "https://example.com/?order_id=1235",
"address_in": "0x58e90D31530A5566dA97e34205730323873eb88B",
"address_out": "0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d",
"notify_pending": false,
"notify_confirmations": 1,
"priority": "default",
"callbacks": []
}
```
### Generating a QR code
```python
from blockbee import BlockBeeHelper
bb = BlockBeeHelper(coin, own_address, callback_url, parameters, bb_params, api_key)
qr_code = bb.get_qrcode(value, size)
```
For object creation, same parameters as before. You must first call ``getAddress` as this method requires the payment address to have been created.
#### Where:
* ``value`` is the value requested to the user in the coin to which the request was done. **Optional**, can be empty if you don't wish to add the value to the QR Code.
* ``size`` Size of the QR Code image in pixels. Optional, leave empty to use the default size of 512.
> Response is an object with `qr_code` (base64 encoded image data) and `payment_uri` (the value encoded in the QR), see https://docs.blockbee.io/#operation/qrcode for more information.
#### Response sample:
```json
{
"status": "success",
"qr_code": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAYeklEQVR4nO3daZQdZZkH8Od5q+quvXenO3tCQtg3WQLDOiwi4FEGRA96RhkRlEUd9cw5Ojif/DTOHEcF4YAwntFRhBEHBPWoKAECGNnXSICQBEL23m/fvkvV+8yHut3pEPoSaop6qjv/3wcOSbrurVv3/vutW8/7vMUiQgCgx2jvAMD+DiEEUIYQAihDCAGUIYQAyhBCAGUIIYAyhBBAmdvk35g5sf2IS4S5BxFe5nTPEu8Ri3ceRYwvM9qjRXiWBJ49MU1eJkZCAGUIIYAyhBBAGUIIoAwhBFCGEAIoQwgBlDWrE05HvQ9YvRw33Q4kU1iL9mjxvmsxVkqbbBJhn2fihxMjIYAyhBBAGUIIoAwhBFCGEAIoQwgBlCGEAMoQQgBlUYr1Tej2ekajXvieTmrbcJs8UYQdSPMbPZ149xkjIYAyhBBAGUIIoAwhBFCGEAIoQwgBlCGEAMpirhPu51Lbbdzk0aL11CazYrJ6h24yMBICKEMIAZQhhADKEEIAZQghgDKEEEAZQgigDCEEULa/FOvjrWInU5RPpqk3z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ezzHMyNxKPMMFA/QbX6guNYyQEUIYQAihDCAGUIYQAyhBCAGUIIYAyhBBAGSdT2IlXMh26EUQ7MjGW49K8Wm4yTb3qtU0s/gsw8yCEAMoQQgBlCCGAMoQQQBlCCKAMIQRQhhACKItSrE8z3fKuet05AvVVw5PpkI79iWKEkRBAGUIIoAwhBFCGEAIoQwgBlCGEAMoQQgBlzeqEAJAAjIQAyhBCAGUIIYAyhBBAGUIIoAwhBFCGEAIoQwgBlP0fDDJ0PYOZxyEAAAAASUVORK5CYII=",
"payment_uri": "0x0E945b1554c8029A6B9bE1F7A24ae75d2F44d8DB"
}
```
#### Usage
```
<img src={`data:image/png;base64,{{qr_code}}`}/>
```
### Estimating transaction fees
```python
from blockbee import BlockBeeHelper
fees = BlockBeeHelper.get_estimate(coin, addresses, priority)
```
#### Where:
* ``coin`` is the coin you wish to check, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...)
* ``addresses`` The number of addresses to forward the funds to. Optional, defaults to 1.
* ``priority`` Confirmation priority, (check [this](https://support.blockbee.io/article/how-the-priority-parameter-works) article to learn more about it). Optional, defaults to ``default``.
> Response is an object with ``estimated_cost`` and ``estimated_cost_usd``, see https://docs.blockbee.io/#operation/estimate for more information.
#### Response sample:
```json
{
"status": "success",
"estimated_cost": "0.00637010",
"estimated_cost_currency": {
"AED": "0.03",
"AUD": "0.01",
"BGN": "0.01",
"BRL": "0.04"
}
}
```
### Converting between coins and fiat
```python
from blockbee import BlockBeeHelper
bb = BlockBeeHelper(coin, own_address, callback_url, params, bb_params, api_key)
conversion = bb.get_conversion(value, from_coin)
```
#### Where:
* ``coin`` the target currency to convert to, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...)
* ``value`` value to convert in `from`.
* ``from_coin`` currency to convert from, FIAT or crypto.
> Response is an object with ``value_coin`` and ``exchange_rate``, see https://docs.blockbee.io/#operation/convert for more information.
#### Response sample:
```json
{
"status": "success",
"value_coin": "241.126",
"exchange_rate": "0.803753"
}
```
### Getting supported coins
```python
from blockbee import BlockBeeHelper
supportedCoins = BlockBeeHelper.get_supported_coins()
```
> Response is an array with all supported coins.
#### Response sample:
```json
{
"btc": {
"coin": "Bitcoin",
"logo": "https://api.cryptapi.io/media/token_logos/btc.png",
"ticker": "btc",
"minimum_transaction": 8000,
"minimum_transaction_coin": "0.00008000",
"minimum_fee": 546,
"minimum_fee_coin": "0.00000546",
"fee_percent": "1.000",
"network_fee_estimation": "0.00002518"
},
"bch": {
"coin": "Bitcoin Cash",
"logo": "https://api.cryptapi.io/media/token_logos/bch.png",
"ticker": "bch",
"minimum_transaction": 50000,
"minimum_transaction_coin": "0.00050000",
"minimum_fee": 546,
"minimum_fee_coin": "0.00000546",
"fee_percent": "1.000",
"network_fee_estimation": "0.00000305"
}
}
```
## Checkout
### Requesting Payment
```python
from BlockBee import BlockBeeCheckoutHelper
bb = BlockBeeCheckoutHelper(api_key, params, bb_params)
payment_page = bb.payment_request(redirect_url, value)
```
#### Where:
* ``api_key`` is the API Key provided by our [Dashboard](https://dash.blockbee.io/).
* ``params`` is any parameter you wish to send to identify the payment, such as `{'order_id': 1234}`.
* ``bb_params`` parameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/create).
* ``redirect_url`` URL in your platform, where the user will be redirected to following the payment. Should be able to process the payment using the `success_token`.
* ``value`` amount in currency set in Payment Settings you want to receive from the user.
#### Getting notified when the user completes the Payment
> When receiving payments, you have the option to receive them in either the ``notify_url`` or the ``redirect_url``, but adding the ``redirect_url`` is required (refer to our documentation at https://docs.blockbee.io/#operation/paymentipn).
#### Payment samples:
```json
{
"status": "success",
"success_token": "G4asA2xwEr0UeY2IZqlZjX3IYrNofmnIAkzHPAoxmpmlYP9ZLTvQUolKN0X27Z0B",
"payment_url": "https://pay.blockbee.io/payment/OcRrZGsKQFGsoi0asqZkr97WbitMxFMb/",
"payment_id": "OcRrZGsKQFGsoi0asqZkr97WbitMxFMb"
}
```
### Payment Logs
Fetch Payment information and IPN logs.
```python
from BlockBee import BlockBeeCheckoutHelper
logs = BlockBeeCheckoutHelper.payment_logs(token, api_key)
```
#### Where:
* ```token``` is the `payment_id` returned by the payment creation endpoint.
* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).
#### Response sample:
```json
{
"status": "success",
"is_paid": false,
"is_pending": false,
"is_expired": false,
"is_partial": false,
"payment_data": [
{
"value": "0.000137",
"value_paid": "0",
"value_outstanding": "0.000137",
"exchange_rate": "0.0000137489",
"coin": "btc",
"txid": []
}
],
"notifications": []
}
```
### Requesting Deposit
```python
from BlockBee import BlockBeeCheckoutHelper
bb = BlockBeeCheckoutHelper(api_key, params, bb_params)
deposit_page = bb.deposit_request(notify_url)
```
#### Where:
* ``api_key`` is the API Key provided by our [Dashboard](https://dash.blockbee.io/).
* ``params`` is any parameter you wish to send to identify the payment, such as `{'order_id': 1234}`.
* ``bb_params`` parameters that will be passed to BlockBee (check which extra parameters are available here: https://docs.blockbee.io/#operation/deposit).
* ``notify_url`` URL in your platform, where the IPN will be sent notifying that a deposit was done. Parameters are available here: https://docs.blockbee.io/#operation/depositipn.
#### Response sample:
```json
{
"status": "success",
"payment_url": "https://pay.blockbee.io/deposit/jv12du8IWqS96WVDjZK2J285WOBOBycc/",
"payment_id": "jv12du8IWqS96WVDjZK2J285WOBOBycc"
}
```
### Deposit Logs
Fetch Deposit information and IPN logs.
```python
from BlockBee import BlockBeeCheckoutHelper
logs = BlockBeeCheckoutHelper.deposit_logs(token, api_key)
```
#### Where:
* ```token``` is the `payment_id` returned by the deposit creation endpoint.
* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).
#### Response sample:
```json
{
"status": "success",
"deposits": [],
"total_deposited": "0",
"currency": "USDT",
"notifications": []
}
```
## Payouts
### Create Payout / Payout Request
This function can be used by you to create [Payouts](https://docs.blockbee.io/#tag/Payouts).
```python
from BlockBee import BlockBeeHelper
coin = 'polygon_matic'
requests = {
'0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d': 0.5,
'0x18B211A1Ba5880C7d62C250B6441C2400d588589': 0.1
}
create_payout = BlockBeeHelper.create_payout(coin, payout_requests, api_key, process)
```
#### Where:
* ``coin`` The cryptocurrency you want to request the Payout in (e.g `btc`, `eth`, `erc20_usdt`, ...).
* ``requests`` Address(es) together with the amount that must be sent.
* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).
* ``process`` If the Payout Requests will be sent right away. Defaults to `False`. **Note**: if `True` will instantly queue the payouts to be sent to the destination addresses.
#### Response sample:
If `process` is `false`.
```json
{
"status": "success",
"request_ids": [
"42d5245e-0a29-402a-9a7e-355e38f1d81d",
"080a546e-4045-4c73-870c-4d9ec08c9cab"
]
}
```
If `process` is `true`.
```json
{
"status": "success",
"payout_info": {
"id": "88e5eacc-d5a5-4b8a-8133-e23136151b7c",
"status": "Pending Payment",
"from": "0x18B211A1Ba5880C7d62C250B6441C2400d588589",
"requests": {
"0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d": "0.5",
"0x18B211A1Ba5880C7d62C250B6441C2400d588589": "0.1"
},
"total_requested": "0.6",
"total_with_fee": "0.603",
"error": "None",
"blockchain_fee": 0,
"fee": "0.003",
"coin": "bep20_usdt",
"txid": "",
"timestamp": "23/04/2024 11:13:49"
},
"queued": true
}
```
### List Payouts / Payout Requests
List all Payouts or Payout Requests in your account.
**Note:** If `requests` is `True` it will fetch a Payout Requests list.
```python
from BlockBee import BlockBeeHelper
create_payout = BlockBeeHelper.list_payouts(coin, status, page, api_key, payout_request)
```
#### Where:
* ``coin`` The cryptocurrency you want to request the lists in (e.g `btc`, `eth`, `erc20_usdt`, ...).
* ``status`` The status of the Payout / Payout Request. Possible statuses are:
* Payout Request: [`all`, `pending`, `rejected`, `processing`, `done`]
* Payout: [`created`, `processing`, `done`, `error`]
* ``page`` This endpoint is paginated and will show only `50` items per page. Defaults to `1`.
* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).
* ``payout_request`` If `True` will fetch Payout Requests, otherwise will fetch Payouts. Defaults to `False`.
#### Response sample:
```json
{
"status": "success",
"payouts": [
{
"id": "88e5eacc-d5a5-4b8a-8133-e23136151b7c",
"status": "Done",
"total_requested": "0.6",
"total_with_fee": "0.606",
"total_fiat": "",
"fee": "0.006",
"coin": "polygon_matic",
"timestamp": "13/03/2024 17:48:39"
}
],
"num_pages": 1
}
```
### Get Payout Wallet
Gets your Payout Wallet for the specified `coin`. Can algo get the balance.
```python
from BlockBee import BlockBeeHelper
wallet = BlockBeeHelper.get_payout_wallet(coin, api_key, balance)
```
#### Where:
* ``coin`` The cryptocurrency you want to request the lists in (e.g `btc`, `eth`, `erc20_usdt`, ...).
* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).
* ``balance`` If `True` will also fetch the balance of the address.
#### Response sample:
```json
{
"address": "0x18B211A1Ba5880C7d62C250B6441C2400d588589",
"balance": "2.7"
}
```
### Create Payout with Payout Request ID(s)
With this function you can create a Payout in the `created` status by simply providing an array with the Payout Requests `ID`.
```python
from BlockBee import BlockBeeHelper
ids = [52211, 52212]
payout = BlockBeeHelper.create_payout_by_ids(api_key, payout_ids)
```
#### Where:
* ``payout_ids`` its an array with the Payout Requests `ID`.
#### Response sample:
```json
{
"status": "success",
"payout_info": {
"id": "88e5eacc-d5a5-4b8a-8133-e23136151b7c",
"status": "Created",
"from": "",
"requests": {
"0xA8EbeD50f2e05fB4a25b2DdCdc651A7CA769B5CF": "0.300000000000000000",
"0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d": "0.200000000000000000"
},
"total_requested": "0.5",
"total_with_fee": "0.505",
"total_fiat": "",
"fee": "0.005",
"coin": "bep20_usdt",
"txid": "",
"timestamp": "05/03/2024 15:00:00"
}
}
```
### Process Payout by ID
By default, a Payout when created will be in `created` state. With this function you may finish it using its `ID`.
```python
from BlockBee import BlockBeeHelper
payout = BlockBeeHelper.process_payout(api_key, payout_id)
```
#### Where:
* ``payout_id`` Its the `ID` of the Payout you wish to fulfill.
#### Response sample:
```json
{
"status": "success",
"queued": true
}
```
### Check the Payout status
Will return all important information regarding a Payout, specially its status.
```python
from BlockBee import BlockBeeHelper
payout_id = 51621
status = BlockBeeHelper.check_payout_status(api_key, payout_id)
```
#### Where:
* ``payout_id`` Its the `ID` of the Payout you wish to check.
#### Response sample:
```json
{
"status": "success",
"payout_info": {
"id": "88e5eacc-d5a5-4b8a-8133-e23136151b7c",
"status": "Done",
"from": "0x18B211A1Ba5880C7d62C250B6441C2400d588589",
"requests": {
"0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d": "0.500000000000000000",
"0x18B211A1Ba5880C7d62C250B6441C2400d588589": "0.100000000000000000"
},
"total_requested": "0.6",
"total_with_fee": "0.606",
"total_fiat": "",
"fee": "0.006",
"coin": "polygon_matic",
"txid": "0xf9aa1618a7e460f8c68b6a02369b5058282c53a4ee23f967abef0d35203f328c",
"timestamp": "13/03/2024 18:10:35"
}
}
```
## Help
Need help?
Contact us @ https://blockbee.io/contacts/
## Changelog
#### 1.0.0
* Initial Release
#### 1.0.1
* Minor fixes
#### 1.0.2
* Minor fixes
#### 1.0.3
* Fix import
* Minor fixes
#### 1.1.0
* Added Payouts
* Minor bugfixes
#### 1.1.1
* Minor bugfixes
#### 2.0.0
* Automated Payouts
* Support to BlockBee Checkout page
* Various improvements
#### 2.0.1
* Minor bugfixes
#### 2.1.0
* Minor bugfixes
* Improve error handling
#### 2.1.1
* Minor improvements
### Breaking Changes
#### 2.0.0
* `create_payout` parameters were changed and will require you to update your code.
Raw data
{
"_id": null,
"home_page": "https://github.com/blockbee-io/python-blockbee",
"name": "python-blockbee",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "BlockBee",
"author_email": "info@blockbee.io",
"download_url": "https://files.pythonhosted.org/packages/6f/87/6947eff41b7a60858eb85c289b85d0c613f604b98a90704f3db01b675dc5/python-blockbee-2.1.1.tar.gz",
"platform": null,
"description": "[<img src=\"https://blockbee.io/static/assets/images/blockbee_logo_nospaces.png\" width=\"300\"/>](image.png)\n\n# BlockBee's Python Library\nPython implementation of BlockBee's payment gateway\n\n## Table of Contents\n1. [Requirements](#requirements)\n2. [Installation](#installation)\n3. [API and utils](#api-and-utils)\n4. [Checkout](#checkout)\n5. [Payouts](#payouts)\n6. [Help](#help)\n7. [Changelog](#changelog)\n\n## Requirements:\n\n```\nPython >= 3.0\nRequests >= 2.20\n```\n\n## Installation\n\n```shell script\npip install python-blockbee\n```\n\n[on pypi](https://pypi.python.org/pypi/python-blockbee)\nor\n[on GitHub](https://github.com/blockbee-io/python-blockbee)\n\n## API and utils\n\n### Importing in your project file\n\n```python\nfrom blockbee import BlockBeeHelper\n```\n\n### Generating a new Address\n\n```python\nfrom blockbee import BlockBeeHelper\n\nbb = BlockBeeHelper(coin, own_address, callback_url, parameters, bb_params, api_key)\n\naddress = bb.get_address()['address_in']\n```\n\n#### Where:\n\n* ``coin`` is the coin you wish to use, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...).\n* ``own_address`` is your own crypto address, where your funds will be sent to.\n* ``callback_url`` is the URL that will be called upon payment.\n* ``params`` is any parameter you wish to send to identify the payment, such as `{orderId: 1234}`.\n* ``bb_params`` parameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/create).\n* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).\n* ``address`` is the newly generated address, that you will show your users in order to receive payments.\n\n#### Response sample: \n\n```\n0x0E945b1554c8029A6B9bE1F7A24ae75d2F44d8DB\n```\n\n### Getting notified when the user pays\n\n> Once your customer makes a payment, BlockBee will send a callback to your `callbackUrl`. This callback information is by default in ``GET`` but you can se it to ``POST`` by setting ``post: 1`` in ``blockbeeParams``. The parameters sent by BlockBee in this callback can be consulted here: https://docs.blockbee.io/#operation/confirmedcallbackget\n\n### Checking the logs of a request\n\n```python\n\nfrom blockbee import BlockBeeHelper\n\nbb = BlockBeeHelper(coin, own_address, callback_url, parameters, bb_params, api_key)\n\ndata = bb.get_logs()\n```\n> Same parameters as before, the ```data``` returned can b e checked here: https://docs.blockbee.io/#operation/logs\n\n#### Response sample: \n\n```json\n{\n \"status\": \"success\",\n \"callback_url\": \"https://example.com/?order_id=1235\",\n \"address_in\": \"0x58e90D31530A5566dA97e34205730323873eb88B\",\n \"address_out\": \"0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d\",\n \"notify_pending\": false,\n \"notify_confirmations\": 1,\n \"priority\": \"default\",\n \"callbacks\": []\n}\n```\n\n### Generating a QR code\n\n```python\nfrom blockbee import BlockBeeHelper\n\nbb = BlockBeeHelper(coin, own_address, callback_url, parameters, bb_params, api_key)\n\nqr_code = bb.get_qrcode(value, size)\n```\nFor object creation, same parameters as before. You must first call ``getAddress` as this method requires the payment address to have been created.\n\n#### Where:\n\n* ``value`` is the value requested to the user in the coin to which the request was done. **Optional**, can be empty if you don't wish to add the value to the QR Code.\n* ``size`` Size of the QR Code image in pixels. Optional, leave empty to use the default size of 512.\n\n> Response is an object with `qr_code` (base64 encoded image data) and `payment_uri` (the value encoded in the QR), see https://docs.blockbee.io/#operation/qrcode for more information.\n\n#### Response sample:\n```json\n{\n \"status\": \"success\",\n \"qr_code\": \"iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAYeklEQVR4nO3daZQdZZkH8Od5q+quvXenO3tCQtg3WQLDOiwi4FEGRA96RhkRlEUd9cw5Ojif/DTOHEcF4YAwntFRhBEHBPWoKAECGNnXSICQBEL23m/fvkvV+8yHut3pEPoSaop6qjv/3wcOSbrurVv3/vutW8/7vMUiQgCgx2jvAMD+DiEEUIYQAihDCAGUIYQAyhBCAGUIIYAyhBBAmdvk35g5sf2IS4S5BxFe5nTPEu8Ri3ceRYwvM9qjRXiWBJ49MU1eJkZCAGUIIYAyhBBAGUIIoAwhBFCGEAIoQwgBlDWrE05HvQ9YvRw33Q4kU1iL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2Nt1YegXpFOALsWDI3fsZICKAMIQRQhhACKEMIAZQhhADKEEIAZQghgDKEEEBZlGJ9EzEWvhMryMa4Ane8dX/1lQ1wBCKIUN/HSAigDCEEUIYQAihDCAGUIYQAyhBCAGUIIYCymOuEqZXMms2JLbOdTAEt3lJtjPXYeMV7MCPsM0ZCAGUIIYAyhBBAGUIIoAwhBFCGEAIoQwgBlCGEAMr2l2J9vOItIiezzHMyNxKPMMFA/QbX6guNYyQEUIYQAihDCAGUIYQAyhBCAGUIIYAyhBBAGSdT2IlXMh26EUQ7MjGW49K8Wm4yTb3qtU0s/gsw8yCEAMoQQgBlCCGAMoQQQBlCCKAMIQRQhhACKItSrE8z3fKuet05AvVVw5PpkI79iWKEkRBAGUIIoAwhBFCGEAIoQwgBlCGEAMoQQgBlzeqEAJAAjIQAyhBCAGUIIYAyhBBAGUIIoAwhBFCGEAIoQwgBlP0fDDJ0PYOZxyEAAAAASUVORK5CYII=\",\n \"payment_uri\": \"0x0E945b1554c8029A6B9bE1F7A24ae75d2F44d8DB\"\n}\n```\n\n#### Usage\n```\n<img src={`data:image/png;base64,{{qr_code}}`}/>\n```\n\n### Estimating transaction fees\n\n```python\nfrom blockbee import BlockBeeHelper\n\nfees = BlockBeeHelper.get_estimate(coin, addresses, priority)\n```\n\n#### Where: \n* ``coin`` is the coin you wish to check, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...)\n* ``addresses`` The number of addresses to forward the funds to. Optional, defaults to 1.\n* ``priority`` Confirmation priority, (check [this](https://support.blockbee.io/article/how-the-priority-parameter-works) article to learn more about it). Optional, defaults to ``default``.\n\n> Response is an object with ``estimated_cost`` and ``estimated_cost_usd``, see https://docs.blockbee.io/#operation/estimate for more information.\n\n#### Response sample:\n\n```json\n{\n \"status\": \"success\",\n \"estimated_cost\": \"0.00637010\",\n \"estimated_cost_currency\": {\n \"AED\": \"0.03\",\n \"AUD\": \"0.01\",\n \"BGN\": \"0.01\",\n \"BRL\": \"0.04\"\n }\n}\n```\n\n### Converting between coins and fiat\n\n```python\nfrom blockbee import BlockBeeHelper\n\nbb = BlockBeeHelper(coin, own_address, callback_url, params, bb_params, api_key)\n\nconversion = bb.get_conversion(value, from_coin)\n```\n\n#### Where:\n\n* ``coin`` the target currency to convert to, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...)\n* ``value`` value to convert in `from`.\n* ``from_coin`` currency to convert from, FIAT or crypto.\n\n> Response is an object with ``value_coin`` and ``exchange_rate``, see https://docs.blockbee.io/#operation/convert for more information.\n\n#### Response sample:\n\n```json\n{ \n \"status\": \"success\", \n \"value_coin\": \"241.126\", \n \"exchange_rate\": \"0.803753\"\n}\n```\n\n### Getting supported coins\n\n```python\nfrom blockbee import BlockBeeHelper\n\nsupportedCoins = BlockBeeHelper.get_supported_coins()\n```\n\n> Response is an array with all supported coins.\n\n#### Response sample:\n\n```json\n{\n \"btc\": {\n \"coin\": \"Bitcoin\",\n \"logo\": \"https://api.cryptapi.io/media/token_logos/btc.png\",\n \"ticker\": \"btc\",\n \"minimum_transaction\": 8000,\n \"minimum_transaction_coin\": \"0.00008000\",\n \"minimum_fee\": 546,\n \"minimum_fee_coin\": \"0.00000546\",\n \"fee_percent\": \"1.000\",\n \"network_fee_estimation\": \"0.00002518\"\n },\n \"bch\": {\n \"coin\": \"Bitcoin Cash\",\n \"logo\": \"https://api.cryptapi.io/media/token_logos/bch.png\",\n \"ticker\": \"bch\",\n \"minimum_transaction\": 50000,\n \"minimum_transaction_coin\": \"0.00050000\",\n \"minimum_fee\": 546,\n \"minimum_fee_coin\": \"0.00000546\",\n \"fee_percent\": \"1.000\",\n \"network_fee_estimation\": \"0.00000305\"\n }\n}\n```\n\n## Checkout\n\n### Requesting Payment\n\n```python\nfrom BlockBee import BlockBeeCheckoutHelper\n\nbb = BlockBeeCheckoutHelper(api_key, params, bb_params)\n\npayment_page = bb.payment_request(redirect_url, value)\n```\n\n#### Where:\n* ``api_key`` is the API Key provided by our [Dashboard](https://dash.blockbee.io/).\n* ``params`` is any parameter you wish to send to identify the payment, such as `{'order_id': 1234}`.\n* ``bb_params`` parameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/create).\n* ``redirect_url`` URL in your platform, where the user will be redirected to following the payment. Should be able to process the payment using the `success_token`.\n* ``value`` amount in currency set in Payment Settings you want to receive from the user.\n\n#### Getting notified when the user completes the Payment\n> When receiving payments, you have the option to receive them in either the ``notify_url`` or the ``redirect_url``, but adding the ``redirect_url`` is required (refer to our documentation at https://docs.blockbee.io/#operation/paymentipn).\n\n#### Payment samples:\n```json\n{\n \"status\": \"success\",\n \"success_token\": \"G4asA2xwEr0UeY2IZqlZjX3IYrNofmnIAkzHPAoxmpmlYP9ZLTvQUolKN0X27Z0B\",\n \"payment_url\": \"https://pay.blockbee.io/payment/OcRrZGsKQFGsoi0asqZkr97WbitMxFMb/\",\n \"payment_id\": \"OcRrZGsKQFGsoi0asqZkr97WbitMxFMb\"\n}\n```\n\n### Payment Logs\n\nFetch Payment information and IPN logs.\n\n```python\nfrom BlockBee import BlockBeeCheckoutHelper\n\nlogs = BlockBeeCheckoutHelper.payment_logs(token, api_key)\n```\n\n#### Where:\n\n* ```token``` is the `payment_id` returned by the payment creation endpoint.\n* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).\n\n#### Response sample:\n\n```json\n{\n \"status\": \"success\",\n \"is_paid\": false,\n \"is_pending\": false,\n \"is_expired\": false,\n \"is_partial\": false,\n \"payment_data\": [\n {\n \"value\": \"0.000137\",\n \"value_paid\": \"0\",\n \"value_outstanding\": \"0.000137\",\n \"exchange_rate\": \"0.0000137489\",\n \"coin\": \"btc\",\n \"txid\": []\n }\n ],\n \"notifications\": []\n}\n```\n\n### Requesting Deposit\n```python\nfrom BlockBee import BlockBeeCheckoutHelper\n\nbb = BlockBeeCheckoutHelper(api_key, params, bb_params)\n\ndeposit_page = bb.deposit_request(notify_url)\n```\n\n#### Where:\n* ``api_key`` is the API Key provided by our [Dashboard](https://dash.blockbee.io/).\n* ``params`` is any parameter you wish to send to identify the payment, such as `{'order_id': 1234}`.\n* ``bb_params`` parameters that will be passed to BlockBee (check which extra parameters are available here: https://docs.blockbee.io/#operation/deposit).\n* ``notify_url`` URL in your platform, where the IPN will be sent notifying that a deposit was done. Parameters are available here: https://docs.blockbee.io/#operation/depositipn.\n\n#### Response sample:\n```json\n{\n \"status\": \"success\",\n \"payment_url\": \"https://pay.blockbee.io/deposit/jv12du8IWqS96WVDjZK2J285WOBOBycc/\",\n \"payment_id\": \"jv12du8IWqS96WVDjZK2J285WOBOBycc\"\n}\n```\n\n### Deposit Logs\n\nFetch Deposit information and IPN logs.\n\n```python\nfrom BlockBee import BlockBeeCheckoutHelper\n\nlogs = BlockBeeCheckoutHelper.deposit_logs(token, api_key)\n```\n\n#### Where:\n\n* ```token``` is the `payment_id` returned by the deposit creation endpoint.\n* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).\n\n#### Response sample:\n\n```json\n{\n \"status\": \"success\",\n \"deposits\": [],\n \"total_deposited\": \"0\",\n \"currency\": \"USDT\",\n \"notifications\": []\n}\n```\n\n## Payouts\n\n### Create Payout / Payout Request\n\nThis function can be used by you to create [Payouts](https://docs.blockbee.io/#tag/Payouts).\n\n```python\nfrom BlockBee import BlockBeeHelper\n\ncoin = 'polygon_matic'\n\nrequests = {\n '0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d': 0.5,\n '0x18B211A1Ba5880C7d62C250B6441C2400d588589': 0.1\n}\n\ncreate_payout = BlockBeeHelper.create_payout(coin, payout_requests, api_key, process)\n```\n\n#### Where:\n* ``coin`` The cryptocurrency you want to request the Payout in (e.g `btc`, `eth`, `erc20_usdt`, ...).\n* ``requests`` Address(es) together with the amount that must be sent.\n* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).\n* ``process`` If the Payout Requests will be sent right away. Defaults to `False`. **Note**: if `True` will instantly queue the payouts to be sent to the destination addresses.\n\n#### Response sample:\n\nIf `process` is `false`.\n```json\n{\n \"status\": \"success\",\n \"request_ids\": [\n \"42d5245e-0a29-402a-9a7e-355e38f1d81d\",\n \"080a546e-4045-4c73-870c-4d9ec08c9cab\"\n ]\n}\n```\n\nIf `process` is `true`.\n```json\n{\n \"status\": \"success\",\n \"payout_info\": {\n \"id\": \"88e5eacc-d5a5-4b8a-8133-e23136151b7c\",\n \"status\": \"Pending Payment\",\n \"from\": \"0x18B211A1Ba5880C7d62C250B6441C2400d588589\",\n \"requests\": {\n \"0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d\": \"0.5\",\n \"0x18B211A1Ba5880C7d62C250B6441C2400d588589\": \"0.1\"\n },\n \"total_requested\": \"0.6\",\n \"total_with_fee\": \"0.603\",\n \"error\": \"None\",\n \"blockchain_fee\": 0,\n \"fee\": \"0.003\",\n \"coin\": \"bep20_usdt\",\n \"txid\": \"\",\n \"timestamp\": \"23/04/2024 11:13:49\"\n },\n \"queued\": true\n}\n```\n\n### List Payouts / Payout Requests\n\nList all Payouts or Payout Requests in your account.\n\n**Note:** If `requests` is `True` it will fetch a Payout Requests list.\n\n```python\nfrom BlockBee import BlockBeeHelper\n\ncreate_payout = BlockBeeHelper.list_payouts(coin, status, page, api_key, payout_request)\n```\n\n#### Where:\n* ``coin`` The cryptocurrency you want to request the lists in (e.g `btc`, `eth`, `erc20_usdt`, ...).\n* ``status`` The status of the Payout / Payout Request. Possible statuses are:\n * Payout Request: [`all`, `pending`, `rejected`, `processing`, `done`]\n * Payout: [`created`, `processing`, `done`, `error`]\n* ``page`` This endpoint is paginated and will show only `50` items per page. Defaults to `1`.\n* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).\n* ``payout_request`` If `True` will fetch Payout Requests, otherwise will fetch Payouts. Defaults to `False`.\n\n#### Response sample:\n\n```json\n{\n \"status\": \"success\",\n \"payouts\": [\n {\n \"id\": \"88e5eacc-d5a5-4b8a-8133-e23136151b7c\",\n \"status\": \"Done\",\n \"total_requested\": \"0.6\",\n \"total_with_fee\": \"0.606\",\n \"total_fiat\": \"\",\n \"fee\": \"0.006\",\n \"coin\": \"polygon_matic\",\n \"timestamp\": \"13/03/2024 17:48:39\"\n }\n ],\n \"num_pages\": 1\n}\n```\n\n### Get Payout Wallet\n\nGets your Payout Wallet for the specified `coin`. Can algo get the balance.\n\n```python\nfrom BlockBee import BlockBeeHelper\n\nwallet = BlockBeeHelper.get_payout_wallet(coin, api_key, balance)\n```\n\n#### Where:\n* ``coin`` The cryptocurrency you want to request the lists in (e.g `btc`, `eth`, `erc20_usdt`, ...).\n* ``api_key`` is the API Key provided by BlockBee's [dashboard](https://dash.blockbee.io/).\n* ``balance`` If `True` will also fetch the balance of the address.\n\n#### Response sample:\n```json\n{\n \"address\": \"0x18B211A1Ba5880C7d62C250B6441C2400d588589\",\n \"balance\": \"2.7\"\n}\n```\n\n### Create Payout with Payout Request ID(s)\n\nWith this function you can create a Payout in the `created` status by simply providing an array with the Payout Requests `ID`.\n\n```python\nfrom BlockBee import BlockBeeHelper\n\nids = [52211, 52212]\n\npayout = BlockBeeHelper.create_payout_by_ids(api_key, payout_ids)\n```\n\n#### Where:\n* ``payout_ids`` its an array with the Payout Requests `ID`.\n\n#### Response sample:\n\n```json\n{\n \"status\": \"success\",\n \"payout_info\": {\n \"id\": \"88e5eacc-d5a5-4b8a-8133-e23136151b7c\",\n \"status\": \"Created\",\n \"from\": \"\",\n \"requests\": {\n \"0xA8EbeD50f2e05fB4a25b2DdCdc651A7CA769B5CF\": \"0.300000000000000000\",\n \"0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d\": \"0.200000000000000000\"\n },\n \"total_requested\": \"0.5\",\n \"total_with_fee\": \"0.505\",\n \"total_fiat\": \"\",\n \"fee\": \"0.005\",\n \"coin\": \"bep20_usdt\",\n \"txid\": \"\",\n \"timestamp\": \"05/03/2024 15:00:00\"\n }\n}\n```\n\n### Process Payout by ID\n\nBy default, a Payout when created will be in `created` state. With this function you may finish it using its `ID`.\n\n```python\nfrom BlockBee import BlockBeeHelper\n\npayout = BlockBeeHelper.process_payout(api_key, payout_id)\n```\n\n#### Where:\n\n* ``payout_id`` Its the `ID` of the Payout you wish to fulfill.\n\n#### Response sample:\n\n```json\n{ \n \"status\": \"success\", \n \"queued\": true\n}\n```\n\n### Check the Payout status\n\nWill return all important information regarding a Payout, specially its status.\n\n```python\nfrom BlockBee import BlockBeeHelper\n\npayout_id = 51621\n\nstatus = BlockBeeHelper.check_payout_status(api_key, payout_id)\n```\n\n#### Where:\n\n* ``payout_id`` Its the `ID` of the Payout you wish to check.\n\n#### Response sample:\n\n```json\n{\n \"status\": \"success\",\n \"payout_info\": {\n \"id\": \"88e5eacc-d5a5-4b8a-8133-e23136151b7c\",\n \"status\": \"Done\",\n \"from\": \"0x18B211A1Ba5880C7d62C250B6441C2400d588589\",\n \"requests\": {\n \"0xA6B78B56ee062185E405a1DDDD18cE8fcBC4395d\": \"0.500000000000000000\",\n \"0x18B211A1Ba5880C7d62C250B6441C2400d588589\": \"0.100000000000000000\"\n },\n \"total_requested\": \"0.6\",\n \"total_with_fee\": \"0.606\",\n \"total_fiat\": \"\",\n \"fee\": \"0.006\",\n \"coin\": \"polygon_matic\",\n \"txid\": \"0xf9aa1618a7e460f8c68b6a02369b5058282c53a4ee23f967abef0d35203f328c\",\n \"timestamp\": \"13/03/2024 18:10:35\"\n }\n}\n```\n\n## Help\n\nNeed help? \nContact us @ https://blockbee.io/contacts/\n\n\n## Changelog\n\n#### 1.0.0\n* Initial Release\n\n#### 1.0.1\n* Minor fixes\n\n#### 1.0.2\n* Minor fixes\n\n#### 1.0.3\n* Fix import\n* Minor fixes\n\n#### 1.1.0\n* Added Payouts\n* Minor bugfixes\n\n#### 1.1.1\n* Minor bugfixes\n\n#### 2.0.0\n* Automated Payouts\n* Support to BlockBee Checkout page\n* Various improvements\n\n#### 2.0.1\n* Minor bugfixes\n\n#### 2.1.0\n* Minor bugfixes\n* Improve error handling\n\n#### 2.1.1\n* Minor improvements\n\n### Breaking Changes\n\n#### 2.0.0\n* `create_payout` parameters were changed and will require you to update your code.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python Library for BlockBee payment gateway",
"version": "2.1.1",
"project_urls": {
"Homepage": "https://github.com/blockbee-io/python-blockbee"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f876947eff41b7a60858eb85c289b85d0c613f604b98a90704f3db01b675dc5",
"md5": "cd98decc6a426d942bcf60d9ed9bef75",
"sha256": "a315b83c5a8a5682bbadeb157c917eed6b455994c434bb1ab170a2d6a75c3825"
},
"downloads": -1,
"filename": "python-blockbee-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "cd98decc6a426d942bcf60d9ed9bef75",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26548,
"upload_time": "2024-12-11T15:10:08",
"upload_time_iso_8601": "2024-12-11T15:10:08.000912Z",
"url": "https://files.pythonhosted.org/packages/6f/87/6947eff41b7a60858eb85c289b85d0c613f604b98a90704f3db01b675dc5/python-blockbee-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-11 15:10:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "blockbee-io",
"github_project": "python-blockbee",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.32.0"
]
]
}
],
"lcname": "python-blockbee"
}