Skip to content

A unofficial simple Python wrapper for the Coinbase Commerce API.

License

Notifications You must be signed in to change notification settings

MaxieDev/commerce_coinbase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coinbase Commerce

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.

Features

  • 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.

Installation

Install commerce_coinbase via pip to get started:

pip install commerce-coinbase

Getting Started

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)

Documentation

For more detailed information about the Coinbase Commerce API's capabilities, visit the official Coinbase Commerce API documentation.

Examples

More examples on how to use commerce_coinbase can be found in the tests directory.

Contributing

Contributions to commerce_coinbase are welcome! Please refer to the Contributing Guidelines for more information on how to contribute to the project.

License

commerce_coinbase is made available under the GPL-3.0 License. For more details, see the LICENSE file in the repository.

Support and Contact

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!