FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
fxfr
fxfrgirocode
Returns EPC QR codes (aka GiroCode) as images
Public
Like
girocode
Home
Code
2
README.md
H
index.ts
Branches
2
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/15/2025
README.md

QR Code Generator API

A simple HTTP API that generates QR codes for payment information based on SEPA (Single Euro Payments Area) standards.

Features

  • ✅ Generates SVG QR codes for payment information
  • ✅ Supports SEPA payment format
  • ✅ URL parameter-based API
  • ✅ Built-in validation and error handling
  • ✅ Help documentation endpoint
  • ✅ Caching headers for performance

API Endpoints

GET /

Generates a QR code based on the provided parameters.

Required Parameters:

  • name - Recipient name
  • iban - Bank account IBAN

Optional Parameters:

  • bic - Bank Identifier Code
  • amount - Payment amount (e.g., 100.50)
  • reference - Payment reference/description

Response: SVG image containing the QR code

Example:

/?name=John%20Doe&iban=DE89370400440532013000&bic=COBADEFFXXX&amount=100.50&reference=Invoice123

GET /help

Returns HTML documentation for the API.

Usage Examples

Basic Payment QR Code

https:/girocode.val.run/?name=John%20Doe&iban=DE89370400440532013000

Complete Payment Information

https://girocode.val.run/?name=Acme%20Corp&iban=DE89370400440532013000&bic=COBADEFFXXX&amount=250.75&reference=Invoice%20INV-2024-001

QR Code Format

The generated QR codes follow the SEPA QR Code standard (EPC QR Code) which includes:

  • Service Tag: BCD
  • Version: 002
  • Character Set: UTF-8
  • Identification: SCT (SEPA Credit Transfer)
  • Beneficiary details (BIC, Name, IBAN)
  • Amount in EUR
  • Payment reference

Technical Details

  • Framework: Hono
  • QR Code Library: qrcode@1.5.3
  • Output Format: SVG (scalable, lightweight)
  • Error Correction Level: Medium (M)
  • Image Size: 300x300px
  • Caching: 1 hour cache headers

Error Handling

The API returns appropriate HTTP status codes:

  • 200 - Success (QR code generated)
  • 400 - Bad Request (missing required parameters)
  • 500 - Internal Server Error (QR code generation failed)

Security Notes

  • No sensitive data is stored
  • All parameters are validated
  • CORS enabled for cross-origin requests
  • Rate limiting applied by Val Town platform

Deployment

This app is deployed on Val Town as an HTTP val. The main entry point is /index.ts with HTTP trigger enabled.

Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.