POST

Encode data string as QR code PNG image. Uses qrcode

/v1/qr-encode

Images · qrcode

Request → Response

Examples from schemas.json.

Requestapplication/json
POST /v1/qr-encode
Content-Type: application/json

{
  "data": "https://tools402.dev",
  "size": 100
}
Responseapplication/json
HTTP/1.1 200 OK
Content-Type: application/json

// Endpoint-specific body after 402 settlement

Overview

Encode data string as QR code PNG image. Uses qrcode.

Request schema

Body: JSON · application/json

FieldTypeDescription
datastringrequired
sizeintegeroptionalmin: 100
IMPLEMENTATION
curl -X POST https://api.tools402.dev/v1/qr-encode \
  -H "Content-Type: application/json" \
  -d '{
  "data": "https://tools402.dev",
  "size": 100
}'

402 payment flow omitted — see Integrations for settlement.