REST API
Integrate the by square standard
JSON REST API Endpoints
To authorize against the API, send the Authorization: api key header. You can generate an API key in the dashboard.
Send JSON with Content-Type: application/json.
Return user information and remaining credits.
Response sample
{
"companyName": "My Company",
"planName": "Wise",
"nextReset": 1771296662,
"generations": {
"available": 27400,
"remaining": 2952,
"used": 24448
},
"reads": {
"available": 2400,
"remaining": 1480,
"used": 920
}
}Generate a PAY by square QR image.
Request body
{
"payments": [
{
"amount": 1,
"currencyCode": "EUR",
"bankAccounts": {
{ "iban": "SK0000000000000" }
},
"beneficiaryName": "A",
"paymentNote": "Payment for products",
"variableSymbol": 12345
}
]
}Response sample
{
"contentType": "image/png",
"format": "pay",
"image": "iVBORw0KG...base64 encoded data",
"payload": "0003G000FQ5D2ING92PTN9NSUVOENM25ALB59SIMJKNBAJQ244S31UOGUAH7C4ULCGBEGV34FG00"
}

Fast, single-request endpoint to generate a QR image.
Decode a by square payload and keep the document on the server.
Decode a file upload (JPG/PNG/PDF) and retrieve structured data.
Other resources
by square – Generator Test
Generator Test is a quick sandbox where you can generate and test by square QR codes
by square – PAY specification
Explore the PAY by square specification covering payment QR formats, required fields, and validation rules.
by square – Legacy API XML Specification
This document is the XML specification for legacy API access app.bysquare.com/api
