Lazy API: Difference between revisions

From Bitcoin Wiki
Jump to navigation Jump to search
Dacoinminster (talk | contribs)
Created page with "For the incredibly lazy and/or incompetent web developer, I present the lazy man's bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a f..."
 
Dacoinminster (talk | contribs)
No edit summary
Line 1: Line 1:
For the incredibly lazy and/or incompetent web developer, I present the lazy man's bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post])
For the incredibly lazy and/or incompetent web developer, I present the lazy man's bitcoin API (copied from [http://www.bitcoin.org/smf/index.php?topic=4324.msg77187#msg77187 a forum post]):


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.
'''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.


Solution for sending bitcoins:
'''Solution for sending bitcoins:'''
Use the MtGox API (https://mtgox.com/support/tradeAPI)
Use the [https://mtgox.com/support/tradeAPI MtGox API]


Solution for receiving bitcoins:
'''Solution for receiving bitcoins:'''
1) Input a list of bitcoin receiving addresses to your database
# 1) Input a list of bitcoin receiving addresses to your database
2) Give a bitcoin address to a potential customer
2) Give a bitcoin address to a potential customer
3) Have the customer tell you when they have sent the coins and have at least 1 confirmation
3) Have the customer tell you when they have sent the coins and have at least 1 confirmation

Revision as of 16:18, 1 April 2011

For the incredibly lazy and/or incompetent web developer, I present the lazy man's bitcoin API (copied from a forum post):

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.

Solution for sending bitcoins: Use the MtGox API

Solution for receiving bitcoins:

  1. 1) Input a list of bitcoin receiving addresses to your database

2) Give a bitcoin address to a potential customer 3) Have the customer tell you when they have sent the coins and have at least 1 confirmation 4) Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/address/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH) 5) Wait for more blocks (confirmations) if paranoid 6) Give them what they paid for 7) After a reasonable amount of time has passed, you can re-use the address for another customer

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.

Bad idea: Selling bars of gold this way (owner of blockexplorer.com could rip you off) Good(?) idea: Selling naked pictures of your grandma this way (owner of blockexplorer.com won't bother)