This method generates a base64-encoded QR Code image for payments.
Method: GET
Path: https://api.blockbee.io/{ticker}/qrcode/
Parameters
Path Parameters
ticker
string
•Required
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:
- You can find all our tickers in our cryptocurrencies page.
Query Parameters
apikey
string
•Required
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
.
value
integer
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.
Returns
Returns the base64-encoded QR Code image, and the payment URI.
qr_code
string
Base64-encoded image of the QR Code.
Here is an example of how to use this:
<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.