<h2>1. Demonstration</h2>

<p><img src="https://KristinitaTest.github.io/donate/Bitcoin-Donate-button.png" alt="Donate button"></p>

<p>Click to donate button on page:</p>

<p><strong><a href="https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/donate/README.md" rel="nofollow noreferrer">https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/donate/README.md</a></strong></p>

<p>Link must be opened in your Bitcoin client, example:</p>

<p><img src="https://i.sstatic.net/wOjeZ.png" alt="Electrum"></p>

<hr>

<h2>2. Relevance</h2>

<p>This answer is relevant for April 2018. In the future, the data of this answer may be obsolete.</p>

<hr>

<h2>3. Redirect</h2>

<p>You need to use redirect.</p>

<p>User click on <code>Donate</code> button → is redirected to <code>Bitcoin-Redirect</code> page in current tab → then opened bitcoin wallet of user → in current tab is opened page, on which <code>Donate</code> button is situated.</p>

<hr>

<h2>4. Details</h2>

<h3>4.1. Source of <code>Donate</code> button</h3>



<pre><code>[![Bitcoin Donate Button](https://i.sstatic.net/MnQ6V.png)](http://KristinitaTest.github.io/donate/Bitcoin-Redirect)
</code></pre>

<p>If you click the image, you will go to a page <strong><a href="http://KristinitaTest.github.io/donate/Bitcoin-Redirect" rel="nofollow noreferrer">http://KristinitaTest.github.io/donate/Bitcoin-Redirect</a></strong>. See <a href="https://meta.stackexchange.com/a/38917/326972"><strong>answer on Meta Stack Exchange</strong></a>, how use Markdown markup for this construction. Alternative worked HTML source:</p>



<pre><code>&lt;a href="http://KristinitaTest.github.io/donate/Bitcoin-Redirect"&gt;&lt;img src="https://i.sstatic.net/MnQ6V.png"&gt;&lt;/a&gt;
</code></pre>

<h3>4.2. Source of <code>Bitcoin-Redirect</code> page</h3>



<pre><code>&lt;script&gt;
window.location.href = "bitcoin:17uctxtsWG3gpyAy6iJ8AVd5rdSjkJH2?label=In%20the%20treatme0of%20Sasha's%20teeth&amp;amp;amount=0.0037";
history.back();
&lt;/script&gt;
</code></pre>

<p>Use JavaScript methods <a href="http://javascript.ru/window-location" rel="nofollow noreferrer"><strong>window.location.href</strong></a> and <a href="http://javascript.ru/window.history" rel="nofollow noreferrer"><strong>history.back</strong></a>.</p>

CC BY-SA 4.0
2021-12-17T14:57:20.573Z
Does this method also support lightning payments? 

(I am not sure whether, if one can also pay with lightning with ones Bitcoin client, and set that option as default, or whether that requires another manual step/a different client) 

In essence, are the default transaction fees for a donation using this method (currently) in the range of ~$0.04 or in the range of ~$13?
a.t.
CC BY-SA 4.0
2016-09-25T11:23:07.380Z
2018-12-29T18:41:10.060Z
2018-12-29T18:41:10.060Z
Саша Черных
<h2>1. Summary</h2>

<p>I would like to add a «Donate» Bitcoin button on my <code>README.md</code> file located on my GitHub repository.</p>

<hr>

<h2>2. Not helped</h2>

<h3>2.1. Manually button</h3>

<p>HTML-code using bitcoin protocol:</p>



<pre><code>&lt;a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amp;amount=0.0037"&gt;&lt;img src="https://www.drupal.org/files/project-images/bitcoindonate.png" alt="Bitcoin Donate Button"&gt;&lt;/a&gt;
</code></pre>

<p>It's work on HTML page of my GitHub Pages site, <a href="https://kristinitatest.github.io/donate/Bitcoin-HTML-Demo.html" rel="nofollow noreferrer"><strong>demonstration</strong></a>.</p>

<p>But in <code>.md</code> GitHub files not one <a href="https://meta.stackexchange.com/a/38917/326972"><strong>codes of Meta Stack Exchange answer</strong></a> not work for bitcoin protocol, <a href="https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/donate/Bitcoin-Protocol-Markdown.md" rel="nofollow noreferrer"><strong>demonstration</strong></a>.</p>



<pre><code>&lt;a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amp;amount=0.0037"&gt;&lt;img src="https://www.drupal.org/files/project-images/bitcoindonate.png" alt="Bitcoin Donate Button"&gt;&lt;/a&gt;

[**![Bitcoin Donate Button**](https://www.drupal.org/files/project-images/bitcoindonate.png)](bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amp;amount=0.0037)

&lt;a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amp;amount=0.0037"&gt;![Bitcoin Donate Button](https://www.drupal.org/files/project-images/bitcoindonate.png)&lt;/a&gt;
</code></pre>

<h3>2.2. Third-party</h3>

<p><a href="https://stackoverflow.com/a/21340902/5951529"><strong>JavaScript not supported on GitHub README.md pages</strong></a>. By this reason doesn't help me:</p>

<ul>
<li><a href="http://bitcoinate.org/" rel="nofollow noreferrer"><strong>Bitcoinate</strong></a></li>
<li><a href="https://github.com/danielquinn/bitcoin-donate" rel="nofollow noreferrer"><strong>Bitcoin donate</strong></a></li>
<li><a href="http://wayback.archive.org/web/20130621033546/http://leo.bogert.de/2012/02/22/simple-bitcoin-donate-button/" rel="nofollow noreferrer"><strong>Leo Bogert simple button</strong></a></li>
</ul>

<protocol><donation>
Adding «Donate» Bitcoin button in README.md file GitHub repository
Саша Черных
# Adding «Donate» Bitcoin button in README.md file GitHub repository

(Asked by: username_0 on 2016-09-21)

## 1. Summary

I would like to add a «Donate» Bitcoin button on my `README.md` file located on my GitHub repository.

---

## 2. Not helped

### 2.1. Manually button

HTML-code using bitcoin protocol:

```
<a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amount=0.0037"><img src="https://www.drupal.org/files/project-images/bitcoindonate.png" alt="Bitcoin Donate Button"></a>

```

It's work on HTML page of my GitHub Pages site, [**demonstration**](https://kristinitatest.github.io/donate/Bitcoin-HTML-Demo.html).

But in `.md` GitHub files not one [**codes of Meta Stack Exchange answer**](https://meta.stackexchange.com/a/38917/326972) not work for bitcoin protocol, [**demonstration**](https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/donate/Bitcoin-Protocol-Markdown.md).

```
<a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amount=0.0037"><img src="https://www.drupal.org/files/project-images/bitcoindonate.png" alt="Bitcoin Donate Button"></a>

[**![Bitcoin Donate Button**](https://www.drupal.org/files/project-images/bitcoindonate.png)](bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amount=0.0037)

<a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amount=0.0037">![Bitcoin Donate Button](https://www.drupal.org/files/project-images/bitcoindonate.png)</a>

```

### 2.2. Third-party

[**JavaScript not supported on GitHub README.md pages**](https://stackoverflow.com/a/21340902/5951529). By this reason doesn't help me:

* [**Bitcoinate**](http://bitcoinate.org/)
* [**Bitcoin donate**](https://github.com/danielquinn/bitcoin-donate)
* [**Leo Bogert simple button**](http://wayback.archive.org/web/20130621033546/http://leo.bogert.de/2012/02/22/simple-bitcoin-donate-button/)

**Tags:** protocol, donation


---

## 1 answers

### Answer by username_0 on 2016-09-25. Score: 5 | Accepted answer

## 1. Demonstration

![Donate button](https://KristinitaTest.github.io/donate/Bitcoin-Donate-button.png)

Click to donate button on page:

**<https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/donate/README.md>**

Link must be opened in your Bitcoin client, example:

![Electrum](https://i.sstatic.net/wOjeZ.png)

---

## 2. Relevance

This answer is relevant for April 2018. In the future, the data of this answer may be obsolete.

---

## 3. Redirect

You need to use redirect.

User click on `Donate` button → is redirected to `Bitcoin-Redirect` page in current tab → then opened bitcoin wallet of user → in current tab is opened page, on which `Donate` button is situated.

---

## 4. Details

### 4.1. Source of `Donate` button

```
[![Bitcoin Donate Button](https://i.sstatic.net/MnQ6V.png)](http://KristinitaTest.github.io/donate/Bitcoin-Redirect)

```

If you click the image, you will go to a page **<http://KristinitaTest.github.io/donate/Bitcoin-Redirect>**. See [**answer on Meta Stack Exchange**](https://meta.stackexchange.com/a/38917/326972), how use Markdown markup for this construction. Alternative worked HTML source:

```
<a href="http://KristinitaTest.github.io/donate/Bitcoin-Redirect"><img src="https://i.sstatic.net/MnQ6V.png"></a>

```

### 4.2. Source of `Bitcoin-Redirect` page

```
<script>
window.location.href = "bitcoin:17uctxtsWG3gpyAy6iJ8AVd5rdSjkJH2?label=In%20the%20treatme0of%20Sasha's%20teeth&amp;amount=0.0037";
history.back();
</script>

```

Use JavaScript methods [**window.location.href**](http://javascript.ru/window-location) and [**history.back**](http://javascript.ru/window.history).

> **Comments:**
> **username_1**: Does this method also support lightning payments?   (I am not sure whether, if one can also pay with lightning with ones Bitcoin client, and set that option as default, or whether that requires another manual step/a different client)   In essence, are the default transaction fees for a donation using this method (currently) in the range of ~$0.04 or in the range of ~$13?  

---

