API Documentation
API Endpoint
All API calls are implemented as HTTP Post. Requests must be made to our API endpoint located at https://bitcoin-wallet-script.overfeat.com/api/[METHOD]API Setup
To utilize our API, all you have to do is obtain API Key and API Secret from your account. API Key and API Secret are used to authenticate your requests to our database.PHP Library
We have created a small, useful library to communicate with our API. You can download our PHP library at https://bitcoin-wallet-script.overfeat.com/page/api-documentation/codeAPI Functions
Our API consists of 4 methods which will enable you to accept Bitcoin payments. We are going to list some basic information and code related to each method below.Handling Callback Response
Once someone sends you a payment, we will send you a callback notification to inform you about that. Callback notifications are sent many times until the transaction is fully confirmed. Handling callback notifications (also called IPN) is pretty easy and can be understood by analyzing the code below.<?php include_once("BasiliskClient.php"); define("API_KEY", "YOUR_API_KEY"); define("API_SECRET", "YOUR_API_SECRET"); $transaction_id = $_POST["transaction_id"]; $address = $_POST["address"]; $amount = $_POST["amount"]; $confirmations = $_POST["confirmations"]; $hash = $_POST["hash"]; $auth_hmac = $_POST["auth_hmac"]; $api_client = new BasiliskClient(API_KEY, API_SECRET); $valid = $api_client->validatePayment($hash, $auth_hmac); if($valid == true) { // Process the payment. } else { exit("Could not verify the payment."); // Log for manual verification } ?>
Response Codes
Response codes allow you to have a better understanding of the working of our system. Response codes carry a unique message which can help you debug your application.500
- Unknown internal error401
- Invalid API details403
- Your account has been suspended or you do not have permissions to access API404
- Wrong coin abbreviation used200
- Success, check other parameters17
- You have been rate-limited, try again later19
- Invalid callback or success URL used21
- Amount too small28
- Amount exceeds your balance