Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

a Django app for receiving payment notifications from Coinbase

Project description

a Django app for receiving payment notifications from Coinbase

Getting Started

This is a fairly simple app. It’s three parts:

  1. Webhook View
  2. Model to store the webhook received data
  3. Signal emitted on reciept/validation/storage of webhook data

First off, you’ll want to add django-coinbase to your requirements.txt and pip install it in your virtualenv. Next you’ll want to add coinbase to your INSTALLED_APPS setting of your file. Lastly, you’ll want to add a urls include to your main file for coinbase.urls.

There is a signal that you can setup a receiver for in your own project to do something with the callback data:

def handle_order_received(sender, order, **kwargs):
    pass  # do something with the order object, like enable a feature based on order.custom contents

You will want to set two different settings:


This is the API Key found at:


This is just a random key you make up and store in your settings and add to the querystring of the Instant Payment Notifications field (

This is the URL of your site + wherever you rooted the urls include + /cb/ followed with the querystring parameter secret followed by the value of this settings.

For example:

url(r"^payments/", include("coinbase.urls"))

COINBASE_SHARED_SECRET = "mysecretsauce"

>>> Site.objects.get_current().domain

# Your url would be


To run test suite:

$ pip install Django django-nose django-jsonfield mock requests
$ python

Commercial Support

This app, and many others like it, have been built in support of many of Eldarion’s own sites, and sites of our clients. We would love to help you on your next project so get in touch by dropping us a note at

Project details

Download files

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

Files for django-coinbase, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size django-coinbase-0.2.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page