New User Offer Get $5 free credit instantly — no credit card required. Use code WELCOME Claim $5 Free
API V1 — Production Ready

QR Code & UPI Payment Generator API

Generate QR codes, UPI payment QR codes, and barcodes with optional logo embedding. Support for Code128, EAN-13, UPC-A. Binary and URL output modes.

99.9%
Uptime SLA
<100ms
Avg Generation Time
6
Output Types
UPI
Payment QR Ready

Everything You Need

Generate QR codes, barcodes, and UPI payment codes with a single API call.

QR Code Generation

Standard QR codes for text, URLs, contacts, WiFi, and any data up to 4,296 characters.

UPI Payment QR

Generate UPI-compatible QR codes that work with Google Pay, PhonePe, Paytm, and all UPI apps.

Barcode Generation

Code128, EAN-13, and UPC-A barcode formats for retail, logistics, and inventory.

Image-to-QR

Upload any image and get a QR code that opens the image directly when scanned.

Simple, Transparent Pricing

Start free and scale as you grow. No hidden fees.

Free
Free
  • 50 generations/month
  • 5 requests/minute
  • QR code generation
  • UPI payment QR generation
  • All barcode formats (Code128, EAN-13, UPC-A)
  • Image-to-QR generation
  • Up to 300px output size
  • Text, URL & contact QR codes
Start Free
Starter
$2.99/month
  • 500 generations/month
  • 20 requests/minute
  • QR code generation
  • UPI payment QR generation
  • All barcode formats (Code128, EAN-13, UPC-A)
  • Image-to-QR generation
  • Logo embedding (up to 512 KB)
  • Up to 600px output size
  • Google Drive & CDN logo support
  • Email support
Get Started
Pro
$9.99/month
  • 5,000 generations/month
  • 30 requests/minute
  • QR code generation
  • UPI payment QR generation
  • All barcode formats (Code128, EAN-13, UPC-A)
  • Image-to-QR generation
  • Logo embedding (up to 2 MB)
  • Up to 1000px output size
  • Google Drive & CDN logo support
  • Priority support
Upgrade to Pro
Enterprise

Enterprise & Agency Plan

Need unlimited generations, custom rate limits, and dedicated infrastructure? We'll build a plan around your exact requirements.

Unlimited generations
Custom rate limits
1000px+ output size
5MB+ logo support
24/7 Support

API Reference

Everything you need to integrate the QR & Barcode Generator API

Authentication

All API requests require authentication using your API key. Send it via the X-API-KEY header with every request.

Header
X-API-KEY: your_api_key_here
Get Your API KeySign up at dash.corenexis.com to get your API key instantly.

API Endpoint

GETPOSThttps://api.corenexis.com/qr-barcode/v1

The API accepts both GET and POST requests. Use GET for simple requests and POST when uploading logo or image files.

Output Mode

By default the API returns raw binary PNG image directly — ideal for piping, saving to file, or embedding. Set output=url to receive a JSON response with a CDN URL instead.

ParameterTypeDescription
outputOptionalStringbinary (default) — raw PNG image with metadata in response headers. url — JSON response with CDN URL (expires in 2 hours).

Common Parameters

ParameterTypeDescription
X-API-KEYHeaderStringYour API key (required in request header)
typeRequiredStringGeneration type: qr, upi, code128, ean13, upc, image
sizeOptionalIntegerOutput width in pixels. Min: 100, Max: 1000. Default: 300
logoOptionalString / FileLogo to embed in center. Accepts: public image URL, Google Drive link, or file upload (POST). Works with qr, upi, and image types.

Generation Types

All generation types are available on every plan. Plans differ in output size, logo size limits, rate limits, and monthly quota.

QR Code — type=qr

Generate standard QR codes for text, URLs, vCards, WiFi, or any data.

ParameterTypeDescription
dataRequiredStringContent to encode. Max: 4,296 digits (numeric), 2,611 chars (alphanumeric), or 1,273 bytes (UTF-8/binary).

