0

Can I develop an API which will accept bitcoins and normal currency using existing API's such as coinbase and stripe? This API when used by a merchant should be able to accept both bitcoins and regular currency on his website.?

4
  • I'm confused what your asking, are you asking us if you personally can make an API using other APIs that developers will use to include bitcoin and government issued currencies for payment? Maybe I'm missing something but I don't understand what the point would be. Are you trying to port it into a different programming language?
    – cubecubed
    Sep 16, 2014 at 23:06
  • No, What I mean to say is, instead of a merchant integrating stripe and coinbase into his website, can he not use an api which will already have these API's embedded in a single API ?
    – user19376
    Sep 16, 2014 at 23:12
  • Yes it is theoretically possible to do so, and probably rather straight forward. A merchant could always use an ecommerce Word Press plugin (or some other implementation) and at least in the case of WooCommerce use a payment method for accepting bitcoin and one for accepting an other payment method. I personally have developed a Bitcoin Woo Commerce plugin that uses Blockchain, please contact me if you are interested.
    – cubecubed
    Sep 16, 2014 at 23:17
  • Are you asking whether this is possible, or how to do it? If it's the former, the answer is going to be pretty short.
    – Nick ODell
    Sep 17, 2014 at 3:01

1 Answer 1

1

tl;dr It could be done, but doesn't seem to be incredibly useful as there are already systems that already do this, combined multiple payment methods into one easy to use system/API. (e.g. WooCommerce)

I don't know much about Ruby or Stripe, but the blockchain API is pretty easy to use and has some fairly decent docs. (API Docs) It just requires you to open the web page it specifies using a simple get request which will return a JSON string. Just unencode it and all of the informations is right there. It only requires one call to create the address to give the user. It will forward the bitcoin to the bitcoin account of your choosing. It will also send a callback to your URL of choice which will tell you when they send a payment. Make sure you don't send the user anything until the payment has at least one callback to prevent double spends. Six is the recommended number for high value payments.

I guess you could make an API of sorts where you specify what kind of payment method the user chooses then having it respond with just a single callback that would alert you when the payment complete was what ever the payment method. Which would have the benefit of the merchant using your API only needing to know your API instead of every API. However WooCommerce and other ecommerce tools acomplish this by allowing you to use multiple payment methods. For example you could use WooCommerce with their default credit card payment method in conjution with my Bitcoin payment method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.