Payment QR Code Generator

View as Markdown

This method generates a base64-encoded QR Code image for payments.

Method: GET

Path: https://api.blockbee.io/{ticker}/qrcode/


Parameters

Path Parameters

tickerstringRequired

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/.

Notes:


Query Parameters

apikeystringRequired

API Key provided by BlockBee's Dashboard. Unsure how to get yours? Check this tutorial.

Note: The API key can also be sent as a header named apikey.

addressstringRequired

The payment address (address_in from our system).

valueinteger

Value to request the user. Optional.

Notes:

  • If left empty the QR Code will only contain the address.
  • It is important to mention that the value parameter might not be compatible with many exchanges and wallets. While it works with Trust and Exodus wallets, some user wallets or exchanges may only read the address and ignore the value field (inserting both the address and the value in the address field). Hence, it is advised to use the value field cautiously and be aware that it may not be recognized by all wallets and exchanges, causing some confusion to the customer.

sizeinteger

Size of the QR Code image in pixels.

Min: 64 Max: 1024


Returns

Returns the base64-encoded QR Code image, and the payment URI.

statusstring

Status of the request. Should be success if the request didn't fail.

qr_codestring

Base64-encoded image of the QR Code.

Here is an example of how to use this:

html
<img src="data:image/png;base64,{qr_code}" alt="Payment QR Code"/>

You may use it in every situation where is supported, just don't forget to add data:image/png;base64, before the qr_code.

payment_uristring

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