Adding a logo removes part of the QR module grid. Error correction can compensate within limits, but excessive styling can still produce a code that cannot be scanned. Ironfang Render decodes the finished image and compares the payload before delivery. If styling or the logo breaks the code, the API returns 422 unscannable instead of delivering it.
Create a branded QR code
Adding a logo automatically selects the highest error-correction level.
curl -X POST https://api.ironfang.uk/renderwolf/v1/qr \
-H "Authorization: Bearer if_live_..." \
-H "Content-Type: application/json" \
-d '{
"data": "https://example.com/menu",
"size": 640,
"dots": "circle",
"dark": "#1b2a4a",
"logo_url": "https://example.com/logo.png",
"logo_size": 0.22
}' --output menu-qr.pngdots accepts square or circle. eyes styles the three finder squares and defaults to the selected dot style. Finder patterns remain solid to preserve their required 1:1:3:1:1 ratio. The API also validates colour polarity and contrast before rendering, returning a 400 response for invalid combinations.
Choose a dark-mode approach
For broad scanner compatibility, place a standard dark-on-light QR code on a light tile within the dark design. Set invert to true for light modules on a dark background. Modern phone cameras often read inverted codes, but many embedded and in-app scanners do not, so inversion is best limited to screens you control. Ironfang Render verifies inverted output against its negative before delivery.
A payment QR on an invoice PDF
Any stored template can include a QR code. Add an image element where the code should appear, then provide the QR specification with the render request.
The template. {{qr.pay}} is filled by the render call.
<div class="invoice-footer">
<p>Scan to pay invoice {{invoice}}</p>
<img src="{{qr.pay}}" width="150" height="150">
</div>Each qr entry is rendered, verified and injected as a variable at no additional charge.
curl -X POST https://api.ironfang.uk/renderwolf/v1/image/YOUR_TEMPLATE_ID \
-H "Authorization: Bearer if_live_..." \
-H "Content-Type: application/json" \
-d '{
"vars": { "invoice": "INV-2041" },
"qr": { "pay": { "data": "https://pay.example.com/INV-2041", "size": 300 } }
}' --output invoice-card.png