This library was created to simplify the creation and receipt of payments from the Coinbase api, provided on the official website, in the Python programming language.
- Checking token validity
- Creating a bill for payment
- Information about the bill
Python version 3.2 or higher must be installed
pip install CoinbaseAPI
To get your Api key, you need to register in Coinbase Commecre and get your key by following this link
Every 5 seconds the code will check the payment:
from CoinbaseAPI import CoinbaseAPI
from time import sleep
api_key = "YOUR_API_KEY"
api = CoinbaseAPI(api_key)
payment = api.create_charge("Test title", "Test description", 5.00, "USD")
print(payment.url)
while True:
if payment.is_paid():
print("Payment is paid!")
break
sleep(5)
GNU General Public License (GPL)