| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | <pre> | 
					
						
							|  |  |  |   BIP: 72 | 
					
						
							| 
									
										
										
										
											2016-11-30 09:45:33 +00:00
										 |  |  |   Layer: Applications | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  |   Title: bitcoin: uri extensions for Payment Protocol | 
					
						
							|  |  |  |   Author: Gavin Andresen <gavinandresen@gmail.com> | 
					
						
							| 
									
										
										
										
											2016-11-30 09:47:31 +00:00
										 |  |  |   Comments-Summary: No comments yet. | 
					
						
							|  |  |  |   Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0072 | 
					
						
							| 
									
										
										
										
											2014-06-12 10:47:49 -04:00
										 |  |  |   Status: Final | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  |   Type: Standards Track | 
					
						
							| 
									
										
										
										
											2014-04-05 13:46:56 +02:00
										 |  |  |   Created: 2013-07-29 | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | </pre> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ==Abstract== | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | This BIP describes an extension to the bitcoin: URI scheme (BIP 21) to | 
					
						
							|  |  |  | support the payment protocol (BIP 70). | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ==Motivation== | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Allow users to click on a link in a web page or email to initiate the | 
					
						
							|  |  |  | payment protocol, while being backwards-compatible with existing | 
					
						
							|  |  |  | bitcoin wallets. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ==Specification== | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The bitcoin: URI scheme is extended with an additional, optional | 
					
						
							| 
									
										
										
										
											2013-12-06 09:09:22 +10:00
										 |  |  | "r" parameter, whose value is a URL from which a PaymentRequest | 
					
						
							| 
									
										
										
										
											2014-03-06 17:16:03 -08:00
										 |  |  | message should be fetched (characters not allowed within the scope | 
					
						
							|  |  |  | of a query parameter must be percent-encoded as described in RFC 3986 | 
					
						
							|  |  |  | and bip-0021). | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-06 09:09:22 +10:00
										 |  |  | If the "r" parameter is provided and backwards compatibility | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | is not required, then the bitcoin address portion of the URI may be | 
					
						
							| 
									
										
										
										
											2013-12-06 09:09:22 +10:00
										 |  |  | omitted (the URI will be of the form: bitcoin:?r=... ). | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | When Bitcoin wallet software that supports this BIP receives a | 
					
						
							|  |  |  | bitcoin: URI with a request parameter, it should ignore the bitcoin | 
					
						
							|  |  |  | address/amount/label/message in the URI and instead fetch a | 
					
						
							|  |  |  | PaymentRequest message and then follow the payment protocol, as | 
					
						
							|  |  |  | described in BIP 70. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Bitcoin wallets must support fetching PaymentRequests via http and | 
					
						
							|  |  |  | https protocols; they may support other protocols. Wallets must | 
					
						
							| 
									
										
										
										
											2014-04-26 17:34:03 +01:00
										 |  |  | include an "Accept" HTTP header in HTTP(s) requests (as defined | 
					
						
							|  |  |  | in RFC 2616): | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | <pre>Accept: application/bitcoin-paymentrequest</pre> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | If a PaymentRequest cannot be obtained (perhaps the server is | 
					
						
							|  |  |  | unavailable), then the customer should be informed that the merchant's | 
					
						
							| 
									
										
										
										
											2014-04-26 17:39:26 +01:00
										 |  |  | payment processing system is unavailable. In the case of an HTTP | 
					
						
							|  |  |  | request, status codes which are neither success nor error (such as | 
					
						
							|  |  |  | redirect) should be handled as outlined in RFC 2616. | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ==Compatibility== | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Wallet software that does not support this BIP will simply ignore the | 
					
						
							| 
									
										
										
										
											2013-12-06 09:09:22 +10:00
										 |  |  | r parameter and will initiate a payment to bitcoin address. | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ==Examples== | 
					
						
							|  |  |  | A backwards-compatible request: | 
					
						
							|  |  |  | <pre> | 
					
						
							| 
									
										
										
										
											2014-03-06 17:16:03 -08:00
										 |  |  | bitcoin:mq7se9wy2egettFxPbmn99cK8v5AFq55Lx?amount=0.11&r=https://merchant.com/pay.php?h%3D2a8628fc2fbe | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | </pre> | 
					
						
							|  |  |  | Non-backwards-compatible equivalent: | 
					
						
							|  |  |  | <pre> | 
					
						
							| 
									
										
										
										
											2014-03-06 17:16:03 -08:00
										 |  |  | bitcoin:?r=https://merchant.com/pay.php?h%3D2a8628fc2fbe | 
					
						
							| 
									
										
										
										
											2013-10-21 01:00:23 -04:00
										 |  |  | </pre> | 
					
						
							| 
									
										
										
										
											2014-04-26 17:34:03 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | ==References== | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-25 18:35:39 +03:00
										 |  |  | [[http://www.w3.org/Protocols/rfc2616/rfc2616.html|RFC 2616]] : Hypertext Transfer Protocol -- HTTP/1.1 |