Skip to main content
Render a scannable QR code for a payment’s hosted checkout page. The endpoint uses the central public-origin helper: NEXT_PUBLIC_BASE_URL, its legacy NEXT_PUBLIC_API_BASE alias, then the production default https://flarehq.xyz (localhost in development). It encodes /checkout/{reference} and checks that the reference exists in the payment ledger. It does not check paid state or submit a transfer. This endpoint is public — no authentication is required — and can be dropped straight into an <img> tag.

Endpoint

Request

Headers

Query Parameters

string
required
The payment reference (e.g. arc_ref_k7x2m9lp4d8f1q2z) that must already exist in the payment ledger. Unknown references are rejected with HTTP 404.

Response

A successful request returns a PNG image (Content-Type: image/png), 400×400 px with a 2-unit margin, dark #0f172a modules on a white background, and a public cache lifetime of 1 hour. The QR encodes: https://flarehq.xyz/checkout/{reference}

Examples

Success Response

Error Responses

Notes

The reference is validated against the payment ledger before a QR is generated, so arbitrary or typo’d references return HTTP 404 instead of a meaningless code.
The public one-hour cache applies to the QR image, not invoice status. A QR can still point at an expired or paid invoice; the checkout must read the current invoice view. A scan is not settlement proof.