UPI Payment QR — type=upi

Generate UPI-compatible payment QR codes that work with Google Pay, PhonePe, Paytm, and all UPI apps.

ParameterTypeDescription
paRequiredStringUPI ID (e.g. name@upi). Max: 50 characters.
pnOptionalStringPayee display name. Max: 100 characters.
amOptionalNumberAmount in INR. Max: ₹1,00,000. Omit for dynamic amount.
tnOptionalStringTransaction note. Max: 80 characters.

Barcodes — type=code128 / ean13 / upc

ParameterTypeDescription
dataRequiredStringCode128: Any text, max 80 characters.
EAN-13: Exactly 13 digits.
UPC-A: Exactly 12 digits.

Image-to-QR — type=image

Upload an image and receive a QR code. When scanned, the image opens directly in the browser.

ParameterTypeDescription
data or imageRequiredString / Filedata: Public image URL (Google Drive, CDN, direct link). image: File upload via POST. Max: 5 MB. Supported: PNG, JPG, WEBP, GIF.
Logo SupportLogo embedding works with qr, upi, and image types. Provide via public URL (including Google Drive and CDN links without extensions), or as a file upload via POST. Free plan does not include logo support.

Supported Types Overview

qr upi code128 ean13 upc image

Code Examples

Simple QR Code

# Binary output — save PNG directly
curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com" \
  --output qr.png

# URL output — get JSON with CDN link
curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com&output=url"
// Binary — get image directly
const response = await fetch('https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com', {
  headers: { 'X-API-KEY': 'your_api_key' }
});
const blob = await response.blob();
document.getElementById('qr').src = URL.createObjectURL(blob);

// URL — get JSON with CDN link
const res = await fetch('https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com&output=url', {
  headers: { 'X-API-KEY': 'your_api_key' }
});
const data = await res.json();
console.log('QR URL:', data.data.url);
import requests

headers = {"X-API-KEY": "your_api_key"}

# Binary — save image
response = requests.get("https://api.corenexis.com/qr-barcode/v1",
    headers=headers, params={"type": "qr", "data": "https://google.com"})
with open("qr.png", "wb") as f:
    f.write(response.content)

# URL — get JSON
response = requests.get("https://api.corenexis.com/qr-barcode/v1",
    headers=headers, params={"type": "qr", "data": "https://google.com", "output": "url"})
print(response.json()["data"]["url"])
$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => "https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com&output=url",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-KEY: your_api_key"],
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "QR URL: " . $data["data"]["url"];

UPI Payment QR

# Dynamic amount
curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=upi&pa=merchant@upi&pn=My+Store&output=url"

# Fixed amount with note
curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=upi&pa=merchant@upi&pn=My+Store&am=499&tn=Order+Payment&output=url"

# UPI QR with logo (POST)
curl -X POST "https://api.corenexis.com/qr-barcode/v1" \
  -H "X-API-KEY: your_api_key" \
  -F "type=upi" -F "pa=merchant@upi" -F "pn=My Store" \
  -F "am=999" -F "[email protected]" -F "output=url"
const params = new URLSearchParams({
  type: 'upi', pa: 'merchant@upi', pn: 'My Store',
  am: '499', tn: 'Order Payment', output: 'url'
});
const response = await fetch(`https://api.corenexis.com/qr-barcode/v1?${params}`, {
  headers: { 'X-API-KEY': 'your_api_key' }
});
const data = await response.json();
console.log('UPI QR:', data.data.url);
import requests
response = requests.get("https://api.corenexis.com/qr-barcode/v1",
    headers={"X-API-KEY": "your_api_key"},
    params={"type": "upi", "pa": "merchant@upi", "pn": "My Store",
            "am": "499", "tn": "Order Payment", "output": "url"})
print(response.json()["data"]["url"])

Barcodes

curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=code128&data=INV-2026-00451&output=url"
curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=ean13&data=4006381333931&output=url"
curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=upc&data=012345678905&output=url"

QR with Logo

curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://example.com&logo=https://cdn.example.com/logo.png&output=url"
curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://example.com&logo=https://drive.google.com/file/d/1aBcDeFg/view?usp=sharing&output=url"
curl -X POST "https://api.corenexis.com/qr-barcode/v1" \
  -H "X-API-KEY: your_api_key" \
  -F "type=qr" -F "data=https://example.com" \
  -F "[email protected]" -F "size=500" -F "output=url"

Image-to-QR

curl -H "X-API-KEY: your_api_key" \
  "https://api.corenexis.com/qr-barcode/v1?type=image&data=https://example.com/photo.jpg&output=url"
curl -X POST "https://api.corenexis.com/qr-barcode/v1" \
  -H "X-API-KEY: your_api_key" \
  -F "type=image" -F "[email protected]" \
  -F "[email protected]" -F "size=500" -F "output=url"
const formData = new FormData();
formData.append('type', 'image');
formData.append('image', fileInput.files[0]);
formData.append('output', 'url');

const response = await fetch('https://api.corenexis.com/qr-barcode/v1', {
  method: 'POST',
  headers: { 'X-API-KEY': 'your_api_key' },
  body: formData
});
const data = await response.json();
console.log('QR:', data.data.url);
console.log('Image:', data.data.hosted_image_url);
Image-to-QR ExpiryThe QR code URL expires in 2 hours. The hosted image URL expires in 30 days. Both timestamps are in the response.

Response Format

Binary Output (default)

When output=binary (or omitted), the API returns raw PNG image data directly. Metadata is in response headers:

Response Headers
Content-Type: image/png
Content-Length: 4523
X-Plan: starter
X-Remaining: 487
X-Rate-Limit: 20
X-Monthly-Limit: 500
X-Size-KB: 4.42
X-Type: qr
X-QR-Size: 300
X-Logo: false
X-Text-Mode: binary
X-Text-Usage: 1.6%

URL Output — output=url

{
  "success": true,
  "plan": "starter",
  "data": {
    "type": "qr",
    "format": "png",
    "mimetype": "image/png",
    "qr_size": 300,
    "logo": false,
    "text_info": {
      "mode": "binary",
      "byte_length": 20,
      "char_length": 20,
      "max_allowed": 1273,
      "usage_pct": 1.6
    },
    "url": "https://cdn.corenexis.com/qr_1711612800_a3f2d8e1.png",
    "size": 4.52,
    "expiry": "2026-03-28T16:00:00+00:00"
  },
  "usage": {
    "remaining": 487,
    "rate_limit": 20,
    "monthly_limit": 500
  }
}
{
  "success": true,
  "plan": "starter",
  "data": {
    "type": "upi",
    "format": "png",
    "mimetype": "image/png",
    "qr_size": 300,
    "logo": true,
    "url": "https://cdn.corenexis.com/upi_1711612800_b4e1c9f2.png",
    "size": 5.18,
    "expiry": "2026-03-28T16:00:00+00:00"
  },
  "usage": {
    "remaining": 486,
    "rate_limit": 20,
    "monthly_limit": 500
  }
}
{
  "success": true,
  "plan": "starter",
  "data": {
    "type": "code128",
    "format": "png",
    "mimetype": "image/png",
    "width": 420,
    "height": 120,
    "logo": false,
    "url": "https://cdn.corenexis.com/code128_1711612800_c5d2a8b3.png",
    "size": 1.23,
    "expiry": "2026-03-28T16:00:00+00:00"
  },
  "usage": {
    "remaining": 485,
    "rate_limit": 20,
    "monthly_limit": 500
  }
}
{
  "success": true,
  "plan": "pro",
  "data": {
    "type": "image",
    "format": "png",
    "mimetype": "image/png",
    "qr_size": 500,
    "logo": false,
    "hosted_image_url": "https://cdn.corenexis.com/img_1711612800_f7a4c0d5.jpg",
    "hosted_image_expiry": "2026-04-27T14:00:00+00:00",
    "note": "Scan the QR code to view the image directly in any browser.",
    "url": "https://cdn.corenexis.com/image_1711612800_d6e3b9c4.png",
    "size": 6.85,
    "expiry": "2026-03-28T16:00:00+00:00"
  },
  "usage": {
    "remaining": 4988,
    "rate_limit": 30,
    "monthly_limit": 5000
  }
}

