Home > Uncategorized > Accept Bitcoin payments in your #App or #Website using BitcoinToBankAccount.com #API

Accept Bitcoin payments in your #App or #Website using BitcoinToBankAccount.com #API

BITCOIN TO BANK ACCOUNT API

An API to automate Bitcoin to BACS / SWIFT transfers.

 

INTRODUCTION

BitcoinToBankAccount.com offers a service where a payment made in bitcoin can be paid back out via BACS / SWIFT (Electronic bank transfer) for a low fixed fee, and within 24 hours. It uses Stripe as a payment processor.

This API allows your website or software accept bitcoin payments, by allowing the customer make a payment to a specified Bitcoin Wallet. Then once the payment has been verified, make the bank transfer back to your account, and then provide the service to the customer.

Since payments are asynchronous, you need to  poll on the wallet, to wait for the transaction to appear from the consumer. We recommend polling every 1 second for a maximum of 10 minutes.  

GETTING STARTED

The API endpoint is located at the following URL:

https://www.bitcointobankaccount.com/api/api.asmx

Ensure to use the “https” version of the API, since this ensures a level of security in the data being sent.

The steps involved are:

  • Call MakeTransfer with the amount of Bitcoin being paid, you will receive a Wallet and SessionID in return. You should ask the consumer to make a payment to the Bitcoin Wallet.

  • Call PollOnTransfer every second for up to 10 minutes, passing the SessionID returned from MakeTransfer, until a status of true is returned

  • Finally call MakeBankTransfer passing your Account number, Sort code, IBAN, and SWIFT/BIC code, and the SessionID as before. This will return true if the data is valid, the bank transfer will appear within 24 hours.

C# Example

  1. Create a new console application in Visual Studio

  2. Make a service reference to https://www.bitcointobankaccount.com/api/api.asmx call the reference “Bitcoin”

  3. Add the following code
using System;

using ConsoleApplication1.Bitcoin;
namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           var client = new apiSoapClient(“apiSoap”);

           var tx = client.MakeTransfer(0.1);

           Console.WriteLine(“Waiting for Bitcoin payment to wallet: ” + tx.Wallet);

           var isReady = false;

           for (var i = 0; i<600; i ++)

           {

               isReady = client.PollOnTransfer(tx.Session);

               if (isReady) break;

               System.Threading.Thread.Sleep(TimeSpan.FromSeconds(1));

           }

           if (!isReady)

           {

               Console.WriteLine(“Bitcoin Payment not received”);

               return;

           }

           Console.WriteLine(“Bitcoin Payment received and verified”);

           var isOK = client.MakeBankTransfer(“82982675”, “904974”, “IE4482982675904974”, “BOFII2D”, tx.Session);

           if (isOK)

           {

               Console.WriteLine(“Bank Transfer Made”);

           }

           else

           {

               Console.WriteLine(“Bank transfer failed, please check account details”);

           }

       }

   }

}

Fees

There is a fixed fee per transaction, which is deducted before the bank transfer is made, the currency is deduced from the destination bank account.

Currency

Fee

USD 0.6
ISK 70
HKD 5
TWD 19
CHF 0.60
EUR 0.55
DKK 4
CLP 8
CAD 0.80
CNY 4
 THB 21
AUD 0.80
SGD 0.80
KRW 726
JPY 70
PLN 2
GBP 0.50
SEK 5
NZD 0.80
BRL 2
RUB 36

Advertisement
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: