Analytics-o-matic, a sample app for demoing the OAuth functionality in GoCardless Pro

GoCardless OAuth Demo App

A simple demo of using the GoCardless Pro OAuth API to connect one's GoCardless account to a third-party application.

A public instance of this app for use as a demo runs on Heroku at

Running Locally

  git clone
  cd oauth-demo
  cp .env.example .env
  $EDITOR .env
  # Update the .env file wih your authentication details (see below for help)
  bundle exec rackup

Then open http://localhost:9292/


  • GOCARDLESS_CLIENT_ID: The client_id of your GoCardless app
  • GOCARDLESS_CLIENT_SECRET: The client_secret of your GoCardless app
  • GOCARDLESS_CONNECT_URL: The URL at which the GoCardless OAuth flow is available ( or
  • GOCARDLESS_CONNECT_AUTHORIZE_PATH: The path to the authorize endpoint (/oauth/authorize)
  • GOCARDLESS_CONNECT_ACCESS_TOKEN_PATH The path to the authorize endpoint (/oauth/access_token)
  • GOCARDLESS_API_URL: The URL at which the GoCardless Pro API is available ( or
  • SESSION_SECRET: A random string for securing session data
  • REDIRECT_URI: The redirect URI of your GoCardless app. (http://localhost:9292/analytics if running locally with bundle exec rackup)