{"uid":"cap_vdyuIanPzl-XN2LzNjR5j","slug":"qr-encode-svg-png-4bfa5357","name":"QR Encode (SVG/PNG)","description":"Encode text= into a QR code as SVG (default) or format=dataurl PNG. Offline, no upstream. Built for agents putting payment links, IBANs or URLs onto a page.","url":"https://402.com.tr/api/x402/qr-encode","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object"},"queryParams":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Payload"},"format":{"type":"string","description":"svg (default) or dataurl"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wZGQj4OwSP4hE3Ue0dWpp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes any text string — URL, IBAN, payment link — into a QR code returned as an inline SVG or a data-URL PNG, with no external upstream calls.","exampleAgentPrompt":"Can you generate a QR code for the payment link https://pay.example.com/invoice/9821 and give it to me as an SVG so I can embed it directly on the checkout page?","exampleUseCases":[{"title":"Payment link QR for invoice page","prompt":"Create a QR code for this crypto payment link https://402.com.tr/pay/abc123 and return it as an SVG so I can drop it straight onto the invoice page."},{"title":"IBAN QR code for bank transfer","prompt":"Encode my IBAN DE89370400440532013000 into a QR code — give it back as a PNG data URL so I can put it inside an img tag on the payment confirmation email."},{"title":"Landing page URL QR code","prompt":"Turn https://myshop.example.com/sale into a QR code in SVG format so I can add it to our printed flyer layout."}],"resultDescription":"Returns either an inline SVG document (Content-Type: image/svg+xml) containing the rendered QR code, or a data URL string (e.g. data:image/png;base64,...) suitable for use in an HTML img src attribute, depending on the format parameter. The QR code encodes exactly the text provided with no server-side logging or upstream dependencies.","failureModes":["Missing required 'text' query parameter returns an error response","Extremely long text strings may exceed QR code capacity and return an encoding error","Invalid format value (anything other than 'svg' or 'dataurl') may fall back to default SVG or return an error","Network or service downtime returns a non-200 HTTP status"],"whenToPreferThis":"Choose this endpoint when you need a fast, offline QR code generation with no data sent to third-party upstreams — ideal for privacy-sensitive payloads like IBANs, crypto payment links, or private URLs. Prefer it when you need the result as an embeddable SVG or inline PNG data URL for direct use in HTML/PDF without a separate image hosting step. It charges a flat micro-fee per call ($0.002 USDC) via the x402 payment protocol, making it suitable for agent pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:54:57.390Z","isFirstParty":false}