Skip to content

SBP (Static QR)

Accepting payments via a static SBP QR code. A static QR code is tied to the shop and lets you accept payments without creating a separate session for each transaction — the customer scans the same code and either enters the amount themselves, or the amount is fixed when the template is created.

Creating a QR code template

URL

Method: POST

  • Production: https://api.pay.kvell.group/v1/qr-templates/sbp
  • Stage: https://api.pay.stage.kvell.group/v1/qr-templates/sbp

Request parameters

Name
Data type Required Description
name string Yes Template name (up to 140 characters)
payment_purpose string Yes Payment purpose shown to the payer (up to 140 characters)
qr_width integer Yes QR code image width (from 15 to 500)
qr_height integer Yes QR code image height (from 15 to 500)
amount integer No Fixed amount in kopecks. If not specified, the payer enters the amount themselves
start_date string No Template start date (ISO 8601). Specified together with end_date
end_date string No Template end date (ISO 8601). Must be later than start_date

Request example

{
  "name": "Point-of-sale payment",
  "payment_purpose": "Payment for goods and services",
  "qr_width": 50,
  "qr_height": 50,
  "amount": 10000,
  "start_date": "2024-01-01T00:00:00",
  "end_date": "2024-12-31T23:59:59"
}

Request headers

Name Data type Required Description
X-Api-Key string Yes Unique shop identifier
X-Signature string Yes Signature

The X-Signature signature is formed by concatenating X-Api-Key, the request body, and secret_key. It is generated as the sha256 hash of the resulting string:

sha256({X-Api-Key}{request body}{secret_key})

where secret_key is the secret key found in the merchant's shop settings.

Response

{
  "id": 1,
  "remote_template_id": "BSQR00000XXXXXX",
  "description": null,
  "amount": 10000,
  "start_date": "2024-01-01T00:00:00",
  "end_date": "2024-12-31T23:59:59",
  "payload": "https://qr.nspk.ru/BSQR00000XXXXXX",
  "name": "Point-of-sale payment",
  "currency": "RUB",
  "qr_width": 50,
  "qr_height": 50,
  "render_qr": "iVBORw0KGgoAAAANSUhEUgAA..."
}
{
  "errors": [
    {
      "message": "string",
      "code": 0
    }
  ]
}

Response parameters

Name
Data type Description
id integer Template ID in the system
remote_template_id string Template ID in SBP
description string Template description
amount integer Fixed amount in kopecks (null means the amount is set by the customer)
start_date string Template start date
end_date string Template end date
payload string QR code data (SBP link)
name string Template name
currency string Currency (RUB)
qr_width integer QR code image width
qr_height integer QR code image height
render_qr string QR code image in base64 format

Retrieving a QR code template by ID

URL

Method: GET

  • Production: https://api.pay.kvell.group/v1/qr-templates/{qr_template_id}
  • Stage: https://api.pay.stage.kvell.group/v1/qr-templates/{qr_template_id}

Path parameters

Name Data type Required Description
qr_template_id integer Yes Template ID

Request headers

Name Data type Required Description
X-Api-Key string Yes Unique shop identifier
X-Signature string Yes Signature

The X-Signature signature is formed by concatenating X-Api-Key, qr_template_id, and secret_key. It is generated as the sha256 hash of the resulting string:

sha256({X-Api-Key}{qr_template_id}{secret_key})

where secret_key is the secret key found in the merchant's shop settings.

Response

{
  "id": 1,
  "remote_template_id": "BSQR00000XXXXXX",
  "description": null,
  "amount": 10000,
  "start_date": "2024-01-01T00:00:00",
  "end_date": "2024-12-31T23:59:59",
  "payload": "https://qr.nspk.ru/BSQR00000XXXXXX",
  "name": "Point-of-sale payment",
  "currency": "RUB",
  "qr_width": 50,
  "qr_height": 50,
  "render_qr": "iVBORw0KGgoAAAANSUhEUgAA..."
}
{
  "errors": [
    {
      "message": "string",
      "code": 0
    }
  ]
}
{
  "errors": [
    {
      "message": "string",
      "code": 0
    }
  ]
}