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 hashes)
Built Distribution
Close
Hashes for basqet_python-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7395fc1f10cbd1f0e66437031eed1f712a79ac49f55a047c20fe3bf86f72d29 |
|
MD5 | 411ff033ccc8984ae55087c43e03278f |
|
BLAKE2b-256 | 3f78c578b20dc492df1456dc561b5903fa45067e35d4db287b1d65b2ea9747ae |