Skip to content

Developers: Donation Links

oznu edited this page Aug 7, 2020 · 16 revisions

This feature is not yet released.


Plugin developers who have had their plugin Verified by Homebridge can display a Donate button next to their plugin when displayed in the Homebridge UI:

When clicked, a modal is displayed showing the donation options you have defined:

Eligibility

For your plugin to display a Donate link, it must:

Why

As more users install their plugins through the Homebridge UI, they are less likely to visit the projects GitHub page where the ways to support a developer would typically be displayed. Adding donation links directly in the Homebridge UI ensures users know how to support Homebridge developers if they wish to do so.

How

The donation links use the existing, optional, package.json funding attribute.

In your plugins package.json add the "funding" attribute in one of the following ways ("type" can be anything):

Single donation option:

"funding": {
  "type" : "github",
  "url" : "https://github.com/sponsors/my-account"
}
"funding": {
  "type" : "paypal",
  "url" : "https://paypal.me/my-account"
}
"funding": {
  "type" : "patreon",
  "url" : "https://www.patreon.com/my-account"
}

Multiple donation options:

"funding": [
  {
    "type" : "github",
    "url" : "https://github.com/sponsors/my-account"
  },
  {
    "type" : "patreon",
    "url" : "https://www.patreon.com/my-account"
  }
]
Clone this wiki locally