BlockchainAPI Logo
You must enable Javascript to continue to use this website.

BlockchainAPI is now a fully FREE Bitcoin API. We will continue to run this service free of charge for users to use our Bitcoin API.


Before we start, you can only send ONE payment to each generated address!

BlockchainAPI is an Ethereum payment processor API designed for simplicity, reliability, and compatibility.

One of the difficulties involved with receiving ethereum payments is the need to generate a unique address for each new user or invoice. These addresses need to be monitored and stored securely. Our API takes care of the generation and monitoring of addresses. We will notify your server using a simple callback whenever a payment is received.

Our API here at BlockchainAPI was designed to be extremely easy to use. No need to sign up, pay for a plan, or submit a merchant application. Just send a simple GET request to the API to generate a deposit address for your customer, and handle GET request callbacks sent when payments are received.

Remember that this API is fully compatible with existing applications based on's old Receive Payments API v1. The API methods work exactly the same way. The API is structured in this way because after took down their original Receive Payments API v1, many users were left without a merchant payment solution. We are now here to provide that solution to merchants like you. Feel free to use your existing code or applications to utilize our API; simply change your system's configured root API URL from "" to "" and you'll be all good.

Getting Started

If you do not have an Ethereum wallet yet, it's time to get one.
Our API requires that you have at least one Ethereum address to which all payments will be forwarded. The private key for this address does not need to be shared with us and can be kept offline for increased security. There are many different ways to get an Ethereum address. If you do not already have one, you can get one easily; see potential wallet options below.

Some things you need to know
If you are about to explore Ethereum, there are a few things you should know. Ethereum lets you exchange money in a different way than with usual banks. As such, you should take time to inform yourself before using Ethereum for any serious transaction. Ethereum should be treated with the same care as your regular wallet, or even more in some cases! Please see this link to see the note on the official Ethereum website.

API Structure

This is a hierarchy of our current API endpoints and methods.
While it is currently relatively small, our current array of endpoints and methods will grow in the future. The tree on the right shows the hierarchy we have online currently so you can visualize the structure of our system.

/api/eth methods related to receiving payments from customers

?method=create generate a new deposit address to present to a customer

?method=check_logs check logs for payments with callbacks sent to a given callback URL

Generate Address's

The create method of the receive endpoint generates a unique Ethereum address to which the customer may send payments.


  • HTTP Method: GET
  • URL:


Parameter Type Description
address String The address you would like for payments to be forwarded to. This must be a valid Ethereum address.
callback String The URL you would like for callbacks to be sent to. This must be a valid URL. Maximum length is 1024 characters. See more information on callbacks in the section below.
tor Boolean Is the website url a tor website or a normal website on the clearnet? This is important for if you want us to send callback requests to your tor website.

The following block shows an example of the request URL:

Response (Success)

  • HTTP Status Code: 200
  • Content Type: application/json

Response (Error)

  • HTTP Status Code: 500
  • Content Type: application/json

The following code shows an example of the response body in the event of an error:

