CatLab Bitcoin Gateway

An API, developed for programmers who want to easily implement Bitcoin in their projects. Our goal is to provide a very clean user Bitcoin experience without actually having to mess with the Bitcoin API. For your users, it will look like a regular Bitcoin transfer, but we will make the magic happen for you. No weird javascript popup, no annoying 3rd party services, just a plain ol' "Please transfer the coins to this address" interface.

Bitcoins are only very temporary stored on this server. As soon as a transaction is finished, the bitcoins are sent to their respective owners.

Want to check it out first? Go to home.catlab.be/bitcoin to give this a try on the test network. Might not be online 24/7 though!

Usage

In 5 steps:

  1. Calculate the total bitcoin cost for your customer.
  2. Request a personal Bitcoin address for your customer and tell us how much Bitcoins he has to pay. (/v1/request)
  3. Wait until the customer paid his debt and until our server contacts your server.
  4. Confirm that the callback is valid by asking more details about the transaction from our server. (/v1/validate)
  5. Done! Send the items to your customer.

We also have example scripts of the request procedure and the callback, to get you started even faster, although you might want to write your implementation a little cleaner.

Cost

We will charge a 1% + transaction fee cost.

API

/v1/request

Get a new bitcoin address for your customer and register a callback.

POST parameters:

key
Your private catlab-bitcoin-gateway key. (Generate here)
callback
Callback to be called when all (confirmed) bitcoins are received on the new address.
amount
The amount of bitcoins you expecting. The callback will only be called when amount credits have arrived.
address
The bitcoin address where the coins will be sent to after confirmation.
immediately
Value: 1 or 0. Define if the received bitcoins should be sent to address immediately or only once a day. (Default value: 1. Set to 0 to reduce transaction fees.)
confirmations
Default: 6. The amount of validation we have to receive before we will call the callback. However, we always wait before sending the bitcoins to your address until 6 confirmations have been received.

Return value

JSON object with following attributes:

address
The address that you should present to your client.
/v1/validate

Return all information about a certain transactions. In order to increase security, a validationcode will only be valid within the first 15 minutes after a callback was initiated.

POST parameters:

validationcode
The code that you have received in the callback.
key
Your private catlab-bitcoin-gateway key. (Generate here)

Return value:

JSON object with the following attributes:

date
The date the transfer was sent.
amount
The total amount of bitcoins you have received.

Callback

Whenever you receive a payment on one of your addresses, we will contact your callback and POST following data:

validationcode
A secret code that allows you to validate the transfer against our /validate service.

Return value

Your callback API should return the plaintext OK. As long as we didn't receive the OK from your server, we will keep trying to contact your server in (incrementing) intervals. After 2 days, however, we will give up. Your bitcoins will be sent to your address before the callback is executed, so you will receive them in any case.

Frequently asked questions

Why don't you have a proper website?

We're trying to make a nice webservice that can easily be used by programmers. We are not providing services for end users or shop owners.

Can we trust you?

Yes you can! Besides, you don't really have to trust us. If you notice that your payments are not immediately send to your private bitcoin account, you can stop using our service right away. However, we promise we'll be good.

Will you stay online?

This API was mainly created to be used in the projects of CatLab Interactive, so we need to keep it online for ourselves. We'll make sure you won't encounter any problems. :)

How can we contact you?

Please use the contact form at our support center.