SPAYD QR Code

The Short Payment Code (SPAYD — also known as the Short Payment Descriptor) — is a compact, open-standard format for encoding payment information into QR codes. SPAYD was originally developed to support simple, accurate sharing of payment details for bank transfers via QR codes, and has been widely adopted as a de-facto standard in the Czech Republic and Slovak Republic for QR-based payment initiation.

An example SPAYD QR Code with which 10 CZK will be donated to the Czech Red Cross:

An example of a SPAYD QR code that donates 10 CZK to the Czech Red Cross

Endpoints

The API can be called via POST method. The endpoint returns an PNG image.

POST/v1/spayd-qr-code

curl -X POST https://api.apistax.io/v1/spayd-qr-code \
    -o 'qr-code.png' \
    -H 'Authorization: Bearer API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
          "accounts": [
            { "iban": "CZ14 2700 0000 0000 0033 3999" }
          ],
          "amount": 10.99
        }'

Please note that in this example, an optional amount has been specified, but no currency, as only Czech koruna (CZK) is accepted as currency.

Parameters

The following parameters can be used as JSON fields in the POST request.

accounts: Array<Object>

The recipient's bank accounts. At least one account must be specified. The account information can be specified either as iban and bic or in the form of a Czech account number with prefix, number and bankCode.

iban: String

The international bank account number of the recipient. Any spaces between the blocks are removed.

bic: String

The bank identifier code of the recipient's bank. Often known as SWIFT code.

prefix: String

The prefix of the bank account. This parameter is required when providing a Czech bank account.

number: String

The number of the bank account. This parameter is required when providing a Czech bank account.

bankCode: String

The bank code of the bank account. This parameter is required when providing a Czech bank account.

amount: Float

The amount to be paid with a maximum of two decimal places. The value is optional, but recommended. If the amount is not specified, the payer must enter it in the banking app itself. The amount must be between 0 and 9,999,999. The currency is Czech koruna (CZK).

size: Integer = 300

The size of the QR code in pixels. The value must be between 100 and 2000 pixels.

reference: String

The payment reference, which may be a maximum of 16 characters long and consist only of numbers.

recipient: String

The name of the recipient. The name may be up to 35 characters long and may only consist of the following characters:
0-9A-Z $%+-. Please note that lowercase letters are not permitted.

dueDate: Date

The due date in the format YYYY-MM-DD, for example 2020-01-31

instantPayment: Boolean = false

true if the payment is to be a instant payment.

message: String

A user message for the transfer. The message may be up to 60 characters long and may only consist of the following characters: 0-9A-Z $%+-. Please note that lowercase letters are not permitted.

expirationDate: Date

The expiration date in the format YYYY-MM-DD, for example 2020-01-31

notification: Object

The information for a potentially sent notification. If specified, the type and value parameters must be provided.

type: String

The type of notification. Either MAIL or PHONE.

value: String

Depending on the type selected, either the phone number or the email address.

If most parameters are utilized, an example curl request could look like this:

curl -X POST https://api.apistax.io/v1/spayd-qr-code \
    -o 'qr-code.png' \
    -H 'Authorization: Bearer API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
          "accounts": [
            {
              "iban": "CZ14 2700 0000 0000 0033 3999",
              "bic": "BACXCZPP"
            }
          ],
          "amount": 10.99,
          "size": 300,
          "reference": "12345678",
          "recipient": "CZECH RED CROSS HUMANITY FUND",
          "dueDate": "2030-12-31",
          "instantPayment": true,
          "message": "THE HUMANITY FUND COVERS MAJOR HUMANITARIAN EMERGENCIES",
          "notification": {
            "type": "MAIL",
            "value": "hello@apistax.io"
          },
          "expirationDate": "2031-01-31"
        }'

Possible errors

Identifier Description
message.ibanMustBeValid Parameter iban must be a valid IBAN according to ISO 13616-1:2020.
message.bicMustBeValid Parameter bic must be a valid BIC according to ISO 9362.
message.sizeMustMotBeBiggerThan2000Pixels Parameter size must be between 100 and 2000 pixels.
message.sizeMustNotBeSmallerThan100Pixels Parameter size must be between 100 and 2000 pixels.
message.prefixMustBeValid Parameter prefix must be a valid Czech bank account prefix.
message.numberMustBeValid Parameter number must be a valid Czech bank account number.
message.bankCodeMustBeValid Parameter bankCode must be a valid Czech bank account bank code.
message.ibanOrNumberMustNotBeBlank Either the parameter iban or a Czech bank account with parameters prefix, number and bank code must be provided.
message.prefixMustNotBeBlank Parameter prefix mut not be blank if a Czech bank account is specified.
message.bankCodeMustNotBeBlank Parameter bankCode mut not be blank if a Czech bank account is specified.
message.amountIsTooHigh Parameter amount must be between 0 and 10 000 000.
message.amountIsTooLow Parameter amount must be between 0 and 10 000 000.
message.accountsMustNotBeEmpty Parameter accounts must not be empty.
message.referenceMustNotBeLongerThan16Characters Parameter reference must be maximum 16 characters long.
message.recipientMustNotBeLongerThan35Characters Parameter recipient must be maximum 35 characters long.
message.referenceMustConsistOnlyOfNumbers Parameter reference may only contain numbers.
message.recipientMustConsistOnlyOfValidCharacters Parameter recipient may only consist of the following characters: 0-9A-Z $%+-.
message.messageMustNotBeLongerThan60Characters Parameter message must be maximum 60 characters long.
message.messageMustConsistOnlyOfValidCharacters Parameter message may only consist of the following characters: 0-9A-Z $%+-.
message.notificationTypeMustNotBeNull Parameter type must not be null when a notification is specified.
message.notificationValueMustNotBeBlank Parameter value must not be blank when a notification is specified.
message.failedToGenerateQrCode An error occurred while generating the QR code. Please try again later.

It should be noted that there are a number of common error messages, which can be found in the "Possible errors" section of the general documentation.

SPAYD QR Code costs
Generate Short Payment Code QR codes to enable fast, standardized bank transfers using IBAN-based payment data.
1
Credits spent
Credit cost per REST call
0,0040
EUR per call
Price depends on your subscription