Python SDK
Learn how to send and receive instant Bitcoin payments with Python and ZBD.
Prerequisites
To complete this guide, you will need the following:
- ZBD Project with a Live API key
- Python 3.8 or higher
1. Install the ZBD Python package
Install the official ZBD Python SDK from PyPI:
2. Send and receive Bitcoin
Get started with just a few lines of code. Here’s how to send a payment to any Lightning Address:
3. Create a payment request
Accept Bitcoin payments by creating a charge:
You’re looking for the data.invoice.request
property in the response. It starts with lnbc1
and is the payment request anyone in the Bitcoin Lightning Network can use to pay you.
Async Support
The SDK also supports async operations for better performance:
Next Steps
Ready to dive deeper? Check out these resources:
View SDK
Explore the source code and contribute to the SDK
PyPI Package
View the official Python package on PyPI with full documentation
Advanced Usage
For more advanced features like custom timeouts, retries, and raw response access, check out the full documentation on PyPI.