<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dacoinminster</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dacoinminster"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/Dacoinminster"/>
	<updated>2026-04-06T23:03:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Dacoinminster&amp;diff=35317</id>
		<title>User:Dacoinminster</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Dacoinminster&amp;diff=35317"/>
		<updated>2013-01-18T21:55:14Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: Created page with &amp;quot;I wrote:  * The [http://bitcoinmedia.com/the-second-bitcoin-whitepaper/ The Second Bitcoin Whitepaper] * The Lazy API for accepting bitcoins.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I wrote:&lt;br /&gt;
&lt;br /&gt;
* The [http://bitcoinmedia.com/the-second-bitcoin-whitepaper/ The Second Bitcoin Whitepaper]&lt;br /&gt;
* The [[Lazy API]] for accepting bitcoins.&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Talk:Lazy_API&amp;diff=35316</id>
		<title>Talk:Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Talk:Lazy_API&amp;diff=35316"/>
		<updated>2013-01-18T21:50:34Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is the title descriptive of the article&#039;s contents?  Are the articles contents suitable / necessary where an article should exist?  Wouldn&#039;t this be something that, if valuable enough, is added to the [[Merchant Howto]] and/or the [[How to accept Bitcoin, for small businesses]]? [[User:Sgornick|Sgornick]] 02:26, 2 April 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
Done! I&#039;m particularly fond of this method of accepting bitcoins, since I paid a 20BTC bounty to Theymos to help make it happen. I&#039;d hate for this info to get lost. [[User:dacoinminster|dacoinminster]] 13:50, 18 January 2013 (PST)&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Talk:Lazy_API&amp;diff=35315</id>
		<title>Talk:Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Talk:Lazy_API&amp;diff=35315"/>
		<updated>2013-01-18T21:49:22Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is the title descriptive of the article&#039;s contents?  Are the articles contents suitable / necessary where an article should exist?  Wouldn&#039;t this be something that, if valuable enough, is added to the [[Merchant Howto]] and/or the [[How to accept Bitcoin, for small businesses]]? [[User:Sgornick|Sgornick]] 02:26, 2 April 2011 (GMT)&lt;br /&gt;
&lt;br /&gt;
Done! I&#039;m particularly fond of this method of accepting bitcoins, since I paid a 20BTC bounty to Theymos to help make it happen. I&#039;d hate for it to get lost.&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=How_to_accept_Bitcoin,_for_small_businesses&amp;diff=35314</id>
		<title>How to accept Bitcoin, for small businesses</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=How_to_accept_Bitcoin,_for_small_businesses&amp;diff=35314"/>
		<updated>2013-01-18T21:47:43Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: Added link to Lazy API&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{merge|Merchant Howto}}&lt;br /&gt;
&lt;br /&gt;
This guide is intended for small business owners who wish to help promote Bitcoin by accepting it as payment for goods and services.  It&#039;s written with the assumption that you operate a regular business that sells goods or services for regular national currency such as dollars, and that you wish to accept Bitcoin as another legal way to pay, and that you intend to pay taxes on your Bitcoin income just like any other income.&lt;br /&gt;
&lt;br /&gt;
With Bitcoin being touted as a way to conduct anonymous transactions and as way to compete with government currency, many small business owners wonder what&#039;s the right way to accept and account Bitcoin, or if it&#039;s legal or ethical, or whether and how they should pay taxes on income received through Bitcoin.&lt;br /&gt;
&lt;br /&gt;
As far as we know, Bitcoin isn&#039;t yet formally recognized by governments and authorities as a &amp;quot;currency&amp;quot;.  But in practice, Bitcoin is likely no different than accepting payment in other forms, such as cash, or gold, or scrip, or gift cards or foreign currency.  We think that it is pretty much the same as the local businesses of Great Barrington, Massachusetts choosing to accept their locally-printed [http://www.reuters.com/article/2007/06/19/us-usa-economy-berkshares-idUSN0530157720070619 &amp;quot;Berkshire Bucks&amp;quot;] to support their local economy.&lt;br /&gt;
&lt;br /&gt;
==Starting to accept Bitcoin for transactions==&lt;br /&gt;
Accepting Bitcoin at a small business is best started in whichever manner keeps the accounting simple for you.  This will vary by the type of business you are operating.&lt;br /&gt;
&lt;br /&gt;
===Start with a sign===&lt;br /&gt;
[[{{ns:file}}:WeAcceptBitcoin.png‎]]&lt;br /&gt;
&lt;br /&gt;
If you expect that the number of people interested in using Bitcoin is small, you might simply start by posting a sign or a note: &amp;quot;We Accept Bitcoin&amp;quot;, and ask people to contact you directly in order to make a payment.  Even if hardly anybody uses Bitcoin as a payment method, you&#039;re helping Bitcoin in two ways: one, by increasing awareness, and two, by making your customers more willing to accept Bitcoin as payment from others in the future, because now they know somewhere they can spend it.&lt;br /&gt;
&lt;br /&gt;
===Utilize a merchant solution===&lt;br /&gt;
If you sell things on your website (goods or services), you&#039;ll want to use a [[#Merchant Services|Bitcoin merchant solution]]  to accept the Bitcoins (you can usually opt to have them converted to USD or other currencies automatically). If you sell things in a brick and mortar shop, customers can pay using their mobile phone app (for example [http://www.paytunia.com Paytunia], [http://www.blockchain.info/wallet Blockchain.info&#039;s app] or [https://walletbit.com/mobile/ WalletBit Mobile]), so it&#039;s best if you can place a QR code near your register to which the customers can scan with their phone and pay (use http://ma.eatgold.com/accept to make a QR code sign).&lt;br /&gt;
&lt;br /&gt;
===Accounting===&lt;br /&gt;
When a customer makes a payment, you might simply issue a credit to their account.  Ideally, you want to enter it in a way that suggests you received a payment.  You could consider entering it as a &amp;quot;discount&amp;quot;, but you may want to consider whether this inappropriately disguises the nature of the transaction.  If on the other hand, you&#039;re giving &amp;quot;discounts&amp;quot; for Bitcoins, but then you are selling the Bitcoins for currency and then counting that as income, then chances are good that your calculation of income is making up for it.  Ask your accountant.&lt;br /&gt;
&lt;br /&gt;
===Businesses that offer gift cards===&lt;br /&gt;
If your business sells gift cards or gift certificates, you may find that the easiest way to accept Bitcoin is to accept it only for the purchase of gift cards, and then require the gift cards to be used for actual purchases of goods or services.  This way, the accounting practices you already have in place for processing gift cards can be put to use.  The accounting for Bitcoins would then be minimized to tracking sales of a single SKU.&lt;br /&gt;
&lt;br /&gt;
This method is also ideal for retail food establishments and convenience stores, where the payment of Bitcoins through a mobile phone for a small daily food purchase might be cumbersome or disruptive, especially in front of a line of other customers.  Bitcoins in this case would be best used to reload prepaid cards that can then be swiped at point-of-sale.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t accept gift cards, but you already accept credit cards through a swipe terminal, consider the possibility that you could add a retail gift card system through the swipe terminal you already own.  Many point-of-sale terminals, including ones from VeriFone&amp;amp;reg;, are designed around the ability to support multiple applications on the same terminal.  Gift cards are also highly profitable because of &amp;quot;breakage&amp;quot;, or in other words, the fact that a significant percentage of them never get redeemed.&lt;br /&gt;
&lt;br /&gt;
You could consider adding a private label gift card program from a provider who specializes in this, not just as a jumpstart to accepting Bitcoins, but as an extra boost to income.  A private label gift card service provider necessarily have to handle your funds - they can simply provide a solution that keeps track of the balance on the cards on your behalf, including features that allow users to check their balances by phone or by web.  Such a solution, of course, is also what makes the cards swipeable through the card reader.&lt;br /&gt;
&lt;br /&gt;
===Businesses that mail invoices===&lt;br /&gt;
Does your business send out invoices to customers?  Adding one line may make a huge impact for the Bitcoin economy.  Perhaps you list it as a payment option just after Visa, MasterCard, and American Express, even if that means your customer must call or e-mail to make a payment.&lt;br /&gt;
&lt;br /&gt;
If you have access to the programming expertise such that you can generate Bitcoin addresses programmatically, consider generating a brand new Bitcoin address for each invoice, and print it on the invoice.  When a Bitcoin payment arrives, you&#039;ll automatically know where it should arrive.&lt;br /&gt;
&lt;br /&gt;
Customers might wonder how much BTC they should pay in order to satisfy an invoice in full.    Your invoice might suggest an amount.  For example, if your invoice is for $100 and BTC&#039;s are currently worth $1.24 each, your invoice might suggest that it can be paid in full &#039;&#039;&amp;quot;with a payment of 80.65 BTC if paid by (date)&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You might be able to anticipate the possibility that even though a Bitcoin address can be printed on an invoice or payment stub, that they are very cumbersome for most people to type, especially being a mix of uppercase and lowercase letters.  However, you should probably still do it anyway.  The customer is probably going to want some paper trail for his payment.  Giving him a pre-printed payment stub with a pre-printed address will satisfy that, because the customer can independently and publicly prove through [[Block Explorer]] that the payment took place.&lt;br /&gt;
&lt;br /&gt;
Does your business have a website?  On your invoice, consider allowing them to go to a special URL to get the address to make a Bitcoin payment just by typing in their invoice number.  For example, &#039;&#039;ht&amp;lt;nowiki&amp;gt;tps://ww&amp;lt;/nowiki&amp;gt;w.yoursite.com/paybtc&#039;&#039; with a form they can enter their invoice number, or just &#039;&#039;ht&amp;lt;nowiki&amp;gt;tps://ww&amp;lt;/nowiki&amp;gt;w.yoursite.com/paybtc/60365&#039;&#039; for paying invoice #60365.  This way, they can see the Bitcoin address, copy and paste it directly into their Bitcoin client.&lt;br /&gt;
&lt;br /&gt;
Use a brand new address for each invoice whenever possible, and use it only once.  This benefits the customer as it removes any ambiguity as to which customer is making which payment and for which invoice.&lt;br /&gt;
&lt;br /&gt;
===Avoiding fraud===&lt;br /&gt;
&lt;br /&gt;
You should also consider the possible risk that fraudsters could send counterfeit invoices to your customers, and entice them to make a payment to a Bitcoin address they control, instead of you.  While that isn&#039;t likely in general - it depends on how well a fraudster could find out who your customers are in the first place - it would certainly be an unpleasant situation if it ever happened.  One way you could control that is, whenever possible, never let people try to type Bitcoin addresses off payment stubs - instead, force people to get the full Bitcoin address from your website via secure SSL.  But, still print &#039;&#039;most&#039;&#039; of the address on the payment stub (perhaps with four or five characters starred out), so that the customer&#039;s need for a paper trail can be satisfied, so they can prove they paid if there is ever a dispute.&lt;br /&gt;
&lt;br /&gt;
==Setting Prices==&lt;br /&gt;
&lt;br /&gt;
When a business accepts bitcoins for payment, there generally is the need to convert them to the currencies used for paying suppliers, employees and shareholders. Some merchants set prices based on the current market rate at the time the price quote is presented to the customer (merchant services like [http://www.bit-pay.com Bit-pay], [https://coinbase.com Coinbase], [http://paysius.com Paysius] or [https://walletbit.com WalletBit] do this automatically).  &lt;br /&gt;
&lt;br /&gt;
[[Bitcoin Prices]] lists the exchange rate for many currencies on multiple exchanges.&lt;br /&gt;
&lt;br /&gt;
When prices are determined using an automated process, the current market rate can be based on either a current price or on a weighted average basis.  [[Bitcoin Charts]] provides a [http://bitcoincharts.com/about/markets-api data feed that provides weighted prices].&lt;br /&gt;
&lt;br /&gt;
When bitcoin funds for purchases are received, some merchants instantly exchange those proceeds into the preferred currency used (again done automatically by [http://www.bit-pay.com Bit-pay],  [https://coinbase.com Coinbase], [http://paysius.com Paysius] or [https://walletbit.com WalletBit]).  Hedging for each transaction can nearly entirely eliminate exchange rate risk that the business is exposed to when accepting bitcoins for payment.&lt;br /&gt;
&lt;br /&gt;
==Contract==&lt;br /&gt;
&lt;br /&gt;
A sales contract might be used to ensure that specific terms are met to lessen the chances of a misunderstanding.  For instance, the party sending payment is responsible for paying any [[transaction fee]] that might be necessary.  A contract might specify that a transaction fee must be paid and what amount, so as to prevent the situation where the transaction is considered a low priority transaction and thus isn&#039;t confirmed quickly.&lt;br /&gt;
&lt;br /&gt;
Other items that might be addressed in a contract:&lt;br /&gt;
&lt;br /&gt;
* Requirement and handling of escrow through an [[:Category:Escrow_services|escrow service]].&lt;br /&gt;
* Jurisdiction for disputes.&lt;br /&gt;
* Refund policy (particularly with the exchange rate being volatile)&lt;br /&gt;
&lt;br /&gt;
==Paying taxes on Bitcoin income==&lt;br /&gt;
[[Tax compliance]] is a topic of concern for small businesses.  We aren&#039;t accountants or lawyers, and can&#039;t give legal or accounting advice.&lt;br /&gt;
&lt;br /&gt;
But in many respects, Bitcoin transactions work very much like cash.  Just like Bitcoin, cash is anonymous and doesn&#039;t leave a paper trail, yet is widely used in commerce every day.&lt;br /&gt;
&lt;br /&gt;
Ask yourself how you would handle a cash transaction.  Do you accept cash transactions?  Do you normally pay taxes on cash transactions?  The answer for Bitcoin should probably be the same.&lt;br /&gt;
&lt;br /&gt;
As for how to decide what a Bitcoin transaction is worth... the IRS, as far as we know, has never issued a guide mentioning how to value Bitcoin transactions.  But they probably have rules and guidelines on how to value transactions made in foreign currency or &amp;quot;cash equivalents&amp;quot;.  We imagine the accounting would be similar.&lt;br /&gt;
&lt;br /&gt;
With Bitcoins, there&#039;s likely to be some difference between the value of BTC when you received them as payment, versus when you go to exchange them for another currency like USD, should you decide to do so.  This scenario, likewise, would be no different if you accepted foreign currency or gold as payment.  Under some scenarios, it might make sense to book the dollar value of BTC income as it is received, and then to book any difference incurred when it is exchanged for fiat currency.  Under others, it might make sense to book the whole thing at the time of exchange.&lt;br /&gt;
&lt;br /&gt;
Perhaps you might talk to your accountant.  You don&#039;t need to get into a discussion with your accountant about block chains and private keys or the philosophy behind a decentralized currency.  By comparing the fundamentals of Bitcoins to accounting concepts already well understood by the public, you can probably get all the answers you need.  What would you ask your accountant if you decided that you wanted to accept &#039;&#039;Berkshire Bucks&#039;&#039; or 1-ounce gold coins as payment?&lt;br /&gt;
&lt;br /&gt;
== Merchant Services ==&lt;br /&gt;
* [https://www.bitpay.com BitPay] Bitcoin payment processor with mobile checkout solution&lt;br /&gt;
* [https://merchant.bitutils.com BitUtils] Provides HTML buttons to start accepting bitcoins instantly. No server side setup required.&lt;br /&gt;
* [https://coinbase.com/docs/merchant_tools/payment_buttons Coinbase] Offers payment buttons, checkout pages, shopping cart integration, and daily cash out to USD.&lt;br /&gt;
* [https://mtgox.com/merchant MTGOX] Bitcoin payment processing&lt;br /&gt;
* [https://paysius.com Paysius] Allows merchants to easily and securely accept Bitcoin on their website and track payments&lt;br /&gt;
* [https://walletbit.com WalletBit] Bitcoin payment processor with mobile checkout solution&lt;br /&gt;
* [http://fasterco.in Fasterco.in] Bitcoin payment processing for merchants and day-traders&lt;br /&gt;
&lt;br /&gt;
== Help this article ==&lt;br /&gt;
&lt;br /&gt;
This article is a stub, please add to it!&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Merchant Howto]]&lt;br /&gt;
* [[In-store Transactions]]&lt;br /&gt;
* [[Tax compliance]]&lt;br /&gt;
* [[Securing online services]]&lt;br /&gt;
* [[BitCoins Mobile]] provides accurate up to date pricing from multiple exchanges from your Apple iPad, iPhone, or iPod Touch.&lt;br /&gt;
* [[Bitcoin PayFlow]] automates the process for accepting bitcoins&lt;br /&gt;
* [[Lazy API]] The lazy (and possibly easiest?) way to accept bitcoin payments on your website&lt;br /&gt;
&lt;br /&gt;
[[Category:ECommerce]]&lt;br /&gt;
[[Category:Local]]&lt;br /&gt;
&lt;br /&gt;
[[de:Bitcoin_als_Geschäft_akzeptieren]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Merchant_Howto&amp;diff=35313</id>
		<title>Merchant Howto</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Merchant_Howto&amp;diff=35313"/>
		<updated>2013-01-18T21:46:11Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: Added link to Lazy API&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{merge|How to accept Bitcoin, for small businesses}}&lt;br /&gt;
&lt;br /&gt;
Accepting Bitcoins is easy, and there are several ways to do it.&lt;br /&gt;
&lt;br /&gt;
==Manually==&lt;br /&gt;
# Download a bitcoin client&lt;br /&gt;
# When a customer wants to buy something, send them a Bitcoin address where their payment should be sent.&lt;br /&gt;
#* You can do this by clicking &amp;quot;New..&amp;quot; next to your address in the Bitcoin client and sending that address to the customer.&lt;br /&gt;
# When payment comes in to that address, send the goods to your customer.  Depending on the value of what you&#039;re selling, you may wish to wait until the payment shows Confirmed.&lt;br /&gt;
# To issue a refund, obtain from the customer the [[Address|bitcoin address]] where the refund payment should be sent.  The refund address will likely be different from the address used when the customer sent payment, especially if an [[EWallet]] was used by the customer.&lt;br /&gt;
&lt;br /&gt;
==Automated==&lt;br /&gt;
===Pre-generating Bitcoin addresses===&lt;br /&gt;
You can accept Bitcoins on your website without needing to use Bitcoin APIs or third party services if you pre-generate a large number of receiving Bitcoin addresses and store them in a database on your web server, and dispense them one-by-one to customers when they are ready to pay.  This way, your web server never actually handles the bitcoins - it simply gives out addresses belonging to a wallet you maintain elsewhere.  By using a unique address per order, you will always know which payment belongs to which order.  [https://www.casascius.com Example of website using this method]&lt;br /&gt;
&lt;br /&gt;
To pre-generate addresses, use a tool such as [[Pywallet]] (which can generate a wallet.dat file) or [[Bitcoin Address Utility]] (which can generate a CSV file).  In both cases, you will be generating a list of [[Address|Bitcoin address]]es along with their corresponding [[private key]]s.  Only the Bitcoin addresses (not the private keys) should be loaded on the web server.&lt;br /&gt;
&lt;br /&gt;
If you are shipping goods manually, you can use the Bitcoin software to check for incoming payments, or alternately consider using [[Block Explorer]] or [[Abe]] to verify payment when you&#039;re about to ship.  To make this easy, make your website provide you a full hyperlink that includes the proper receiving address:  ht&amp;lt;nowiki&amp;gt;tp://www&amp;lt;/nowiki&amp;gt;.blockexplorer.com/address/ADDRESSGOESHERE.&lt;br /&gt;
&lt;br /&gt;
If you are delivering digital goods or services and want to be able to deliver instantly upon payment and/or confirmation, you can use a third-party service such as [[Bitcoin Notify]] to tell your website when a payment has been received.  This sort of service requires no significant API implementation - they will simply make a POST to your website or send you an e-mail when a payment has been received on one of your addresses.&lt;br /&gt;
&lt;br /&gt;
If you keep Bitcoins off your web server, this ensures your wallet cannot be stolen if your web server experiences a security intrusion.  Your risk becomes limited to the possibility that a successful intruder could add his own addresses to your address pool and steal funds from a few incoming orders until you detect the problem, however, this is a relatively controllable risk.&lt;br /&gt;
&lt;br /&gt;
===Using a third-party plugin===&lt;br /&gt;
You can use an existing [[:Category:Shopping Cart Interfaces|shopping cart interface]] from a 3rd party to automatically handle all Bitcoin payments on your website.  If you want to develop the system yourself, you can utilize the Bitcoin client&#039;s [[API tutorial (JSON-RPC)|JSON-RPC API]] to automatically accept payments.&lt;br /&gt;
&lt;br /&gt;
Things to note if you build it yourself:&lt;br /&gt;
# When a customer orders something on your website it records:&lt;br /&gt;
#* Bitcoin address that payment should be sent to&lt;br /&gt;
#* Order details (delivery address etc.)&lt;br /&gt;
#* Customer&#039;s refund address (optional - if you wish you can ask for this later, only in cases a refund is required)&lt;br /&gt;
#* Payment amount&lt;br /&gt;
# When payment arrives, checks that they have paid the correct amount or not, and informs you&lt;br /&gt;
#* You dispatch the goods to the customer and mark the order as fulfilled&lt;br /&gt;
#* If you cannot dispatch the goods you mark the order as denied and ask the customer for a refund address (unless you already have it from earlier) to send a refund.&lt;br /&gt;
# Forwards the funds to bitcoin address of your choice&lt;br /&gt;
&lt;br /&gt;
==Common Errors==&lt;br /&gt;
It has been observed on occasion that a business funnels all its orders through the same Bitcoin address, and asks people to send some BTC, then send email describing the timing and the amount of the transaction to &#039;claim&#039; it. This is &#039;&#039;&#039;not&#039;&#039;&#039; secure, since anyone can see the transaction details using a tool such as [[Block Explorer]], and then try to claim someone else&#039;s transaction as theirs.&lt;br /&gt;
&lt;br /&gt;
Do not do this.  Give each customer a unique Bitcoin address.&lt;br /&gt;
&lt;br /&gt;
==Listing your business on the Bitcoin Trade page==&lt;br /&gt;
&lt;br /&gt;
Anyone can add and update a listing on the [[Trade|trade]] page.  Just register if you haven&#039;t and add to the appropriate category.  If you&#039;ld like assistance, perhaps someone in the [http://webchat.freenode.net/?channels=#bitcoin-marketing #bitcoin-marketing] IRC channel would be willing to assist.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[In-store Transactions]]&lt;br /&gt;
* [[:Category:Shopping Cart Interfaces|Shopping Cart Interfaces]]&lt;br /&gt;
* [[Securing online services]]&lt;br /&gt;
* [[Bitcoin Evolution]] handles sales tracking and order forms; requires Bitcoin client for actual payment&lt;br /&gt;
* [[Bitcoin PayFlow]] automates the process for accepting bitcoins&lt;br /&gt;
* [[Bitcoin API Services]] an easy solution for securely accepting Bitcoins and updating BTC prices&lt;br /&gt;
* [[BitcoinNotify]] merchants solution for accepting Bitcoins and updating BTC prices&lt;br /&gt;
* [[Coinbase]] Offers payment buttons, checkout pages, shopping cart integration, and daily cash out to USD.&lt;br /&gt;
* [[Converter|Bitcoin Javascript Converter]] displays a price in BTCs after converting from USDs.&lt;br /&gt;
* [[How to accept Bitcoin, for small businesses]]&lt;br /&gt;
* [[:Category:Marketing|Marketing]]&lt;br /&gt;
* [[URI Scheme]]&lt;br /&gt;
* [[Promotional graphics]], buttons and logos&lt;br /&gt;
* [[BitPay]] Merchant solutions for Bitcoin&lt;br /&gt;
* [http://paysius.com Paysius] Allows merchants to easily and securely accept Bitcoin payments on their website&lt;br /&gt;
* [http://merchant.bitutils.com BitUtils Merchant] Provides html buttons for accepting bitcoins&lt;br /&gt;
* [[WalletBit]] Bitcoin gateway and Merchant solutions&lt;br /&gt;
* [[Fasterco.in]] Bitcoin payment processing for merchants and day-traders&lt;br /&gt;
* [[Lazy API]] The lazy (and possibly easiest?) way to accept bitcoin payments on your website&lt;br /&gt;
[[Category:ECommerce]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=35312</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=35312"/>
		<updated>2013-01-18T21:42:23Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: Fixed broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, present is the lazy man&#039;s bitcoin API (copied from [https://bitcointalk.org/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
==Problem==&lt;br /&gt;
&lt;br /&gt;
Lazy web designer wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping cart interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
==Solution for sending bitcoins==&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
==Solution for receiving bitcoins==&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation (you can choose a number higher than 1 if you are worried about double-spending)&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/1) - the /1 is the number of confirmations you require&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them by getting a new address via API call from one of the wallet services that support this feature (e.g. https://instawallet.org/static/api).&lt;br /&gt;
&lt;br /&gt;
==Risks==&lt;br /&gt;
&lt;br /&gt;
===External Service===&lt;br /&gt;
&lt;br /&gt;
BlockExplorer is a service that is provided by a private party.  There is no guarantee that the information provided by BlockExplorer matches the blockchain.&lt;br /&gt;
&lt;br /&gt;
There have not been any reports that BlockExplorer has reported transaction data incorrectly.&lt;br /&gt;
&lt;br /&gt;
===Double Spending===&lt;br /&gt;
&lt;br /&gt;
A merchant is exposed to a [[double-spending]] attack when recognizing a payment before it has been [[confirmation|confirmed]] with a sufficient number of blocks.&lt;br /&gt;
&lt;br /&gt;
For an attacker to be successful with this double spend tactic a significant effort is required and thus the risk of this attack being made against the typical retail merchant is pretty minimal.  It would not be advisable for a merchant with little to no recourse against an attacker to accept payment without a sufficient number of confirmations however.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[BitAddress]] Generate address and private key pairs for an offline wallet&lt;br /&gt;
* [[BitcoinNotify]] Register addresses and receive email or SMS alerts when a payment to that address occurs&lt;br /&gt;
&lt;br /&gt;
[[de:API_für_Faule]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Meetups&amp;diff=10113</id>
		<title>Meetups</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Meetups&amp;diff=10113"/>
		<updated>2011-06-08T20:14:56Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Don&#039;t add everyone who&#039;s going the the &amp;quot;Who?&amp;quot; column, just prominent bitcoin members and organizers. Also see [http://bitcoin.meetup.com bitcoin.meetup.com]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Group&lt;br /&gt;
! When?&lt;br /&gt;
! Where?&lt;br /&gt;
! Who?&lt;br /&gt;
! Other Notes&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 7:00 PM, June 16&lt;br /&gt;
| &lt;br /&gt;
| Boston, MA&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/bitcoin New York Bitcoin Users]&lt;br /&gt;
| 7:00 PM, 2nd Saturday of every month ([http://www.meetup.com/bitcoin/events/past past meetings])&lt;br /&gt;
| OnlyOneTV Studios - 290 Fifth Ave New York, NY&lt;br /&gt;
| Bruce Wagner (Organizer) and others&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/BitcoinDC Washington, DC Bitcoin Users]&lt;br /&gt;
| 7:00 PM, 1st Monday of every month ([http://www.meetup.com/BitcoinDC/#past past meetings])&lt;br /&gt;
| Northside Social, 3211 Wilson Blvd Arlington, VA&lt;br /&gt;
| [[User:Dduane|Darrell Duane]] (Organizer) and others&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/Silicon-Valley-Bitcoin-Users Silicon Valley Bitcoin Users]&lt;br /&gt;
| 7:00 PM, Tuesday, June 14, 2011 ([http://www.meetup.com/Silicon-Valley-Bitcoin-Users/events/past past meetings])&lt;br /&gt;
| 140B S Whisman Road Mountain View, CA &lt;br /&gt;
| Brian Mcqueen and others&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/BitcoinChicago Chicago]&lt;br /&gt;
| No regular schedule yet ([http://www.meetup.com/BitcoinChicago/events/past past meetings])&lt;br /&gt;
| Sunnyvale Art Gallery Cafe, 251 W El Camino Real Sunnyvale, CA&lt;br /&gt;
| Igor&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/denver-bitcoin Denver]&lt;br /&gt;
| First meeting June 4th, 2011 ([http://www.meetup.com/denver-bitcoin/events/past past meetings])&lt;br /&gt;
| Gypsy House Cafe - 1279 Marion St Denver, CO&lt;br /&gt;
| bearbones&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/bitcoinSF Bitcoin SF]&lt;br /&gt;
| Saturday, June 4, 2011 ([http://www.meetup.com/bitcoinSF past meetings])&lt;br /&gt;
| SFSU - 1600 Holloway Ave. San Francisco, CA&lt;br /&gt;
| Brian Mcqueen and others&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/Los-Angeles-Digital-Currency-Innovators-Group Los Angeles Digital Currency Innovators]&lt;br /&gt;
| Thursday July 7th, 2011, 7 PM&lt;br /&gt;
| (mt)/Media Temple, Culver City, CA&lt;br /&gt;
| [[User:sgornick|Stephen Gornick]] (Interim organizer) and others&lt;br /&gt;
| Seeking meetup coordinator&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/Las-Vegas-Bitcoin-Users Las Vegas Bitcoin Users]&lt;br /&gt;
| Thursday, June 9, 2011, 7:00 PM ([http://www.meetup.com/Las-Vegas-Bitcoin-Users#past past meetings])&lt;br /&gt;
| Putters, 6945 South Rainbow Boulevard, Las Vegas, NV&lt;br /&gt;
| Mark Russell&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.meetup.com/Bitcoin-Twin-Cities-Users-Meetup Bitcoin Twin Cities Users]&lt;br /&gt;
| Friday, June 10, 2011, 6:30 PM&lt;br /&gt;
| Joule - 1200 Washington Ave S Minneapolis, MN&lt;br /&gt;
| Mac Manson&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.hive13.org/?p=310 Hive13 Hackerspace]&lt;br /&gt;
| Bitcoin Exchange, Every Tuesday, 7:30 PM&lt;br /&gt;
| Hive13 - 2929 Spring Grove Avenue, Cincinnati, OH&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Melbourne Bitcoin Community]]&lt;br /&gt;
| Forming&lt;br /&gt;
| Suggest a location, and a date and time&lt;br /&gt;
| @da2ce7 on Freenode Channel: #bitcoin-aus&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Bitcoin:Tokyo meetup|Tokyo]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| [[User:MagicalTux|Magical Tux]] (Organizer) and others&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://meetup.com/Bitcoin-Canada Vancouver Canada]&lt;br /&gt;
| ([http://www.meetup.com/Bitcoin-Canada/#past past meetings])&lt;br /&gt;
| The Brickhouse - 730 Main St.&lt;br /&gt;
| humble (and others)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://www.bitcoin.org/smf/index.php?topic=6725.0 Zurich Switzerland]&lt;br /&gt;
| Semi-regular, about once a month&lt;br /&gt;
| Oliver Twist Pub&lt;br /&gt;
| Stefan Thomas (weusecoins), Mike Hearn (bitcoinj), bitdragon, Luzius (Wuala), more ... &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[Seattle Bitcoin Meetup]]&lt;br /&gt;
| Anybody interested?&lt;br /&gt;
| Suggest a location, and a date and time&lt;br /&gt;
| dacoinminster&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Local]]&lt;br /&gt;
&lt;br /&gt;
[[de:Treffen]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6738</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6738"/>
		<updated>2011-04-04T16:14:52Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping cart interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation (you can choose a number higher than 1 if you are worried about double-spending)&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/1) - the /1 is the number of confirmations you require&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shameless begging:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH&lt;br /&gt;
&lt;br /&gt;
Thanks to theymos for making changes to blockexplorer.com to make it even easier to do this. You can support blockexplorer.com by donating to 1Cvvr8AsCfbbVQ2xoWiFD1Gb2VRbGsEf28&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6737</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6737"/>
		<updated>2011-04-04T16:04:33Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation (you can choose a number higher than 1 if you are worried about double-spending)&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/1) - the /1 is the number of confirmations you require&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shameless begging:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH&lt;br /&gt;
&lt;br /&gt;
Thanks to theymos for making changes to blockexplorer.com to make it even easier to do this. You can support blockexplorer.com by donating to 1Cvvr8AsCfbbVQ2xoWiFD1Gb2VRbGsEf28&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6736</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6736"/>
		<updated>2011-04-04T16:02:34Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation (you can choose a number higher than 1 if you are worried about double-spending)&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/1) - the /1 is the number of confirmations you require&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shameless begging:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH&lt;br /&gt;
&lt;br /&gt;
Thanks to theymos for making changes to blockexplorer.com to make it even easier to do this. You can support his blockexplorer.com by donating to 1Cvvr8AsCfbbVQ2xoWiFD1Gb2VRbGsEf28&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6735</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6735"/>
		<updated>2011-04-04T16:00:50Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation (you can choose a number higher than 1 if you are worried about double-spending)&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/1) - the /1 is the number of confirmations you require&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shameless begging:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6734</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6734"/>
		<updated>2011-04-04T16:00:22Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation(you can choose a number higher than 1 if you are worried about double-spending)&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/1) - the /1 is the number of confirmations you require&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shameless begging:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6520</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6520"/>
		<updated>2011-04-01T16:43:50Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
# Wait for more blocks (confirmations) if paranoid  (look for the latest block number to go up here: http://blockexplorer.com/)&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shameless begging:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6519</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6519"/>
		<updated>2011-04-01T16:38:13Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
# Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shameless begging:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6518</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6518"/>
		<updated>2011-04-01T16:37:56Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
# Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shameless begging:&#039;&#039;&#039;&lt;br /&gt;
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=PHP_developer_intro&amp;diff=6517</id>
		<title>PHP developer intro</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=PHP_developer_intro&amp;diff=6517"/>
		<updated>2011-04-01T16:30:35Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;L&#039;&#039;&#039;inux &#039;&#039;&#039;A&#039;&#039;&#039;pache &#039;&#039;&#039;M&#039;&#039;&#039;ySQL &#039;&#039;&#039;P&#039;&#039;&#039;HP + Bitcoin tutorial.&lt;br /&gt;
&lt;br /&gt;
For the sake of this tutorial we assume an Ubuntu server running with PHP. The use case here is integrating a shopping system to accept Bitcoins. We assume some knowledge of Bitcoin and experience in PHP.&lt;br /&gt;
&lt;br /&gt;
You can substitute any other language here for PHP. See the associated [[API reference (JSON-RPC)|API reference]] pages for info on other languages.&lt;br /&gt;
&lt;br /&gt;
You will run Bitcoin in daemon mode. The way PHP communicates is through localhost HTTP requests. You use a library called [http://jsonrpcphp.org/ JSON-RPC] to call the various functions. It will respond back with a [http://en.wikipedia.org/wiki/Json JSON object].&lt;br /&gt;
&lt;br /&gt;
== Setting up Bitcoin ==&lt;br /&gt;
&lt;br /&gt;
You need the bitcoind command-line daemon.  You can either compile it from source or download a binary from the bitcoin.org homepage.&lt;br /&gt;
&lt;br /&gt;
See [[Running Bitcoin]] for details on configuring bitcoin.&lt;br /&gt;
&lt;br /&gt;
Before running bitcoind you will need to create a file in the bitcoin data directory (~/.bitcoin/.bitcoin.conf on Linux):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rpcuser=user&lt;br /&gt;
rpcpassword={you MUST pick a unique password to be secure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now run bitcoind:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ./bitcoind&lt;br /&gt;
# wait a few seconds for it to start up&lt;br /&gt;
$ ./bitcoind getinfo&lt;br /&gt;
# various info shown&lt;br /&gt;
$ ./bitcoind help&lt;br /&gt;
# help on commands&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bitcoin is now initialising and you must wait until &amp;quot;blocks&amp;quot; is at the [http://bitcoinwatch.com/ current count].&lt;br /&gt;
&lt;br /&gt;
== First steps ==&lt;br /&gt;
&lt;br /&gt;
Assuming Bitcoin has finished the initialisation process; download the file jsonRPCClient.php from [http://jsonrpcphp.org/ JSON-RPC PHP]. The other files can be safely discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
  require_once &#039;jsonRPCClient.php&#039;;&lt;br /&gt;
  &lt;br /&gt;
  $bitcoin = new jsonRPCClient(&#039;http://user:password@127.0.0.1:8332/&#039;);&lt;br /&gt;
   &lt;br /&gt;
  echo &amp;quot;&amp;lt;pre&amp;gt;\n&amp;quot;;&lt;br /&gt;
  print_r($bitcoin-&amp;gt;getinfo());&lt;br /&gt;
  echo &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Precision ==&lt;br /&gt;
&lt;br /&gt;
Bitcoin amounts can range from 0.00000001 to 21,000,000.  To avoid rounding errors, you must make sure your PHP implementation supports the full range of bitcoin values without losing precision.  Most PHP implementations use IEEE 64-bit double-precision floating point numbers, which have 53 bits of precision, which is enough to correctly represent the full range of bitcoin values.&lt;br /&gt;
&lt;br /&gt;
See [[Proper Money Handling (JSON-RPC)]] for more information.&lt;br /&gt;
&lt;br /&gt;
If your PHP implementation does not support 64-bit numbers, you must use a version of bitcoind that sends values as strings (genjix maintains a fork at http://github.com/genjix/bitcoin) and use the  [http://php.net/manual/en/ref.gmp.php GMP] and [http://php.net/manual/en/ref.bc.php BC Math] libraries for all calculations involving bitcoin amounts.&lt;br /&gt;
&lt;br /&gt;
== Accounts ==&lt;br /&gt;
&lt;br /&gt;
In Bitcoin, money is sent to addresses. Your balance is the total of all the money in all the address in your wallet.&lt;br /&gt;
&lt;br /&gt;
Bitcoin goes another step. You can have accounts. Each account holds multiple addresses and adds like a mini-Bitcoin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ./bitcoind listaccounts&lt;br /&gt;
# show list of accounts and various info for each one&lt;br /&gt;
$ ./bitcoind getaccountaddress user889&lt;br /&gt;
# get an address to receive money to that is unique for the account user889&lt;br /&gt;
$ ./bitcoind getbalance user889&lt;br /&gt;
# get the sum of all the money in the addresses owned by the account user889&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your shopping system, each user should have a unique username. You then query bitcoin for a unique address using $bitcoin-&amp;gt;getaccountaddress(&amp;quot;user889&amp;quot;); [gets the first address for user889] or $bitcoin-&amp;gt;getnewaddress(&amp;quot;user889&amp;quot;); [creates a new address for user889].&lt;br /&gt;
&lt;br /&gt;
The customer then deposits to this address.&lt;br /&gt;
&lt;br /&gt;
You can check the funds for that customer by doing $bitcoin-&amp;gt;getbalance(&amp;quot;user889&amp;quot;, 4);. The 4 indicates the minimum number of confirmations we will accept before assuming this payment is valid.&lt;br /&gt;
&lt;br /&gt;
=== getnewaddress vs getaccountaddress ===&lt;br /&gt;
&lt;br /&gt;
Using getnewaddress helps increase the anonymity of your customers by making it hard to track their payments from the POV of a malicious agent. However running it too often will cause your wallet to become filled with many empty addresses.&lt;br /&gt;
&lt;br /&gt;
I recommend that you run do something like:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
    require_once(&#039;jsonRPCClient.php&#039;);&lt;br /&gt;
    $bitcoin = new jsonRPCClient(&#039;http://root:root@127.0.0.1:8332/&#039;); &lt;br /&gt;
    # now check for appropriate funds in user account&lt;br /&gt;
    try {&lt;br /&gt;
        $username = ...&lt;br /&gt;
        if(isset($_SESSION[&#039;sendaddress&#039;]))&lt;br /&gt;
            $sendaddress = $_SESSION[&#039;sendaddress&#039;];&lt;br /&gt;
        else {&lt;br /&gt;
            $sendaddress = $bitcoin-&amp;gt;getnewaddress($username);&lt;br /&gt;
            $_SESSION[&#039;sendaddress&#039;] = $sendaddress;&lt;br /&gt;
        }&lt;br /&gt;
        $balance = $bitcoin-&amp;gt;getbalance($username);&lt;br /&gt;
    }&lt;br /&gt;
    catch (Exception $e) {&lt;br /&gt;
        die(&amp;quot;&amp;lt;p&amp;gt;Server error! Please contact the admin.&amp;lt;/p&amp;gt;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a new address at the beginning of every new session, and stores it in the session variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[API reference (JSON-RPC)]]&lt;br /&gt;
* [[Lazy_API]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Original_Bitcoin_client/API_calls_list&amp;diff=6516</id>
		<title>Original Bitcoin client/API calls list</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Original_Bitcoin_client/API_calls_list&amp;diff=6516"/>
		<updated>2011-04-01T16:29:10Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bitcoin API call list (as of version 0.3.19)&lt;br /&gt;
&lt;br /&gt;
== Common operations ==&lt;br /&gt;
&lt;br /&gt;
=== Listing my bitcoin addresses ===&lt;br /&gt;
&lt;br /&gt;
Listing the bitcoin addresses in your wallet is easily done via &#039;&#039;listreceivedbyaddress&#039;&#039;. It normally lists only addresses which already have received transactions, however you can list all the addresses by setting the first argument to 0, and the second one to true&lt;br /&gt;
&lt;br /&gt;
== Full list ==&lt;br /&gt;
&lt;br /&gt;
Required arguments are denoted inside &amp;amp;lt; and &amp;amp;gt; Optional arguments are inside [ and ].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command !! Parameters !! Description&lt;br /&gt;
|-&lt;br /&gt;
| backupwallet || &amp;lt;destination&amp;gt; || Safely copies wallet.dat to destination, which can be a directory or a path with filename.&lt;br /&gt;
|-&lt;br /&gt;
| getaccount || &amp;lt;bitcoinaddress&amp;gt; || Returns the account associated with the given address.&lt;br /&gt;
|-&lt;br /&gt;
| getaccountaddress || &amp;lt;account&amp;gt; || Returns the current bitcoin address for receiving payments to this account.&lt;br /&gt;
|-&lt;br /&gt;
| getaddressesbyaccount || &amp;lt;account&amp;gt; || Returns the list of addresses for the given account.&lt;br /&gt;
|-&lt;br /&gt;
| getbalance || [account] [minconf=1] || If [account] is not specified, returns the server&#039;s total available balance.&amp;lt;br/&amp;gt;If [account] is specified, returns the balance in the account.&lt;br /&gt;
|-&lt;br /&gt;
| getblockbycount || height || Dumps the block existing at specified height. &#039;&#039;&#039;Note: this is not available in the official release&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| getblockcount || || Returns the number of blocks in the longest block chain.&lt;br /&gt;
|-&lt;br /&gt;
| getblocknumber || || Returns the block number of the latest block in the longest block chain.&lt;br /&gt;
|-&lt;br /&gt;
| getconnectioncount || || Returns the number of connections to other nodes.&lt;br /&gt;
|-&lt;br /&gt;
| getdifficulty || || Returns the proof-of-work difficulty as a multiple of the minimum difficulty.&lt;br /&gt;
|-&lt;br /&gt;
| getgenerate || || Returns true or false whether bitcoind is currently generating hashes&lt;br /&gt;
|-&lt;br /&gt;
| gethashespersec || || Returns a recent hashes per second performance measurement while generating.&lt;br /&gt;
|-&lt;br /&gt;
| getinfo || || Returns an object containing various state info.&lt;br /&gt;
|-&lt;br /&gt;
| getnewaddress || [account] || Returns a new bitcoin address for receiving payments.  If [account] is specified (recommended), it is added to the address book so payments received with the address will be credited to [account].&lt;br /&gt;
|-&lt;br /&gt;
| getreceivedbyaccount || &amp;lt;account&amp;gt; [minconf=1] [includeempty=false] || Returns the total amount received by addresses with &amp;lt;account&amp;gt; in transactions with at least [minconf] confirmations.&lt;br /&gt;
|-&lt;br /&gt;
| getreceivedbyaddress || &amp;lt;bitcoinaddress&amp;gt; [minconf=1] [includeempty=false] || Returns the total amount received by &amp;lt;bitcoinaddress&amp;gt; in transactions with at least [minconf] confirmations.&lt;br /&gt;
|-&lt;br /&gt;
| gettransaction || &amp;lt;txid&amp;gt; || Get detailed information about &amp;lt;txid&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[getwork]] || [data] || If [data] is not specified, returns formatted hash data to work on:&lt;br /&gt;
* &amp;quot;midstate&amp;quot; : precomputed hash state after hashing the first half of the data&lt;br /&gt;
* &amp;quot;data&amp;quot; : block data&lt;br /&gt;
* &amp;quot;hash1&amp;quot; : formatted hash buffer for second hash&lt;br /&gt;
* &amp;quot;target&amp;quot; : little endian hash target&lt;br /&gt;
If [data] is specified, tries to solve the block and returns true if it was successful.&lt;br /&gt;
|-&lt;br /&gt;
| help || [command] || List commands, or get help for a command.&lt;br /&gt;
|-&lt;br /&gt;
| listreceivedbyaccount || [minconf=1] [includeempty=false] || Returns an array of objects containing:&lt;br /&gt;
* &amp;quot;account&amp;quot; : the account of the receiving addresses&lt;br /&gt;
* &amp;quot;amount&amp;quot; : total amount received by addresses with this account&lt;br /&gt;
* &amp;quot;confirmations&amp;quot; : number of confirmations of the most recent transaction included&lt;br /&gt;
|-&lt;br /&gt;
| listreceivedbyaddress || [minconf=1] [includeempty=false] || Returns an array of objects containing:&lt;br /&gt;
* &amp;quot;address&amp;quot; : receiving address&lt;br /&gt;
* &amp;quot;account&amp;quot; : the account of the receiving address&lt;br /&gt;
* &amp;quot;amount&amp;quot; : total amount received by the address&lt;br /&gt;
* &amp;quot;confirmations&amp;quot; : number of confirmations of the most recent transaction included&lt;br /&gt;
To get a list of accounts on the system, execute bitcoind listreceivedbyaddress 0 true&lt;br /&gt;
|-&lt;br /&gt;
| listtransactions || &amp;lt;account&amp;gt; [count=10] || Returns up to [count] most recent transactions for account &amp;lt;account&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| move || &amp;lt;fromaccount&amp;gt; &amp;lt;toaccount&amp;gt; &amp;lt;amount&amp;gt; [minconf=1] [comment] || Move from one account in your wallet to another.&lt;br /&gt;
|-&lt;br /&gt;
| sendfrom || &amp;lt;fromaccount&amp;gt; &amp;lt;tobitcoinaddress&amp;gt; &amp;lt;amount&amp;gt; [minconf=1] [comment] [comment-to] || &amp;lt;amount&amp;gt; is a real and is rounded to the nearest 0.01&lt;br /&gt;
|-&lt;br /&gt;
| sendtoaddress || &amp;lt;bitcoinaddress&amp;gt; &amp;lt;amount&amp;gt; [comment] [comment-to] || &amp;lt;amount&amp;gt; is a real and is rounded to the nearest 0.01&lt;br /&gt;
|-&lt;br /&gt;
| setaccount || &amp;lt;bitcoinaddress&amp;gt; &amp;lt;account&amp;gt; || Sets the account associated with the given address.&lt;br /&gt;
|-&lt;br /&gt;
| setgenerate || &amp;lt;generate&amp;gt; [genproclimit] || &amp;lt;generate&amp;gt; is true or false to turn generation on or off.&amp;lt;br/&amp;gt;Generation is limited to [genproclimit] processors, -1 is unlimited.&lt;br /&gt;
|-&lt;br /&gt;
| stop || || Stop bitcoin server.&lt;br /&gt;
|-&lt;br /&gt;
| validateaddress || &amp;lt;bitcoinaddress&amp;gt; || Return information about &amp;lt;bitcoinaddress&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Original Bitcoin client]]&lt;br /&gt;
* [[API reference (JSON-RPC)]]&lt;br /&gt;
* [[Lazy_API]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=API_reference_(JSON-RPC)&amp;diff=6515</id>
		<title>API reference (JSON-RPC)</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=API_reference_(JSON-RPC)&amp;diff=6515"/>
		<updated>2011-04-01T16:28:07Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Controlling Bitcoin ==&lt;br /&gt;
&lt;br /&gt;
Run &#039;&#039;bitcoind&#039;&#039; or &#039;&#039;bitcoin -server&#039;&#039;. You can control it via the command-line or by HTTP-JSON-RPC commands.&lt;br /&gt;
&lt;br /&gt;
You must create a bitcoin.conf configuration file setting an rpcuser and rpcpassword; see [[Running Bitcoin]] for details.&lt;br /&gt;
&lt;br /&gt;
Now run:&lt;br /&gt;
  $ ./bitcoind&lt;br /&gt;
  bitcoin server starting&lt;br /&gt;
  $ ./bitcoind help&lt;br /&gt;
  # shows the help text&lt;br /&gt;
&lt;br /&gt;
A [[Original Bitcoin client/API Calls list|list of RPC calls]] will be shown.&lt;br /&gt;
&lt;br /&gt;
  $ ./bitcoind getbalance&lt;br /&gt;
  2000.00000&lt;br /&gt;
&lt;br /&gt;
== JSON-RPC ==&lt;br /&gt;
&lt;br /&gt;
Running Bitcoin with the -server argument (or running bitcoind) tells it to function as a [http://json-rpc.org/wiki/specification|HTTP JSON-RPC] server, but &lt;br /&gt;
[http://en.wikipedia.org/wiki/Basic_access_authentication|HTTP Basic access authentication] must be used when communicating with it, and, for security, by default, the server only accepts connections from other processes on the same machine.  If your HTTP or JSON library requires you to specify which &#039;realm&#039; is authenticated, use &#039;jsonrpc&#039;.&lt;br /&gt;
&lt;br /&gt;
Bitcoin supports SSL (https) JSON-RPC connections beginning with version 0.3.14.  See the [[Enabling SSL on original client daemon|rpcssl wiki page]] for setup instructions and a list of all bitcoin.conf configuration options.&lt;br /&gt;
&lt;br /&gt;
To access the server you should find a [http://json-rpc.org/wiki/implementations|suitable library] for your language.&lt;br /&gt;
&lt;br /&gt;
== Proper money handling ==&lt;br /&gt;
&lt;br /&gt;
See the [[Proper Money Handling (JSON-RPC)|proper money handling page]] for notes on avoiding rounding errors when handling bitcoin values.&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
&lt;br /&gt;
Save the following file as jsonrpc.py.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import urllib&lt;br /&gt;
import decimal&lt;br /&gt;
import json&lt;br /&gt;
&lt;br /&gt;
class JSONRPCException(Exception):&lt;br /&gt;
    def __init__(self, rpcError):&lt;br /&gt;
        Exception.__init__(self)&lt;br /&gt;
        self.error = rpcError&lt;br /&gt;
        &lt;br /&gt;
class ServiceProxy(object):&lt;br /&gt;
    def __init__(self, serviceURL, serviceName=None):&lt;br /&gt;
        self.__serviceURL = serviceURL&lt;br /&gt;
        self.__serviceName = serviceName&lt;br /&gt;
&lt;br /&gt;
    def __getattr__(self, name):&lt;br /&gt;
        if self.__serviceName != None:&lt;br /&gt;
            name = &amp;quot;%s.%s&amp;quot; % (self.__serviceName, name)&lt;br /&gt;
        return ServiceProxy(self.__serviceURL, name)&lt;br /&gt;
&lt;br /&gt;
    def __call__(self, *args):&lt;br /&gt;
         postdata = json.dumps({&amp;quot;method&amp;quot;: self.__serviceName, &#039;params&#039;: args, &#039;id&#039;:&#039;jsonrpc&#039;})&lt;br /&gt;
         respdata = urllib.urlopen(self.__serviceURL, postdata).read()&lt;br /&gt;
         resp = json.loads(respdata, parse_float=decimal.Decimal)&lt;br /&gt;
         if resp[&#039;error&#039;] != None:&lt;br /&gt;
             raise JSONRPCException(resp[&#039;error&#039;])&lt;br /&gt;
         else:&lt;br /&gt;
             return resp[&#039;result&#039;]         &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Python-jsonrpc automatically generates Python methods corresponding to the functions above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
  from jsonrpc import ServiceProxy&lt;br /&gt;
  &lt;br /&gt;
  access = ServiceProxy(&amp;quot;http://user:password@127.0.0.1:8332&amp;quot;)&lt;br /&gt;
  access.getinfo()&lt;br /&gt;
  access.listreceivedbyaddress(6)&lt;br /&gt;
  #access.sendtoaddress(&amp;quot;11yEmxiMso2RsFVfBcCa616npBvGgxiBX&amp;quot;, 10)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ruby ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
=begin&lt;br /&gt;
Make sure to do:&lt;br /&gt;
    gem install rest-client&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
    h = ServiceProxy.new(&#039;http://user:password@127.0.0.1:8332&#039;)&lt;br /&gt;
    puts h.getinfo.call&lt;br /&gt;
    puts h.getbalance.call &#039;0&#039;&lt;br /&gt;
=end&lt;br /&gt;
require &#039;json&#039;&lt;br /&gt;
require &#039;rest_client&#039;&lt;br /&gt;
&lt;br /&gt;
class JSONRPCException &amp;lt; RuntimeError&lt;br /&gt;
    def initialize()&lt;br /&gt;
        super()&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class ServiceProxy&lt;br /&gt;
    def initialize(service_url, service_name=nil)&lt;br /&gt;
        @service_url = service_url&lt;br /&gt;
        @service_name = service_name&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def method_missing(name, *args, &amp;amp;block)&lt;br /&gt;
        if @service_name != nil&lt;br /&gt;
            name = &amp;quot;%s.%s&amp;quot; % [@service_name, name]&lt;br /&gt;
        end&lt;br /&gt;
        return ServiceProxy.new(@service_url, name)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def respond_to?(sym)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def call(*args)&lt;br /&gt;
        postdata = {&amp;quot;method&amp;quot; =&amp;gt; @service_name, &amp;quot;params&amp;quot; =&amp;gt; args, &amp;quot;id&amp;quot; =&amp;gt; &amp;quot;jsonrpc&amp;quot;}.to_json&lt;br /&gt;
        respdata = RestClient.post @service_url, postdata&lt;br /&gt;
        resp = JSON.parse respdata&lt;br /&gt;
        if resp[&amp;quot;error&amp;quot;] != nil&lt;br /&gt;
            raise JSONRPCException.new, resp[&#039;error&#039;]&lt;br /&gt;
        end&lt;br /&gt;
        return resp[&#039;result&#039;]&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PHP ==&lt;br /&gt;
&lt;br /&gt;
The [http://jsonrpcphp.org/ JSON-RPC PHP] library also makes it very easy to connect to Bitcoin.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
  require_once &#039;jsonRPCClient.php&#039;;&lt;br /&gt;
  &lt;br /&gt;
  $bitcoin = new jsonRPCClient(&#039;http://user:password@127.0.0.1:8332/&#039;);&lt;br /&gt;
   &lt;br /&gt;
  echo &amp;quot;&amp;lt;pre&amp;gt;\n&amp;quot;;&lt;br /&gt;
  print_r($bitcoin-&amp;gt;getinfo()); echo &amp;quot;\n&amp;quot;;&lt;br /&gt;
  echo &amp;quot;Received: &amp;quot;.$bitcoin-&amp;gt;getreceivedbylabel(&amp;quot;Your Address&amp;quot;).&amp;quot;\n&amp;quot;;&lt;br /&gt;
  echo &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Precision ===&lt;br /&gt;
&lt;br /&gt;
Because PHP has no option to JSON decode to accurate decimal class, you should internally use GMP. Treat each number like a large int with 8 decimal places (this can be trimmed for display).&lt;br /&gt;
&lt;br /&gt;
You will need to get a [https://github.com/genjix/bitcoin/tree/strrpc saner branch] and compile it. This treats every monetary value int64 8 decimal strings. So 1 BTC will be &amp;quot;100000000&amp;quot;. Use PHP&#039;s GMP functions to manipulate these values accurately.&lt;br /&gt;
&lt;br /&gt;
For converting between internal GMP numbers and display/user input, you can use these functions:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
# converts a user supplied number to our internal representation&lt;br /&gt;
#  3.14 =&amp;gt; &amp;quot;314000000&amp;quot;&lt;br /&gt;
# accepts strings, floats and ints as input&lt;br /&gt;
function numstr_to_internal($numstr)&lt;br /&gt;
{&lt;br /&gt;
    return bcmul($numstr, pow(10, 8), 0);&lt;br /&gt;
}&lt;br /&gt;
# converts an internal number to an end user number for display as defined by precision&lt;br /&gt;
#   314100000 =&amp;gt; &amp;quot;3.14&amp;quot;&lt;br /&gt;
# accepts GMP numbers, ints and strings as input&lt;br /&gt;
function internal_to_numstr($num, $precision=2)&lt;br /&gt;
{&lt;br /&gt;
    $repr = gmp_strval($num);&lt;br /&gt;
    $repr = bcdiv($repr, pow(10, 8), $precision);&lt;br /&gt;
    # now tidy output...&lt;br /&gt;
    # trim trailing 0s&lt;br /&gt;
    $repr = rtrim($repr, &#039;0&#039;);&lt;br /&gt;
    # and a trailing . if it exists&lt;br /&gt;
    $repr = rtrim($repr, &#039;.&#039;);&lt;br /&gt;
    return $repr;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$num_internal = numstr_to_internal(&amp;quot;3.141&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;p&amp;gt;&amp;quot;.$num_internal.&amp;quot;&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
$num_display = internal_to_numstr($num_internal);&lt;br /&gt;
echo &amp;quot;&amp;lt;p&amp;gt;&amp;quot;.$num_display.&amp;quot;&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need to do a decimal division in GMP, then GMP only supports integer division + a remainder ([http://php.net/manual/en/function.gmp-div-qr.php gmp_div_qr]). The work-around for this, is to use the bcmath module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$a = gmp_init(&amp;quot;100&amp;quot;);&lt;br /&gt;
$b = gmp_init(&amp;quot;3&amp;quot;);&lt;br /&gt;
echo &amp;quot;&amp;lt;p&amp;gt;&amp;quot;.bcdiv(gmp_strval($a), gmp_strval($b), 3).&amp;quot;&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that bcdiv uses strings.&lt;br /&gt;
&lt;br /&gt;
See also: [http://php.net/manual/en/ref.gmp.php GMP] and [http://php.net/manual/en/ref.bc.php BC Math] manuals.&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to tell Java to use HTTP Basic authentication is to set a default Authenticator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  final String rpcuser =&amp;quot;...&amp;quot;;&lt;br /&gt;
  final String rpcpassword =&amp;quot;...&amp;quot;;&lt;br /&gt;
  &lt;br /&gt;
  Authenticator.setDefault(new Authenticator() {&lt;br /&gt;
      protected PasswordAuthentication getPasswordAuthentication() {&lt;br /&gt;
          return new PasswordAuthentication (rpcuser, rpcpassword.toCharArray());&lt;br /&gt;
      }&lt;br /&gt;
  });&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once that is done, any JSON-RPC library for Java (or ordinary URL POSTs) may be used to communicate with the Bitcoin server.&lt;br /&gt;
&lt;br /&gt;
== Perl ==&lt;br /&gt;
&lt;br /&gt;
The JSON::RPC package from CPAN can be used to communicate with Bitcoin.  You must set the client&#039;s credentials; for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
  use JSON::RPC::Client;&lt;br /&gt;
  use Data::Dumper;&lt;br /&gt;
   &lt;br /&gt;
  my $client = new JSON::RPC::Client;&lt;br /&gt;
  &lt;br /&gt;
  $client-&amp;gt;ua-&amp;gt;credentials(&lt;br /&gt;
     &#039;localhost:8332&#039;, &#039;jsonrpc&#039;, &#039;user&#039; =&amp;gt; &#039;password&#039;  # REPLACE WITH YOUR bitcoin.conf rpcuser/rpcpassword&lt;br /&gt;
      );&lt;br /&gt;
  &lt;br /&gt;
  my $uri = &#039;http://localhost:8332/&#039;;&lt;br /&gt;
  my $obj = {&lt;br /&gt;
      method  =&amp;gt; &#039;getinfo&#039;,&lt;br /&gt;
      params  =&amp;gt; [],&lt;br /&gt;
   };&lt;br /&gt;
   &lt;br /&gt;
  my $res = $client-&amp;gt;call( $uri, $obj );&lt;br /&gt;
   &lt;br /&gt;
  if ($res){&lt;br /&gt;
      if ($res-&amp;gt;is_error) { print &amp;quot;Error : &amp;quot;, $res-&amp;gt;error_message; }&lt;br /&gt;
      else { print Dumper($res-&amp;gt;result); }&lt;br /&gt;
  } else {&lt;br /&gt;
      print $client-&amp;gt;status_line;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== .NET (C#) ==&lt;br /&gt;
The communication with rpc service can be achieved using the standard httprequest/response objects.&lt;br /&gt;
A library for serialising and deserialising Json will make your life a lot easier:&lt;br /&gt;
&lt;br /&gt;
* JayRock for .NET 4.0&lt;br /&gt;
* Json.Net for .NET 2.0 and above &lt;br /&gt;
&lt;br /&gt;
The following example uses Json.Net:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
 HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(&amp;quot;http://localhost.:8332&amp;quot;);&lt;br /&gt;
 webRequest.Credentials = new NetworkCredential(&amp;quot;user&amp;quot;, &amp;quot;pwd&amp;quot;);&lt;br /&gt;
 /// important, otherwise the service can&#039;t desirialse your request properly&lt;br /&gt;
 webRequest.ContentType = &amp;quot;application/json-rpc&amp;quot;;&lt;br /&gt;
 webRequest.Method = &amp;quot;POST&amp;quot;;&lt;br /&gt;
  &lt;br /&gt;
 JObject joe = new JObject();&lt;br /&gt;
 joe.Add(new JProperty(&amp;quot;jsonrpc&amp;quot;, &amp;quot;1.0&amp;quot;));&lt;br /&gt;
 joe.Add(new JProperty(&amp;quot;id&amp;quot;, &amp;quot;1&amp;quot;));&lt;br /&gt;
 joe.Add(new JProperty(&amp;quot;method&amp;quot;, Method));&lt;br /&gt;
 // params is a collection values which the method requires..&lt;br /&gt;
 if (Params.Keys.Count == 0)&lt;br /&gt;
 {&lt;br /&gt;
  joe.Add(new JProperty(&amp;quot;params&amp;quot;, new JArray()));&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
     JArray props = new JArray();&lt;br /&gt;
     // add the props in the reverse order!&lt;br /&gt;
     for (int i = Params.Keys.Count - 1; i &amp;gt;= 0; i--)&lt;br /&gt;
     {&lt;br /&gt;
        .... // add the params&lt;br /&gt;
     }&lt;br /&gt;
     joe.Add(new JProperty(&amp;quot;params&amp;quot;, props));&lt;br /&gt;
     }&lt;br /&gt;
  &lt;br /&gt;
     // serialize json for the request&lt;br /&gt;
     string s = JsonConvert.SerializeObject(joe);&lt;br /&gt;
     byte[] byteArray = Encoding.UTF8.GetBytes(s);&lt;br /&gt;
     webRequest.ContentLength = byteArray.Length;&lt;br /&gt;
     Stream dataStream = webRequest.GetRequestStream();&lt;br /&gt;
     dataStream.Write(byteArray, 0, byteArray.Length);&lt;br /&gt;
     dataStream.Close();&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     WebResponse webResponse = webRequest.GetResponse();&lt;br /&gt;
     &lt;br /&gt;
     ... // deserialze the response&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Command line (cURL) ==&lt;br /&gt;
&lt;br /&gt;
You can also send commands and see results using [http://curl.haxx.se/ cURL] or some other command-line HTTP-fetching utility; for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
  curl --user user --data-binary &#039;{&amp;quot;jsonrpc&amp;quot;: &amp;quot;1.0&amp;quot;, &amp;quot;id&amp;quot;:&amp;quot;curltest&amp;quot;, &amp;quot;method&amp;quot;: &amp;quot;getinfo&amp;quot;, &amp;quot;params&amp;quot;: [] }&#039; &lt;br /&gt;
    -H &#039;content-type: text/plain;&#039; http://127.0.0.1:8332/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will be prompted for your rpcpassword, and then will see something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  {&amp;quot;result&amp;quot;:{&amp;quot;balance&amp;quot;:0.000000000000000,&amp;quot;blocks&amp;quot;:59952,&amp;quot;connections&amp;quot;:48,&amp;quot;proxy&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;generate&amp;quot;:false,&lt;br /&gt;
     &amp;quot;genproclimit&amp;quot;:-1,&amp;quot;difficulty&amp;quot;:16.61907875185736,&amp;quot;error&amp;quot;:null,&amp;quot;id&amp;quot;:&amp;quot;curltest&amp;quot;}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also==&lt;br /&gt;
&lt;br /&gt;
* [[Original_Bitcoin_client/API_Calls_list|API calls list]]&lt;br /&gt;
* [[Running Bitcoin]]&lt;br /&gt;
* [[Lazy_API]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Articles using content from the old wiki]]&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6514</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6514"/>
		<updated>2011-04-01T16:27:02Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
# Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Bad idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Good(?) idea:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6513</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6513"/>
		<updated>2011-04-01T16:26:25Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
# Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
Bad idea: &lt;br /&gt;
&lt;br /&gt;
Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
Good(?) idea: &lt;br /&gt;
&lt;br /&gt;
Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6512</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6512"/>
		<updated>2011-04-01T16:21:38Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
# Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
Bad idea: Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
Good(?) idea: Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6511</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6511"/>
		<updated>2011-04-01T16:19:29Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
# Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
Bad idea: Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
&lt;br /&gt;
Good(?) idea: Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6510</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6510"/>
		<updated>2011-04-01T16:18:52Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
# Give a bitcoin address to a potential customer&lt;br /&gt;
# Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
# Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
# Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
# Give them what they paid for&lt;br /&gt;
# After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
Bad idea: Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
Good(?) idea: Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6509</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6509"/>
		<updated>2011-04-01T16:18:02Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for sending bitcoins:&#039;&#039;&#039;&lt;br /&gt;
Use the [https://mtgox.com/support/tradeAPI MtGox API]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution for receiving bitcoins:&#039;&#039;&#039;&lt;br /&gt;
# 1) Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
2) Give a bitcoin address to a potential customer&lt;br /&gt;
3) Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
4) Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
5) Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
6) Give them what they paid for&lt;br /&gt;
7) After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
Bad idea: Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
Good(?) idea: Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6508</id>
		<title>Lazy API</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lazy_API&amp;diff=6508"/>
		<updated>2011-04-01T16:13:58Z</updated>

		<summary type="html">&lt;p&gt;Dacoinminster: Created page with &amp;quot;For the incredibly lazy and/or incompetent web developer, I present the lazy man&amp;#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a f...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For the incredibly lazy and/or incompetent web developer, I present the lazy man&#039;s bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post])&lt;br /&gt;
&lt;br /&gt;
Problem: Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping card interface, or using ugly merchant services with callbacks.&lt;br /&gt;
&lt;br /&gt;
Solution for sending bitcoins:&lt;br /&gt;
Use the MtGox API (https://mtgox.com/support/tradeAPI)&lt;br /&gt;
&lt;br /&gt;
Solution for receiving bitcoins:&lt;br /&gt;
1) Input a list of bitcoin receiving addresses to your database&lt;br /&gt;
2) Give a bitcoin address to a potential customer&lt;br /&gt;
3) Have the customer tell you when they have sent the coins and have at least 1 confirmation&lt;br /&gt;
4) Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH)&lt;br /&gt;
5) Wait for more blocks (confirmations) if paranoid&lt;br /&gt;
6) Give them what they paid for&lt;br /&gt;
7) After a reasonable amount of time has passed, you can re-use the address for another customer&lt;br /&gt;
&lt;br /&gt;
You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.&lt;br /&gt;
&lt;br /&gt;
Bad idea: Selling bars of gold this way (owner of blockexplorer.com could rip you off)&lt;br /&gt;
Good(?) idea: Selling naked pictures of your grandma this way (owner of blockexplorer.com won&#039;t bother)&lt;/div&gt;</summary>
		<author><name>Dacoinminster</name></author>
	</entry>
</feed>