BlockBee.io - Payment API Documentation (v1.2.3)

Download OpenAPI specification:Download

Documentation for BlockBee's. Before you start using our API, you will need an api key. To obtain one register here.

Receive a payment

These endpoints simplify the process of generating unique payment addresses for each transaction, allowing you to track and manage payments more efficiently.

Create New Address

This method is used to generate a new address to give your clients, where they can send payments.

Please keep in mind that before making any transaction, you should check the minimum transfer limit for the specific cryptocurrency or token you want to use. If you transfer an amount that's less than the minimum limit set by BlockBee, your transaction will be rejected.

To save time and energy, it's recommended to check the pre-existing libraries for the features or functions you need before delving into the documentation.

Notice: The length of this request can't surpass the 8192 characters!

Request
path Parameters
ticker
required
string

The "ticker" parameter in this API request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, or the token and it's network/blockchain.

For example, btc is the ticker for Bitcoin, and trc20/usdt is the ticker for USDT over TRC-20. Having this in mind, a request for USDT over TRC-20 will look like this: https://api.blockbee.io/trc20/usdt/create/.

Note: You can find all our tickers in our cryptocurrencies page.

query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

callback
required
string

The URL the callbacks will be sent to. Must be a valid URL.

Attention:

- The callback URL should be unique. Duplicated callback URLs will return the same address_in. You can make your callback URL unique by adding GET parameters, like: ?user_id=1234

- The callback URL needs to be urlencoded, otherwise the GET parameters you add may be lost.

For a complete list of fields sent by our system, please refer to our callback documentation.

Note: To prevent repeated callbacks to your systems, the response to the callback request should be *ok* in plain text.

address
string

The address parameter is where you specify where BlockBee will forward your payment. You can enter a single address or multiple addresses if you want to split the payment to multiple addresses.

If you're using multiple addresses, you'll need to format them like this: <percentage_1>@<address_1>|<percentage_2>@<address_2> and so on. Percentages can range from 0.0001 (0.01%) to 1.0 (100%) and must add up to 1.00 (100%).

Addresses must be valid for the ticker you're using, otherwise the API will reject the payment.

By default, addresses are set in BlockBee's Dashboard, and to be able to set them in this parameter you need to enable the option "Address Override" when creating the API Key.

Note: For multiple addresses, the minimum value per transaction (see cryptocurrencies page) is multiplied by the following formula: 1 + (N - 1) / 3, where N is the number of output addresses.

For more information about multi-address minimums, check our knowledge base.

pending
integer

