Since the official Coinbase Commerce API wrapper is no longer being actively updated and has become outdated, I decided to take the initiative to write my own and commit to keeping it up-to-date. commerce_coinbase
is a comprehensive Python library that simplifies interactions with the Coinbase Commerce API, enabling developers to easily integrate cryptocurrency payments into their applications. With commerce_coinbase
, you can create charges, list charges, cancel charges, and verify webhook signatures directly from your Python code.
- Create Charges: Quickly generate new charges for your products or services.
- List Charges: Retrieve a list of all created charges.
- Cancel Charges: Cancel pending charges.
- Verify Webhook Signatures: Ensure the integrity and origin of webhook events.
Install commerce_coinbase
via pip to get started:
pip install commerce-coinbase
Here's how to create a new charge using commerce_coinbase
:
from commerce_coinbase import CoinbaseCommerceAPI
# Initialize the API with your Coinbase Commerce API key
api = CoinbaseCommerceAPI(api_key="your_api_key_here")
# Create a new charge
response = api.create_charge(
name="Awesome T-Shirt",
description="Limited edition T-Shirt",
amount=20.00,
customer_id=1,
customer_name="Alice Bobson",
currency="USD"
)
print(response)
For more detailed information about the Coinbase Commerce API's capabilities, visit the official Coinbase Commerce API documentation.
More examples on how to use commerce_coinbase
can be found in the tests
directory.
Contributions to commerce_coinbase
are welcome! Please refer to the Contributing Guidelines for more information on how to contribute to the project.
commerce_coinbase
is made available under the GPL-3.0 License. For more details, see the LICENSE file in the repository.
If you encounter any issues or have questions about commerce_coinbase
, please file an issue on the GitHub issues page.
Thank you for considering commerce_coinbase
for your cryptocurrency payment needs. Happy coding!