A python library to consume Basqet API
Project description
Basqet Python SDK
The Official Python library for the Basqet API.
Installation
Install Python
pip install basqet-python
Usage/Examples
Fetch Available currency
from basqet import BasqetClient
basqet = BasqetClient("pub_test_Y4oKBXgfTU1JbJiHeGFc66rc1FFivg-",
"sec_test_eOX9Tp7z-EgK6sw9ijghAWqC9xR_rP0",)
# Fetch all fiat currency
currencies = basqet.fetch_all_currency("FIAT")
Initialize transaction
from basqet import BasqetClient
basqet = BasqetClient("pub_test_Y4oKBXgfTU1JbJiHeGFc66rc1FFivg-",
"sec_test_eOX9Tp7z-EgK6sw9ijghAWqC9xR_rP0",)
payment_data = {
"customer": {
"name": "tunde",
"email": "customer@example.com"
},
"amount": "1000",
"currency": "NGN",
"meta": {
"reference": "bghggbbvv"
}
}
transaction_obj = basqet.initialize_transaction(payment_data);
Initiate transaction
from basqet import BasqetClient
basqet = BasqetClient("pub_test_Y4oKBXgfTU1JbJiHeGFc66rc1FFivg-",
"sec_test_eOX9Tp7z-EgK6sw9ijghAWqC9xR_rP0",)
transaction_obj = basqet.initiate_transaction(<transactionId>, {'currency_id': <currency_id>})
Verify transaction
from basqet import BasqetClient
basqet = BasqetClient("pub_test_Y4oKBXgfTU1JbJiHeGFc66rc1FFivg-",
"sec_test_eOX9Tp7z-EgK6sw9ijghAWqC9xR_rP0",)
transaction_obj = basqet.verify_transaction(<transactionId>)
Mock webhook events
from basqet import BasqetClient
basqet = BasqetClient("pub_test_Y4oKBXgfTU1JbJiHeGFc66rc1FFivg-",
"sec_test_eOX9Tp7z-EgK6sw9ijghAWqC9xR_rP0",)
transaction_obj = basqet.mock_webhook_event(<transactionId>, { status: 'SUCCESSFUL' })
Documentation/API reference
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
basqet-python-1.0.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file basqet-python-1.0.tar.gz
.
File metadata
- Download URL: basqet-python-1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c75648584b171b8c743ebc7edd19d928c4b86e9f918cf7f5119c0df422d11908 |
|
MD5 | a70d94c6256e7c976880c3316f0c999d |
|
BLAKE2b-256 | 858dbe8135a34dbae9cc71948729137c56005165bc4dbb2e9cd1dfe98191664a |
File details
Details for the file basqet_python-1.0-py3-none-any.whl
.
File metadata
- Download URL: basqet_python-1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7395fc1f10cbd1f0e66437031eed1f712a79ac49f55a047c20fe3bf86f72d29 |
|
MD5 | 411ff033ccc8984ae55087c43e03278f |
|
BLAKE2b-256 | 3f78c578b20dc492df1456dc561b5903fa45067e35d4db287b1d65b2ea9747ae |