"error": [{
    "The supplied address is not a valid Ethereum address."

Example Code

Below is a piece of example code written in HTML/PHP to create a form where users will be taken to a checkout page to complete their order:

# PHP Example To Generate Address Using HTML Form
$TOR = 'false';
$DESTINATION_ADDRESS = '0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7';
$PRODUCT_NAME = 'Test Product';
$AMOUNT = 20;
$COIN = 'ETH';

<form method="POST" action="">
    <input type="hidden" name="AMOUNT" value="<?php echo $VALUE; ?>" />
    <input type="hidden" name="TOR" value="<?php echo $TOR; ?>" />
    <input type="hidden" name="CURRENCY" value="<?php echo $CURRENCY; ?>" />
    <input type="hidden" name="COIN" value="<?php echo $COIN; ?>" />
    <input type="hidden" name="DESTINATION_ADDRESS" value="<?php echo $DESTINATION_ADDRESS; ?>" />
    <input type="hidden" name="CALLBACK_URL" value="<?php echo urlencode($CALLBACK_URL); ?>" />
    <input type="hidden" name="PRODUCT_NAME" value="<?php echo $PRODUCT_NAME; ?>" />
    <input type="hidden" name="CANCEL_URL" value="<?php echo urlencode($CANCEL_URL); ?>" />
    <button type="submit">Submit form</button>

Receiving Callbacks

You'll need some server-side code to handle the callbacks sent by our system when a payment is detected.

As mentioned before, each time a payment is received and forwarded to your Ethereum address, your callback URL will be sent data about the payment. This is necessary for automated systems to know when a specific payment is sent. Our server will forward the payments and send these callbacks to your server immediately after payments are received and confirmed 1 times. After this, everytime the confimrations value changes, we will send another callback, up to 20 confirmations or 20 bad callback requests.

Callbacks will always be sent as POST requests containing the details of the payment and the forwarded transaction, in addition to any parameters already present in the callback URL. Once again, please recall that callback URLs have a maximum length of 1024 characters.

Remember that for security, you should make sure that you include a unique, secret parameter in your callback URL. This secret string will be passed back to the callback script when the callback is sent, along with any other parameters already present in the callback URL. It should be checked against the original secret string to ensure that the callback is coming from us and is not forged.

Callback Request

  • HTTP Method: POST

The following table lists all POST parameters that will be sent in the request to your server:


Parameter Type Description
valueETH BigInt The amount of Ethereum sent by the customer.
valueWEI Long The amount of Ethereum sent by the customer in WEI. 1 ether = 1,000,000,000,000,000,000 wei.
input_address String The Ethereum address (generated by the API earlier) to which customer sent the payment.
confirmations Int The number of times the transaction has been confirmed at the time the callback is sent. This will always be 1.
transaction_hash String The hash of the transaction in which the payment was forwarded to your Ethereum address.
destination_address String The destination address (that you supplied when generating the address) to which the payment was forwarded.
timestamp Int The timestamp at which the payment was created.
result Long Was the payment a success or not?
gas Long The gas provided for this transaction.
gasPrice Long The gas price of the transaction.

The following block shows an example of the response from our API in JSON:

"success": [{
    "callback_url": "",
    "callbacks": [{
        "timestamp": "2021-03-16 16:57:45",
        "result": true,
        "valueWEI": "5000000000",
        "valueETH": "0.000000005",
        "input_address": "1E2VSRsaW3Kb1gDkdRUGDo6knAKfi9iYsb",
        "confirmations": 1,
        "transaction_hash": "1afb2eebe6ee69ab52da0a3ed98f5506c4ef00edcad852e98da346f42c568960",
        "destination_address": "1LisLsZd3bx8U1NYzpNHqpo8Q6UCXKMJ4z"
        "gas" : "21000",
        "gasPrice" : "10000000000"

Expected Response

Callbacks will be marked as successful when our system returns a http status code of 200 in the response of the request to your callback url.

Example Code

// Payment Settings
$my_address = "1LisLsZd3bx8U1NYzpNHqpo8Q6UCXKMJ4z";
$desiredConfirmations = 12;

// If you're using a secret, put it in here
$secret = "7j0ap91o99cxj8k9";

// Start of checks
if(!isset($_GET['secret'])) {
    die('No secret found.');

if ($_GET["secret"] !== $secret) die();

// Make sure we have all the POST variables we want to get
if(!$_POST['input_address'] || !$_POST['input_transaction_hash'] || !$_POST['transaction_hash'] || !$_POST['valueWEI'] || !$_POST['gas'] || !$_POST['gasPrice'] || !$_POST['valueETH'] || !$_POST['confirmations'] || !$_POST['destination_address']) {
    die('One of more of the POST variables was not set in the request to our callback url.');
if ($_POST["destination_address"] !== $my_address) die();

$gas = $_POST["gas"];
$gasPrice = $_POST["gasPrice"];

$value_in_eth = $_POST["valueETH"];
$value_in_wei = $_POST["valueWEI"];

$transaction_fee = ($gasPrice * $gas); // Transaction fee in WEI

$input_address = $_POST["input_address"];
$input_transaction_hash = $_POST["input_transaction_hash"];
$transaction_hash = $_POST["transaction_hash"];
$confirmations = $_POST["confirmations"];

// Work out the real amount they sent to the our address
$totalSent = bcsub($value_in_wei, $transaction_fee); // Use BCMath extension to use this - it's for huge/large numbers that do not fit into 32bit

// Confirmation check to make sure the confirmations is above our desired amount
if($confirmations >= $desiredConfirmations) {
    // Insert your data into a database so you can later on, fetch that data and update it
} else {
    // Transaction has not reached our desired number of confirmations.
    // Keep waiting for confirmations to be larger

The following PHP code will check that 12 confirmations have passed before doing any functions such as adding the payment to the database.

Check Logs

The check_logs method of the receive endpoint returns logs for payments with callbacks sent to a given callback URL.


  • HTTP Method: GET
  • URL:

The following table lists all additional GET parameters for the request:


Parameter Type Description
callback String The callback URL, urlencoded, for which you would like to retreive a list of sent callbacks and corresponding payments. This must be a valid URL. Maximum length is 1024 characters.

The following block shows an example of the request URL (urlencoded):

Response (Success)

  • HTTP Status Code: 200
  • Content Type: application/json

Response (Error)

  • HTTP Status Code: 500
  • Content Type: application/json

The following code shows an example of the response body in the event of an error:

"error": [{
    "The supplied callback URL has never been sent any callbacks/notifications."

Test Endpoints

You can demo all of our API endpoints and methods below using our handy in-browser API testing client.

    "Choose a URL to request, fill out the parameter values, and hit "Send Request"!"