Skip to main content

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

Documentation

Project details


Release history Release notifications | RSS feed

This version

1.0

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)

Uploaded Source

Built Distribution

basqet_python-1.0-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

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