Response Fields

FieldTypeDescription
typeStringRequested generation type
formatStringOutput format (always png)
mimetypeStringMIME type (image/png)
urlStringCDN URL to download the generated image (2-hour expiry)
sizeFloatFile size in KB
expiryStringISO 8601 expiry timestamp for the QR/barcode URL
qr_sizeIntegerQR output width in pixels (QR/UPI/Image types)
logoBooleanWhether a logo was embedded
text_infoObjectQR data analysis — mode, length, max capacity, usage % (QR type only)
width / heightIntegerActual barcode dimensions (barcode types only)
hosted_image_urlStringHosted image CDN URL — 30-day expiry (Image type only)
hosted_image_expiryStringISO 8601 expiry for hosted image (Image type only)

Usage Object

FieldTypeDescription
remainingIntegerRemaining generations this billing period
rate_limitIntegerMax requests per minute
monthly_limitIntegerTotal monthly limit for your plan
URL ExpiryQR/barcode CDN URLs expire in 2 hours. Image-to-QR hosted image URLs expire in 30 days. Download or cache before expiry.

Error Codes

HTTPCodeDescription
400Bad RequestMissing or invalid parameters — type, data, UPI fields, barcode format, or size out of range.
400Data Too LongQR text exceeds capacity (4,296 numeric / 2,611 alphanumeric / 1,273 bytes).
400Logo Size ExceededLogo file size exceeds your plan's limit.
400Width ExceededRequested output size exceeds your plan's maximum.
401INVALID_KEYAPI key is invalid, expired, or not found.
401Missing API KeyX-API-KEY header is not present.
402NO_SUBSCRIPTIONQR & Barcode API not enabled. Subscribe to a plan first.
402SUBSCRIPTION_EXPIREDSubscription expired. Renew to continue.
403KEY_DISABLEDAPI key disabled. Generate a new key.
403ACCOUNT_SUSPENDEDAccount suspended. Contact support.
429RATE_LIMIT_EXCEEDEDToo many requests per minute. Wait and retry.
429QUOTA_EXCEEDEDMonthly quota reached. Upgrade your plan.
500Server ErrorInternal error. Try again.

Error Response Examples

{
  "success": false,
  "code": "PARAM_LIMIT_EXCEEDED",
  "message": "Requested size (500) exceeds your plan limit (300). Reduce size or upgrade your plan.",
  "param": "max_qr_image_width",
  "provided": 500,
  "max_allowed": 300
}
{
  "success": false,
  "error": "Data too long for QR code. Mode: binary | Your length: 1500 | Max: 1273. Limits — Numeric: 4296 | Alphanumeric: 2611 | Binary/UTF-8: 1273 bytes."
}
{
  "success": false,
  "code": "RATE_LIMIT_EXCEEDED",
  "message": "Too many requests. Please wait before making another request."
}
Plan Limit ErrorsWhen rejected due to plan limits (logo size, output width), your monthly quota is not consumed. Only successful generations count.
Rate LimitingRate limits per minute: Free (5/min), Starter (20/min), Pro (30/min). If you receive 429, wait 60 seconds before retrying.

Ready to Get Started?

Create your free account and start generating QR codes in seconds. No credit card required.

Stay in the Loop

Get the latest updates delivered straight to your inbox