Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Troubleshooting Node.js Apps
      • Working with Node.js
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • Working with PHP
      • PHP Behavior in Heroku
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
    • Heroku Inference
      • Inference API
      • Quick Start Guides
      • Inference Essentials
      • AI Models
    • Vector Database
    • Model Context Protocol
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Extending Heroku
  • Building Add-ons
  • What Is an Add-on?

What Is an Add-on?

English — 日本語に切り替える

Last updated May 30, 2024

Table of Contents

  • The add-on provisioning flow
  • Interacting with an add-on
  • Updating config var values
  • The add-on dashboard

This article is for developers interested in creating add-ons for Heroku’s add-on marketplace. For information on using add-ons in your Heroku app, see Add-ons.

Add-ons are cloud services that extend Heroku apps with useful features and services, such as:

  • Data stores
  • Logging
  • Monitoring
  • Content management

An add-on interacts with a Heroku app in one or more of the following ways:

  • It sets one or more config vars in the app with values necessary to communicate with the add-on. These values typically include the cloud service’s URL and any credentials necessary to access that URL.
  • It reads or writes to the app’s logs.
  • It uses the Heroku Platform API for Partners to perform app management actions (such as dyno scaling) on behalf of the app’s developer.

Every add-on has one or more plans. Each plan has its own price and associated set of features. When a developer provisions an add-on, they choose which plan they want, and they can change their choice at any time. Billing for add-ons is integrated into standard monthly Heroku billing.

The add-on provisioning flow

Developers use the Heroku Elements Marketplace or the Heroku CLI to provision an add-on for their app. When this happens, Heroku sends a request to the add-on, and the add-on allocates a new resource for the app. This resource represents the association between the app and the add-on:

Add-on Overview

The following sections describe the provisioning flow in greater detail:

Step 1: The developer initiates provisioning

Provision Step 1

The provisioning process begins when a developer finds your add-on in the add-ons catalog and clicks the Install button. Alternatively, they can use the Heroku CLI:

$ heroku addons:create addon-name

Step 2: Heroku requests service provisioning

Provision Step 2

The structure of the resource(s) your add-on provisions depends on the type of service you’re providing.

In almost every case, you should provision a user account. If you’re developing a data store add-on, you’ll probably also immediately provision a new database resource. An exception-reporting service might provision a unique API key in addition to typical user credentials.

Step 3: The add-on returns a resource URL

Provision Step 3

After the resource is provisioned, your add-on responds with a URL that the app can use to access its associated resource.

For example, a database partner like Amazon RDS might return the following URL:

MYSQL_URL=mysql://user:pass@mysqlhost.net/database

A general partner such as New Relic might return a typical HTTPS URL, like so:

NEW_RELIC_URL=https://newrelic.com/accounts/[apitoken]

Step 4: Heroku rebuilds the app

Provision Step 4

Heroku adds your add-on’s returned URL to the app as a config var. It then rebuilds the app and restarts all of its dynos.

The Heroku app is now ready to consume the resource your add-on has provisioned for it.

Interacting with an add-on

Consume Step 1

A Heroku app interacts with an add-on at different times and in different ways depending on the add-on’s purpose. For example, a Heroku web app might want to consume an add-on’s database resource to fetch all associated records for a particular table view.

Step 1: The app accesses its resource URL

Consume Step 2

The app accesses the add-on resource with the URL that was stored as a config var during the provisioning flow.

Datastore resources (such as MySQL, MongoDB, or Memcache) have their own protocol and use a client library such as ActiveRecord, MongoMapper, or MemcacheClient to access the resource. These URLs for these resources start with the appropriate protocol (mysql://, mongo://, memcache://, and so on).

Web service resources (such as Exceptional or New Relic) use https:// as their protocol.

Step 2: The add-on resource responds

Consume Step 3

Your add-on’s resource can now process the incoming request from the app, assuming its credentials are valid.

If the request is a read request (such as a SQL SELECT or an HTTP GET), the resource looks up the requested information to return to the app.

If the request is a write request (such as a SQL INSERT or an HTTP POST), the resource stores the payload included in the request and returns an acknowledgment.

After the app receives your resource’s response, it can use it however is appropriate for its current task.

Updating config var values

An add-on can update the values of config vars it’s set for an app at any time. This is helpful for use cases such as refreshing an expired or compromised credential.

An add-on cannot access config vars that were not created by that add-on.

The add-on dashboard

Every Heroku add-on has its own dashboard that customers can access from the Heroku Dashboard or the Heroku CLI. Your add-on’s dashboard should provide whatever information and configuration options are applicable to the service you provide.

When a customer accesses your add-on’s dashboard, Heroku uses single sign-on (SSO) to confirm the customer’s identity to your app. This lets you log the associated user in automatically to provide a seamless experience.

The single sign-on flow

When customer performs an action to open your add-on’s dashboard from the Heroku Dashboard or CLI, Heroku generates a single sign-on token using your resource’s ID, the current time, and your add-on’s salt (a secret shared between Heroku and your add-on).

It then sends a POST request to your add-on with the following format:

POST https://yourcloudservice.net/sso/login
id=123&token=4af1e20905361a570&timestamp=1267592469&user@example.com

Your add-on can then confirm that the token matches and the timestamp is fresh. You can set a cookie in the customer’s browser to indicate that they are authenticated, then redirect them to their add-on dashboard.

Logging users in via SSO

You can also use Heroku SSO to create customer-specific URLs that direct users to their dashboard automatically.

SSO URLs have the following format:

https://addons-sso.heroku.com/apps/:app_uuid/addons/:addon_uuid

The value of the addon_uuid parameter is the UUID provided in the customer’s original provision request.

The value of the app_uuid parameter can be retrieved using a Platform API Add-on Info request.

An example SSO URL looks like this:

https://addons-sso.heroku.com/apps/c0e83e46-9803-46bd-86ca-e7e40a8cce8d/addons/c2aef419-7834-405b-8c28-f014d4fecde7

You can include additional information in SSO URLs as query parameters. These keys and values are submitted alongside the rest of the customer’s data via SSO POST. This allows you to set relevant state or context for the user within your dashboard

For example, this SSO URL adds the custom query parameter issue_no:

https://addons-sso.heroku.com/apps/:app_uuid/addons/:addon_uuid?issue_no=42

Next: Building an Add-on

Keep reading

  • Building Add-ons

Feedback

Log in to submit feedback.

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices