Generate PAY by square and SPAYD QR codes via REST API
Generate a Slovak PAY by square QR code with a single POST request:
curl -X POST https://qr-platby.com/api/v1/qr \
-H "Content-Type: application/json" \
-d '{"iban":"SK3112000000198742637541","amount":25.50,"variableSymbol":"2024001"}'Or generate a Czech SPAYD QR code:
curl -X POST https://qr-platby.com/api/v1/qr \
-H "Content-Type: application/json" \
-d '{"iban":"CZ6508000000192000145399","amount":480.50,"currency":"CZK","paymentFormat":"spayd"}'https://qr-platby.com/api/v1/qr/api/v1/qr- Generate QR code/api/v1/qr- Machine-readable JSON docs/api/v1/qr- CORS preflightSend a JSON body with the following parameters to the POST endpoint:
| Name | Type | Required | Default | Validation | Description |
|---|---|---|---|---|---|
| iban | string | Required | - | Valid IBAN format | Recipient IBAN (e.g. SK3112000000198742637541) |
| amount | number | Optional | - | 0.01 - 999,999,999.99 | Payment amount |
| currency | string | Optional | EUR | EUR | CZK | Payment currency |
| variableSymbol | string | Optional | - | Up to 10 digits | Variable symbol (digits only) |
| specificSymbol | string | Optional | - | Up to 10 digits | Specific symbol (digits only) |
| constantSymbol | string | Optional | - | Up to 4 digits | Constant symbol (digits only) |
| recipientName | string | Optional | - | Up to 70 characters | Recipient name |
| paymentNote | string | Optional | - | Up to 140 characters | Payment note / message |
| paymentFormat | string | Optional | bysquare | bysquare | spayd | QR standard. bysquare for Slovak banks (PAY by square), spayd for Czech banks (QR Platba) |
| format | string | Optional | png | png | svg | Output format. png returns base64 data URI, svg returns SVG markup |
| size | integer | Optional | 300 | 100 - 1000 | QR code size in pixels (png only) |
EPC QR (European SEPA) is available in the web app but not yet via the API.
{
"success": true,
"data": "data:image/png;base64,iVBORw0KGgo...",
"format": "png",
"iban": "SK3112000000198742637541",
"amount": 25.5,
"currency": "EUR"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed. Check the issues array for details.",
"issues": [
{ "path": "iban", "message": "Invalid IBAN" }
],
"hint": "Required: iban (string). Optional: amount, currency, ...",
"docs": "https://qr-platby.com/en/docs",
"example": {
"iban": "SK3112000000198742637541",
"amount": 25.5
}
}
}Invalid or missing request parameters. Check the issues array for field-specific errors.
Request body is not valid JSON. Ensure you send proper JSON with Content-Type: application/json.
IBAN failed validation. Must start with a 2-letter country code followed by 2 check digits.
SPAYD payload too large. Reduce the length of paymentNote or recipientName.
Too many requests. Respect the Retry-After header and implement exponential backoff.
Unexpected server error. Try again later or contact support.
X-RateLimit-Limit: 20
X-RateLimit-Remaining: 17
Retry-After: 45 (only on 429)Implement exponential backoff when you receive a 429 response. Cache QR codes on your side when possible.
curl -X POST https://qr-platby.com/api/v1/qr \
-H "Content-Type: application/json" \
-d '{
"iban": "SK3112000000198742637541",
"amount": 25.50,
"currency": "EUR",
"variableSymbol": "2024001"
}'Send a real request to the API and see the response: