Skip to main content

Basic CoinGate API client

Project description

Simple API client for the CoinGate service.

Usage

from coingate.client import CoinGateClient, CoinGateOrder

# Create a client
# To use the production API, add env="live"
client = CoinGateClient("app_id", "api_key", "api_secret")

# Prepare an order
new_order = CoinGateOrder.new(
    "order-ID",
    10.5,
    "USD",
    "USD",
    callback_url='https://api.example.com/paymentcallback?token=randomtoken',
    cancel_url='https://www.example.com/ordercancelled',
    success_url='https://www.example.com/orderprocessed')

# Create the order
placed_order = client.create_order(new_order)

# Get the payment URL:
print(placed_order.payment_url)

# List orders :
orders = list(client.iterate_all_orders())

# Get an order by id:
order = orders[0].coingate_id

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
coingate-0.0.5-py2.py3-none-any.whl (7.5 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Mar 25, 2018
coingate-0.0.5.tar.gz (5.7 kB) Copy SHA256 hash SHA256 Source None Mar 25, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page