Set this to 1 if you want to be notified of pending transactions (before they're confirmed)

For a complete list of fields sent by our system, please refer to our pending callback documentation.

Note: To prevent repeated callbacks to your systems, the response to the callback request should be *ok* in plain text.

confirmations
integer

Number of blockchain confirmations you want before receiving the callback (Min. 1).

post
integer

Set this to 1 if you wish to receive the callback as a POST request (default: GET).

priority
string

This parameter allows users to set the priority with which funds should be forwarded to the provided address. It reflects the amount of fees paid to the blockchain network and can affect the speed of transaction confirmation. It's different per currency/network.

For more information about this parameter, check our knowledge base.

multi_token
integer

Allows customers to pay with any token supported by the system, even if the token is different from what the user initially specified.

However, you should ensure that your Wallet supports the tokens you expect clients to pay with and that your system can handle price conversions.

For example, if a user wishes to receive 1000 USDT (or equivalent) and a client sends 1000 TRX, the system should be able to handle that scenario.

Disabled by default, set this to 1 to enable it.

For more information about this parameter, check our knowledge base.

Notice: Available only for TRC-20, BEP-20, ERC-20 and POLYGON networks.

multi_chain
integer

If enabled, allows you to create the same address on BEP-20, ERC-20 and POLYGON blockchains, which enables you to receive payments on BEP-20, ERC-20 and POLYGON blockchains.

However, it is important to note that this parameter only creates an address for the specified token, and if the token is not supported on the extra blockchain, the address will only be created on the selected blockchain. To avoid this from happen you must enable multi_token, and in blockchains where the token you're selecting is not supported will default for USDT.

Additionally, users should ensure that their Wallet supports both chains, as BlockBee cannot reverse any payments sent through an unsupported chain.

It can be paired with multi_token to accept any token sent by the customer, provided it's supported by our systems in the blockchain where was sent.

Disabled by default, set this to 1 to enable it.

Notice: Available only for BEP-20, ERC-20 and POLYGON chains.

For more information about this parameter, check our knowledge base.

convert
integer

Set this to 1 to enable it (default: 0).

If enabled, returns the converted value converted to FIAT in the callback, with the parameters value_coin_convert and value_forwared_coin_convert. The value of the fields are json-encoded.

Responses
200

Address was created

Response Schema: application/json
address_in
string

Generated Address, give this to your client

address_out
string

Your address(es), where the payment will be forwarded to, should be the same address(es) you provided.

callback_url
string

The callback URL you provided

priority
string

The confirmation priority you requested

status
string

Status

400

Error creating address

get/{ticker}/create/
Request samples
Response samples
application/json
{
  • "address_in": "14PqCsA7KMgseZMPwg6mJy754MtQkrgszu",
  • "address_out": "1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP (single address) {1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP: 0.70, 1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3: 0.30} (multiple addresses)",
  • "callback_url": "example.com/invoice/1234?payment_id=5678",
  • "priority": "default",
  • "status": "success"
}

Check Payment Logs

This method provides information and callbacks for addresses created through the "create" endpoint.

It returns a list of callbacks made at the specified callback, and allows to track payment activity and troubleshoot any issues.

Request
path Parameters
ticker
required
string

The "ticker" parameter in this API request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, or the token and it's network/blockchain.

For example, btc is the ticker for Bitcoin, and trc20/usdt is the ticker for USDT over TRC-20. Having this in mind, a request for USDT over TRC-20 will look like this: https://api.blockbee.io/trc20/usdt/logs/.

Note: You can find all our tickers in our cryptocurrencies page.

query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

callback
required
string

The URL of the callback. Must be the same URL provided when the payment was created

Notice: Must be URL Encoded.

Responses
200

List of payments sent to this callback.

Response Schema: application/json
address_in
string

Generated Address, give this to your client

address_out
string

Your address(es), where the payment will be forwarded to, should be the same address(es) you provided.

callback_url
string

The callback URL you provided

status
string

Status

notify_pending
boolean

Get notified of pending transactions

notify_confirmations
integer

Number of confirmations required before sending the callback

priority
string

The confirmation priority you requested

Array of objects (log_items)

List of payments made to this address

400

Your request couldn't be processed, please try again later.

404

No request or no payment callbacks found.

get/{ticker}/logs/
Request samples
Response samples
application/json
{}

Utils

These endpoints provide you with essential features to make conversions, get estimates, retrieve information, and generate QR codes.

Check Coin Information

Use this endpoint to retrieve information about the cryptocurrency you intend to use. This endpoint provides detailed information about the selected cryptocurrency.

Request
path Parameters
ticker
required
string

The "ticker" parameter in this API request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, or the token and it's network/blockchain.

For example, btc is the ticker for Bitcoin, and trc20/usdt is the ticker for USDT over TRC-20. Having this in mind, a request for USDT over TRC-20 will look like this: https://api.blockbee.io/trc20/usdt/info/.

Note: You can find all our tickers in our cryptocurrencies page.

query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

prices
integer

If you want to receive also the coin prices, set to 0 to disable the prices (default: 1)

Responses
200

Info fetched successfully

Response Schema: application/json
coin
string

Human readable name of the currency

minimum_transaction
integer

Minimum transaction value for this currency, values below this value are disregarded

minimum_fee
integer

BlockBee's minimum fee for this currency, in atomic units

fee_percent
number

Fee percentage for this currency

prices_updated
string

Datetime of the last price update

status
string

Status

prices
object

Object with the exchange rate of this currency in various FIAT currencies.

Keys are the names of the currencies, values are the exchange rates.

updated every 5min.

400

Error fetching info

get/{ticker}/info/
Request samples
Response samples
application/json
{
  • "coin": "Bitcoin",
  • "minimum_transaction": "20000",
  • "minimum_fee": "200",
  • "fee_percent": "1.00",
  • "prices_updated": "2019-10-14T13:00:09.585Z",
  • "status": "success",
  • "prices": "{'DKK': '56281.94', 'CAD': '10985.14', 'AED': '30517.01', 'BRL': '34243.36', 'USD': '8308.47', 'MXN': '160193.26', 'CNY': '58740.88', 'INR': '591471.72', 'JPY': '899719.16', 'HKD': '65173.93', 'GBP': '6616.08', 'EUR': '7535.35'}"
}

Generate QR Code

This method generates a base64-encoded image for payments

Request
path Parameters
ticker
required
string

The "ticker" parameter in this API request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, or the token and it's network/blockchain.

For example, btc is the ticker for Bitcoin, and trc20/usdt is the ticker for USDT over TRC-20. Having this in mind, a request for USDT over TRC-20 will look like this: https://api.blockbee.io/trc20/usdt/qrcode/.

Note: You can find all our tickers in our cryptocurrencies page.

query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

address
required
string

The payment address (address_in from our system)

value
integer

Value to request the user, in the main coin (BTC, ETH, etc). Optional.

Note: Some user wallets don't support this, only the address. Use at your own discretion.

size
integer

Size of the QR Code image in pixels. Min: 64 Max: 1024 Default: 512

Responses
200

The QR Code

Response Schema: application/json
status
string

Status

qr_code
string

Base64-encoded image of the QR Code. Use it like this: <img src='data:image/png;base64,{qr_code}' alt='Payment QR Code'/>

payment_uri
string

Payment URI, useful if you want to make a clickable payment button.

get/{ticker}/qrcode/
Request samples
Response samples
application/json
{
  • "status": "success",
  • "qr_code": "...",
  • "payment_uri": "..."
}

Estimate Blockchain Fees

This method allows you to estimate blockchain fees to process a transaction.

Attention: This is an estimation only, and might change significantly when the transaction is processed. BlockBee is not responsible if blockchain fees when forwarding the funds differ from this estimation.

Note: Does not include BlockBee's fees.

Request
path Parameters
ticker
required
string

The "ticker" parameter in this API request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, or the token and it's network/blockchain.

For example, btc is the ticker for Bitcoin, and trc20/usdt is the ticker for USDT over TRC-20. Having this in mind, a request for USDT over TRC-20 will look like this: https://api.blockbee.io/trc20/usdt/estimate/.

Note: You can find all our tickers in our cryptocurrencies page.

query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

addresses
integer

The number of addresses to forward the funds to. Default: 1

priority
string

Different per currency/network. Check our knowledge base for more information about this parameter.

Responses
200

Estimated cost

Response Schema: application/json
status
string

Status

estimated_cost
integer

Estimated cost in the coin

estimated_cost_currency
object

Object with the estimated cost in various FIAT currencies.

Keys are the names of the currencies, values are the estimated costs.

400

Your request couldn't be processed, please try again later

get/{ticker}/estimate/
Request samples
Response samples
application/json
{
  • "status": "success",
  • "estimated_cost": "0.00001",
  • "estimated_cost_currency": "{'USD': '0.09', 'EUR': '0.08', 'GBP': '0.07', 'CAD': '0.11', 'JPY': '10.21', 'AED': '0.33', 'DKK': '0.58', 'BRL': '0.46', 'CNY': '0.56', 'HKD': '0.69', 'INR': '6.67', 'MXN': '1.81', 'UGX': '310.74', 'PLN': '0.35', 'PHP': '4.56', 'CZK': '1.91', 'HUF': '27.95', 'BGN': '0.15', 'RON': '0.39', 'LKR': '18.02'}"
}

Convert Prices

With this method, you can effortlessly convert prices between FIAT and cryptocurrencies, or even between different cryptocurrencies.

Request
path Parameters
ticker
required
string

The "ticker" parameter in this API request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, or the token and it's network/blockchain.

For example, btc is the ticker for Bitcoin, and trc20/usdt is the ticker for USDT over TRC-20. Having this in mind, a request for USDT over TRC-20 will look like this: https://api.blockbee.io/trc20/usdt/convert/.

Note: You can find all our tickers in our cryptocurrencies page.

query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

value
required
number

Value you wish to convert in the cryptocurrency/token of the ticker you are using.

Example: value=10
from
required
string

Specify the currency you wish to convert from, whether it is FIAT or cryptocurrency.

Check our full list of supported cryptocurrencies.

FIAT currencies supported in this list are (if the FIAT currency you wish to use is not in this list, you may contact us in order to add it to our service):

  • (USD) United States Dollar
  • (EUR) Euro
  • (GBP) Great Britain Pound
  • (CAD) Canadian Dollar
  • (JPY) Japanese Yen
  • (AED) UAE Dollar
  • (MYR) Malaysian Ringgit
  • (IDR) Indonesian Rupiah
  • (THB) Thai Baht
  • (CHF) Swiss Franc
  • (COP) Colombian Peso
  • (SGD) Singapore Dollar
  • (RUB) Russian Ruble
  • (ZAR) South African Rand
  • (TRY) Turkish Lira
  • (LKR) Sri Lankan Rupee
  • (XAF) CFA Franc
  • (RON) Romanian Leu
  • (BGN) Bulgarian Lev
  • (HUF) Hungarian Forint
  • (CZK) Czech Koruna
  • (PHP) Philippine Peso
  • (PLN) Poland Zloti
  • (UGX) Uganda Shillings
  • (MXN) Mexican Peso
  • (INR) Indian Rupee
  • (HKD) Hong Kong Dollar
  • (CNY) Chinese Yuan
  • (BRL) Brazilian Real
  • (DKK) Danish Krone
Example: from=usd
Responses
200

The converted value plus exchange rate.

Response Schema: application/json
value_coin
number

Converted value for the selected currencies.

exchange_rate
number

current exchange rate for the selected currencies

status
string

Status

400

Your request couldn't be processed, please try again later

get/{ticker}/convert/
Request samples
Response samples
application/json
{
  • "value_coin": "0.01",
  • "exchange_rate": "47000",
  • "status": "success"
}

Callbacks

This is the Callback documentation. Please note that these callbacks are sent by our API to your platform and are triggered when the user sends payment(s) to the address(es) generated by our system. It is essential that your platform is capable of handling these callbacks.

The callbacks are sent with an additional header, x-ca-signature, which is a base64-encoded 1024-bit RSA-SHA256 signature of the callback. The signed data depends on the type of callback you are receiving. If the callback is sent via GET, the full request URL to your system (including all GET parameters) is signed. If the callback is sent via POST, the entire body of the request is signed.

The Public Key for the verification can be retrieved from this endpoint.

Check our knowledge base to learn how to verify the callback with code samples.

Pending CallbackWebhook

Callback issued when a client's transaction is pending confirmation.

Note 1: Only issued if you have requested to be notified of pending transactions.

Note 2: Sent via POST if post=1 parameter set, else sent via GET

We strongly advise against whitelisting our callback IPs, because they might change in the future without warning, but if you really need to, at this moment the callbacks will be sent from the following IPs: 145.239.119.223 and 135.125.112.47

Request
query Parameters
uuid
string

This is an unique identifier to each payment your clients have made, so you can easily track any duplicate callbacks sent, in the case our system doesn't mark the callback as successful

Example: uuid=dbfcb40e-5a6b-4305-9fa2-b0fbda6e3ff2
address_in
string

Address where your client's payment was received

Example: address_in=3PFoGK63cVVUWnd2vu7W1kM83NXUfvzMqM
address_out
string

Address(es) where we forwarded your payment

Example: address_out=1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP (single address) {1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP: 0.70, 1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3: 0.30} (multiple addresses)
txid_in
string

Transaction hash of your client's payment

Example: txid_in=a2174ffd39289100709f2a07b129cdbba69df2e22e5be1830221dab1fd4e332c
confirmations
integer

Number of confirmations of the current transaction

Example: confirmations=1
value
integer
Deprecated

Value of the payment in integer. Field meant to help with precise calculations on some platforms

Notice: For some stable coins (e.g USDT or BUSD), this field always come rounded to 'cents' (two decimals), meaning you must always divide it by 100.
Example: If value=1054, 1054/100=10.54.

It's recomended to use the value_coin field instead.

Example: value=50000
value_coin
number

Value of the payment

Example: value_coin=0.05
value_coin_convert
string

Converted value to various FIAT currencies of the value_coin. Response is json-encoded.

Notice: This parameter will only be shown if added the convert=1 parameter in the /create/ endpoint.

Example: value_coin_convert={"USD": "3.20", "EUR": "3.05", "GBP": "2.62", "CAD": "4.16", "JPY": "431.90", "AED": "11.77", "DKK": "22.67", "BRL": "16.52", "CNY": "21.43", "HKD": "25.16", "INR": "249.97", "MXN": "64.95", "UGX": "11975.46", "PLN": "14.25", "PHP": "173.14", "CZK": "75.37", "HUF": "1220.10", "BGN": "5.94", "RON": "15.02", "LKR": "1153.30", "TRY": "55.54", "ZAR": "51.36", "RUB": "181.24"}
coin
string

Ticker of the coin used for the payment: ['btc', 'bch', 'ltc', 'eth', 'trx']

For ERC-20 (ETH) Tokens, this parameter will be erc20_ + the ticker of the token, e.g erc20_usdt

For TRC-20 (Tron) Tokens, this parameter will be trc20_ + the ticker of the token, e.g trc20_usdt

For BEP-20 (BSC) Tokens, this parameter will be bep20_ + the ticker of the token, e.g bep20_usdt

For Polygon Tokens, this parameter will be polygon_ + the ticker of the token, e.g polygon_usdt

Example: coin=btc
price
number

Coin price in USD at the time of receiving

Example: price=55.59
pending
integer

1 if transaction is pending

Example: pending=1
Responses
200

Expected response from your server

Response Schema: text/plain
string
Response samples
text/plain
*ok*

Confirmed CallbackWebhook

Callback issued when a client's transaction has been confirmed by the network.

Note: Sent via POST if post=1 parameter set, else sent via GET

We strongly advise against whitelisting our callback IPs, because they might change in the future without warning, but if you really need to, at this moment the callbacks will be sent from the following IPs: 145.239.119.223 and 135.125.112.47

Note: To prevent repeated callbacks to your systems, the response to the callback request should be *ok*.

Request
query Parameters
uuid
string

This is an unique identifier to each payment your clients have made, so you can easily track any duplicate callbacks sent, in the case our system doesn't mark the callback as successful

Example: uuid=dbfcb40e-5a6b-4305-9fa2-b0fbda6e3ff2
address_in
string

Address where your client's payment was received

Example: address_in=3PFoGK63cVVUWnd2vu7W1kM83NXUfvzMqM
address_out
string

Address(es) where we forwarded your payment

Example: address_out=1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP (single address) {1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP: 0.70, 1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3: 0.30} (multiple addresses)
txid_in
string

Transaction hash of your client's payment

Example: txid_in=a2174ffd39289100709f2a07b129cdbba69df2e22e5be1830221dab1fd4e332c
txid_out
string

Transaction hash of our the payment forwarded to you

Example: txid_out=a2174ffd39289100709f2a07b129cdbba69df2e22e5be1830221dab1fd4e332c
confirmations
integer

Number of confirmations of the current transaction

Example: confirmations=1
fee
integer
Deprecated

BlockBee fee in integer. Field meant to help with precise calculations on some platforms

Example: fee=500
value
integer
Deprecated

Value of the payment in integer. Field meant to help with precise calculations on some platforms

Notice: For some stable coins (e.g USDT or BUSD), this field always come rounded to 'cents' (two decimals), meaning you must always divide it by 100.
Example: If value=1054, 1054/100=10.54.

It's recomended to use the value_coin field instead.

Example: value=50000
value_coin
number

Value of the payment

Example: value_coin=0.05
value_coin_convert
string

Converted value to various FIAT currencies of the value_coin. Response is json-encoded.

Notice: This parameter will only be shown if added the convert=1 parameter in the /create/ endpoint.

Example: value_coin_convert={"USD": "3.20", "EUR": "3.05", "GBP": "2.62", "CAD": "4.16", "JPY": "431.90", "AED": "11.77", "DKK": "22.67", "BRL": "16.52", "CNY": "21.43", "HKD": "25.16", "INR": "249.97", "MXN": "64.95", "UGX": "11975.46", "PLN": "14.25", "PHP": "173.14", "CZK": "75.37", "HUF": "1220.10", "BGN": "5.94", "RON": "15.02", "LKR": "1153.30", "TRY": "55.54", "ZAR": "51.36", "RUB": "181.24"}
value_forwarded
integer
Deprecated

Value forwarded to you, after fees in integer. Field meant to help with precise calculations on some platforms

Example: value_forwarded=50000
value_forwarded_coin
number

Value forwarded to you, after fees

Example: value_forwarded_coin=0.05
value_forwarded_coin_convert
string

Converted value to various FIAT currencies of the value_forwarded_coin. Response is json-encoded.

Notice: This parameter will only be shown if added the convert=1 parameter in the /create/ endpoint.

Example: value_forwarded_coin_convert={"USD": "3.17", "EUR": "3.01", "GBP": "2.59", "CAD": "4.12", "JPY": "427.16", "AED": "11.64", "DKK": "22.41", "BRL": "16.33", "CNY": "21.20", "HKD": "24.88", "INR": "247.19", "MXN": "64.25", "UGX": "11855.29", "PLN": "14.08", "PHP": "171.25", "CZK": "74.50", "HUF": "1206.19", "BGN": "5.88", "RON": "14.86", "LKR": "1140.51", "TRY": "54.93", "ZAR": "50.82", "RUB": "179.22"}
fee_coin
number

BlockBee Fee

Example: fee_coin=0.02
coin
string

Ticker of the coin used for the payment: ['btc', 'bch', 'ltc', 'eth', 'trx']

For ERC-20 (ETH) Tokens, this parameter will be erc20_ + the ticker of the token, e.g erc20_usdt

For TRC-20 (Tron) Tokens, this parameter will be trc20_ + the ticker of the token, e.g trc20_usdt

For BEP-20 (BSC) Tokens, this parameter will be bep20_ + the ticker of the token, e.g bep20_usdt

For Polygon Tokens, this parameter will be polygon_ + the ticker of the token, e.g polygon_usdt

Example: coin=btc
price
number

Coin price in USD at the time of receiving

Example: price=55.59
pending
integer

If 0 means transaction was paid.

Example: pending=0
Responses
200

Expected response from your server

The callback will be marked as successful when it receives the following response from your server

Response Schema: text/plain
string
Response samples
text/plain
*ok*

Checkout - Payments

Documentation on how to use the Checkout feature to handle payments for your platform. The Checkout feature allows users to receive and manage payments with ease.

Create a Checkout Payment

This method allows you to create a new Checkout payment. Please don't forget to set your payment settings in BlockBee's Dashboard.

Request
query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

redirect_url
required
string

URL where your customers will be redirected to after successfully completing the payment. A success token will be added as GET parameter to this URL, together with any GET parameter you might have provided in your redirect_url, which you can use to validate that the client is coming from BlockBee.

Example: redirect_url=https://example.com/success/?order_id=12345
value
required
number

Value of the order in the currency set in BlockBee's Dashboard payment settings.

Example: value=10
item_description
string

Description of the product or service being paid. This information will appear on the checkout page.

Example: item_description=Description of the product you are selling
expire_at
number

Epoch time in seconds at which the Checkout payment will expire. Minimum is 1h. If not set, it will never expire.

Example: expire_at=1673438907
notify_url
string

Optional URL where our system will send a payment notification (IPN) when the order is paid. Similar functionality as callback_url of the base API.

For a complete list of fields sent by our system, please refer to our callback documentation.

Note: To prevent repeated callbacks to your systems, the response to the IPN request should be *ok* in plain text.

post
number

Set this to 1 if you wish to receive the payment notification (IPN) in your notify_url as a POST request (default: GET)

Example: post=1
Responses
200

Payment URL was created successfuly.

Response Schema: application/json
status
string

Status

success_token
string

Security token only known to your systems so you can make sure the order was actually paid by your customer.

payment_url
string

Payment URL where you should redirect your customer.

400

Your request couldn't be processed, please try again later

get/checkout/request/
Request samples
Response samples
application/json
{}

IPN for PaymentsWebhook

IPN issued when the payment has been confirmed by the network. Will be sent to the URL provided in notify_url.

Note: Sent via POST if post=1 parameter set, else sent via GET

We strongly advise against whitelisting our callback IPs, because they might change in the future without warning, but if you really need to, at this moment the callbacks will be sent from the following IPs: 145.239.119.223 and 135.125.112.47

Note: To prevent repeated IPNs sent to your systems, please respond with *ok* to our IPNs.

Request
query Parameters
payment_url
string

URL from the Checkout where the payment was made.

Example: payment_url=https://pay.blockbee.io/deposit/fG78jtx96ugjtu0eIbeLmFB9z0feJf9N
redirect_url
string

Redirect URL provided in the payment request.

Example: redirect_url=https://example.com/success/?order_id=12345
value
number

Value you provided in the payment request.

Example: value=20000
success_token
string

Security token only known to your systems so you can make sure the order was actually paid by your customer.

Example: success_token=fG78jtx96ugjtu0eIbeLmFB9z0feJf9NfG78jtx96ugjtu0eIbeLmFB9z0feJf9N
currency
string

FIAT currency. It will be the same that you set in BlockBee's Dashboard.

Example: currency=usd
is_paid
string

1 if the payment was completed. Can be 0 if user sent a partial payment.

Example: is_paid=done
paid_amount
string

Amount paid in the cryptocurrency described in the parameter paid_coin.

Example: paid_amount=1.23
paid_coin
string

Cryptocurrency used to make the payment.

Example: paid_coin=btc
exchange_rate
number

Exchange rate at the time of the payment.

Example: exchange_rate=20000
txid
string

Transaction hash(es) of your client's payment(s).

Example: txid=0xa7551df44e487f9c0507d68d90193cde2604dfcefdc975bae54535a2e0f80b32,0x6e8b278e3db1948d2c694b7f709dd4e864ae80d516970ebfd05a98629b6efe15,0x387c6250b3e86f7372b9c49d00497f1b26b373d40801c9e60a97ef5124b6b75c
address
string

Address where your client's payment was received

Example: address=3PFoGK63cVVUWnd2vu7W1kM83NXUfvzMqM
status
string

Status of the transaction.

Example: status=done
Responses
200

Expected response from your server

The callback will be marked as successful when it receives the following response from your server

Response Schema: text/plain
string
Response samples
text/plain
*ok*

Checkout - Deposits

Documentation on how to use the Checkout feature to handle deposits for your platform. The Checkout feature allows users to manage deposits with ease.

Create a Checkout Deposit

This method allows you to create a new Checkout deposit. Please don't forget to set your payment settings in BlockBee's Dashboard.

Request
query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

notify_url
required
string

URL where our system will send a payment notification (IPN) when the order is paid. Similar functionality as callback_url of the base API.

For a complete list of fields sent by our system, please refer to our IPN for Deposits documentation.

Note: To prevent repeated callbacks to your systems, the response to the IPN request should be *ok* in plain text.

item_description
string

Description of the product or service being paid. This information will appear on the checkout page.

Example: item_description=Description of the product you are selling
post
number

Set this to 1 if you wish to receive the payment notification (IPN) in your notify_url as a POST request (default: GET)

Example: post=1
Responses
200

Deposit URL was created successfuly.

Response Schema: application/json
status
string

Status

payment_url
string

Payment URL where you should redirect your customer.

400

Your request couldn't be processed, please try again later

get/deposit/request/
Request samples
Response samples
application/json

IPN for DepositsWebhook

IPN issued when the deposit has been confirmed by the network. Will be sent to the URL provided in notify_url.

Note: Sent via POST if post=1 parameter set, else sent via GET

We strongly advise against whitelisting our callback IPs, because they might change in the future without warning, but if you really need to, at this moment the callbacks will be sent from the following IPs: 145.239.119.223 and 135.125.112.47

Note: To prevent repeated IPNs sent to your systems, please respond with *ok* to our IPNs.

Request
query Parameters
uuid
string

This is an unique identifier to each payment your clients have made, so you can easily track any duplicate callbacks sent, in the case our system doesn't mark the callback as successful.

Example: uuid=afe11bea-768b-47ae-ba0f-907379fbe5ef
txid
string

Transaction hash(es) of your client's payment(s).

Example: txid=0xa7551df44e487f9c0507d68d90193cde2604dfcefdc975bae54535a2e0f80b32,0x6e8b278e3db1948d2c694b7f709dd4e864ae80d516970ebfd05a98629b6efe15,0x387c6250b3e86f7372b9c49d00497f1b26b373d40801c9e60a97ef5124b6b75c
address
string

Address where your client's payment was received

Example: address=3PFoGK63cVVUWnd2vu7W1kM83NXUfvzMqM
payment_url
string

URL from the Checkout where the payment was made.

Example: payment_url=https://pay.blockbee.io/deposit/fG78jtx96ugjtu0eIbeLmFB9z0feJf9N
currency
string

FIAT currency. It will be the same that you set in BlockBee Dashboard.

Example: currency=usd
paid_amount
string

Amount paid in the cryptocurrency described in the parameter paid_coin.

Example: paid_amount=1.23
paid_amount_fiat
string

Amount paid in the FIAT currency described in the parameter currency.

Example: paid_amount_fiat=21234.32
paid_coin
string

Cryptocurrency used to make the payment.

Example: paid_coin=btc
status
string

Status of the transaction.

Example: status=done
Responses
200

Expected response from your server

The callback will be marked as successful when it receives the following response from your server

Response Schema: text/plain
string
Response samples
text/plain
*ok*

Payouts

Endpoint on how to create Payouts Requests. However, after successfully creating a Payout Request, you will still need to visit our Dashboard to complete the payment process.

Create a Payout Request

Use this method to create a new Payout Request, which is a request for a payment you wish to send to your customer. Once you have created the Payout Request, you can fulfill it using BlockBee's Dashboard by sending multiple payments to all your customers. This process streamlines the payment process, allowing you to handle multiple transactions efficiently and accurately.

Request
path Parameters
ticker
required
string

The "ticker" parameter in this API request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, or the token and it's network/blockchain.

For example, btc is the ticker for Bitcoin, and trc20/usdt is the ticker for USDT over TRC-20. Having this in mind, a request for USDT over TRC-20 will look like this: https://api.blockbee.io/trc20/usdt/payout/.

Note: You can find all our tickers in our cryptocurrencies page.

query Parameters
apikey
required
string

API Key provided by BlockBee's Dashboard.

address
required
string

Provide the destination address for the payment or withdrawal. This is the address where you want the funds to be sent.

Example: address=TGfBcXvtZKxxku4X8yx92y56HdYTATKuDF
value
required
number

Please indicate the amount you wish to send to the provided destination address. This is the amount that will be transferred or withdrawn from your account.

Example: value=1.34
Responses
200

Payout Request created successfully

Response Schema: application/json
status
string

Status

400

Your request couldn't be processed, please try again later

get/{ticker}/payout/
Request samples
Response samples
application/json
{
  • "status": "success"
}