girocode
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.
Viewing readonly version of main branch: v3View latest version
A simple HTTP API that generates QR codes for payment information based on SEPA (Single Euro Payments Area) standards.
- ✅ 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
Generates a QR code based on the provided parameters.
Required Parameters:
name
- Recipient nameiban
- Bank account IBAN
Optional Parameters:
bic
- Bank Identifier Codeamount
- 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
Returns HTML documentation for the API.
Health check endpoint that returns service status.
/?name=John%20Doe&iban=DE89370400440532013000
/?name=Acme%20Corp&iban=DE89370400440532013000&bic=COBADEFFXXX&amount=250.75&reference=Invoice%20INV-2024-001
/?name=Test%20User&iban=DE89370400440532013000&amount=50.00&reference=Test%20Payment
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
- 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
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)
- No sensitive data is stored
- All parameters are validated
- CORS enabled for cross-origin requests
- Rate limiting applied by Val Town platform
This app is deployed on Val Town as an HTTP val. The main entry point is /index.ts
with HTTP trigger enabled.