QR Code Images
Generate QR codes for easy mobile payments
Endpoint
GET
/v1/order/{order_id}/qrThis endpoint does not require authentication
Query Parameters
| Parameter | Required | Description |
|---|---|---|
| format | No | Image format: "png" (default), "svg", or "base64" |
| size | No | Image size in pixels (default: 256, max: 1024) |
| include_amount | No | Include amount in QR code: "true" (default) or "false" |
With Amount vs Address Only
With Amount (Default)
QR code contains the payment URI with embedded amount:
bnb:0x9876...?amount=1.202887Benefits: User's wallet automatically fills in the amount, reducing errors
Address Only
QR code contains only the address:
0x9876543210987654321098765432109876543210Use case: When user wants to manually enter the amount
Format Options
PNG (Default)
Returns a PNG image that can be directly displayed or downloaded:
GET /v1/order/MM1234567890/qr?format=png&size=512
Response: Binary PNG image
Content-Type: image/pngSVG
Returns a scalable vector graphic that can be resized without quality loss:
GET /v1/order/MM1234567890/qr?format=svg
Response: SVG XML
Content-Type: image/svg+xmlBase64
Returns a JSON response with base64-encoded image data:
GET /v1/order/MM1234567890/qr?format=base64
Response: {
"success": true,
"data": {
"qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"format": "png"
}
}Request Examples
Basic PNG QR Code
curl -X GET "https://api.mintmove.io/v1/order/MM1234567890/qr" \
-H "Accept: image/png" \
--output qr-code.pngLarge SVG QR Code
curl -X GET "https://api.mintmove.io/v1/order/MM1234567890/qr?format=svg&size=512" \
-H "Accept: image/svg+xml"Base64 for Embedding
curl -X GET "https://api.mintmove.io/v1/order/MM1234567890/qr?format=base64" \
-H "Content-Type: application/json"Display Usage Examples
HTML Image Tag
<img
src="https://api.mintmove.io/v1/order/MM1234567890/qr?size=256"
alt="Payment QR Code"
/>React Component
function QRCodeDisplay({ orderId }) {
const qrUrl = `https://api.mintmove.io/v1/order/${orderId}/qr?size=256`;
return (
<div>
<img src={qrUrl} alt="Scan to pay" />
<p>Scan with your wallet app to pay</p>
</div>
);
}Base64 Data URI
// Fetch base64 QR code
const response = await fetch(
'https://api.mintmove.io/v1/order/MM1234567890/qr?format=base64'
);
const data = await response.json();
// Use in img tag
<img src={data.data.qr_code} alt="QR Code" />Error Correction Levels
QR codes use automatic error correction levels based on the data size:
- • Level L (Low): ~7% error correction
- • Level M (Medium): ~15% error correction (default)
- • Level Q (Quartile): ~25% error correction
- • Level H (High): ~30% error correction
Higher error correction allows the QR code to be scanned even if partially damaged or obscured, but increases the QR code size.
Best Practices
- ✓Use PNG format for web display (good balance of quality and file size)
- ✓Use SVG format when you need to scale the QR code to different sizes
- ✓Include amount in QR code (default) to reduce user errors
- ✓Display QR code at least 256x256 pixels for easy scanning
- ✓Provide a fallback text address in case QR scanning fails