4.1 Generate QRCode

Generate Static Pix QRCode

API Method = GenerateStaticPixQRCode

This method generates a simplified billing QrCode where there is no association of a payer. The payment is able to be done by any user who does the optical reading of the QrCode or enter the hash code. The same QrCode can be used several times for payment.

The charge may be generated containing a set amount for a specific billing, or make it available for the payer to report the amount to pay, so a zero value QrCode billing can be generated so that the charge can be made openly available and users can make a payment for the amount they are entitled to. For example: QrCodes available in restaurants.

To issue a fixed value charge, simply apply the value to the PrincipalValue field. If the charge does not have a specific value, the PrincipalValue field must be filled with null, because in this situation the FitBank API does not consider a 0 value.

With this modality, it is not possible to define a due date.

{
     "Method": "GenerateStaticPixQRCode",
     "PartnerId": 30519,
     "BusinessUnitId": 51138,
     "PrincipalValue": 123.45,
     "TaxNumber": "84928589076",
     "PixKey": "17699384008",
     "Address": {
          "AddressLine": "Rua Niterói",
          "AddressLine2": "string",
          "ZipCode": "60731-305",
          "Neighborhood": "Canindezinho",
          "CityCode": "451",
          "CityName": "Fortaleza",
          "State": "Ceará",
          "AddressType": 1,
          "Country": "Brasil",
          "Complement": "Apto 01",
          "Reference": "Próximo ao mercado"
     },
     "Bank": "450",
     "BankBranch": "0001",
     "BankAccount": "440246",
     "BankAccountDigit": "3",
     "AdditionalData": "pagamento",
     "TransactionPurpose": 0,
     "Identifier": "string",
}
{
    "Success": "true",
    "Message": "ISI0001 - Método executado com sucesso",
    "DocumentNumber": 300400
}

Description:

ParameterDescriptionMandatoryTypeComments
MethodGenerateStaticPixQRCodeYESSTRING-
PartnerIdInformation provided by FitBankYESINT-
BusinessUnitIdInformation provided by FitBankYESINT-
PrincipalValueValue of the collection/billingYESINT-
TaxNumberCPF/CNPJ of the receiverYESSTRING-
PixKeyReceiver's pix keyYESSTRING-
AddressAdress of the receiverYESOBJECT-
AddressLineFirst adress of the receiverDESIRABLESTRING-
AddressLine2Second adress of the receiverDESIRABLESTRING-
NeighborhoodNeighborhood of the receiverDESIRABLESTRING-
ZipCodeZipCode of the receiverYESINTValid Formats:
61801490
61801-490
Limit: 10 characters
CityNameCity of the receiverDESIRABLESTRING-
AddressTypeType of adress of the receiverDESIRABLEINTCommercial = 0 Residential = 1
CityCodeCity code of the receiverDESIRABLESTRING-
StateState of the receiverDESIRABLESTRING-
CountryCountry of the receiverDESIRABLESTRING-
ComplementAditional information to the adress of the receiverDESIRABLESTRING-
ReferenceReference to the adress of the receiverDESIRABLESTRING-
BankReceiver's Bank Code (Ex.: “450”)YESSTRING-
BankBranchReceiver's Bank Agency Code (Ex.: “0001”)YESSTRING-
BankAccountReceiver's Bank Account (Ex.: “146492”)YESSTRING-
BankAccountDigitReceiver's Account Digit (Ex.: “1”)YESSTRING-
AdditionalDataAdditional information of the collectionNOSTRING-
TransactionPurposePurpose of the collectionNOINTPurchaseOrTransfer = 0
Withdraw = 2
For a common payment transaction, by default fill in 0
IdentifierCollection identifier assigned by the collection issuerNOSTRING-

Generate Dynamic Pix QRCode

API Method = GenerateDynamicPixQRCode

This modality is intended for charges that have a specified payer, with the identification of this payer, and the reason for the charge. This type of QrCode can only be used to make a payment once, after using it and successfully settling a payment, it expires. If after issuing the charge, payment is not made until the expiration date (ExpirationDate), the QrCode also expires.

If the generated QrCode is not used by anyone, it expires on the date assigned by the collector (ExpirationDate field). In addition, it is possible to edit the QrCode information as the billing amount, the payer information and the expiration date, maintaining the same hash, through the API method ChangeDynamicPixQRCode.

If the charger does not intend to specify a payer for the billing he wants to generate, the fields PayerName and PayerTaxNumber must be filled as null.

This type of QrCode does not allow the customer to issue charges with value 0, thus the generated charges must have a PrincipalValue greater than or equal to 0.01.

{
     "Method": "GenerateDynamicPixQRCode",
     "PartnerId": 30519,
     "BusinessUnitId": 51138,
     "PixKey": "17699384008",
     "TaxNumber": "84928589076",
     "PayerTaxNumber": "65023491021",
     "PayerName": "João da Silva Pereira",
     "PrincipalValue": 123.45,
     "ExpirationDate": "31/01/2022 15:35:59",
     "Address": {
          "AddressLine": "Rua Niterói",
          "AddressLine2": "string",
          "ZipCode": "60731-305",
          "Neighborhood": "Canindezinho",
          "CityCode": "451",
          "CityName": "Fortaleza",
          "State": "Ceará",
          "AddressType": 1,
          "Country": "Brasil",
          "Complement": "Apto 01",
          "Reference": "Próximo ao mercado"
     },
     "Bank": "450",
     "BankBranch": "0001",
     "BankAccount": "440246",
     "BankAccountDigit": "3",
     "ChangeType": 0,
     "AdditionalData": [
          {
               "Name": "pagamento",
               "Value": "300"
          }
     ],
     "PayerRequest": "pagamento",
     "TransactionPurpose": 1,
     "TransactionValue": null,
     "AgentModality": 2,
     "TransactionChangeType": null,
     "Identifier": "string",
}
{
    "Success": "true",
    "Message": "ISI0001 - Método executado com sucesso",
    "DocumentNumber": 36301
}

Description:

ParameterDescriptionMandatoryTypeComments
MethodGenerateDynamicPixQRCodeYESSTRING-
PartnerIdInformation provided by FitBankYESINT-
BusinessUnitIdInformation provided by FitBankYESINT-
PixKeyReceiver's PIX keyYESSTRING-
TaxNumberCPF/CNPJ of the collector/receiver, meaning, who will have the PIX key and generates the chargeYESSTRING-
PayerTaxNumberCPF/CNPJ of the payerNOSTRING-
PayerNameName of the payerNOSTRING-
PrincipalValueValue of the collectionYESNUMBER-
ExpirationDateDate and time until the QR Code expiresYESSTRINGValid Formats:
31/01/2022
31/01/2022 15:35
31/01/2022 15:35:59
AddressAdress of the receiverYESOBJECT-
AddressLineFirst adress of the receiverDESIRABLESTRING-
AddressLine2Second adress of the receiverDESIRABLESTRING-
ZipCodeZipCode of the receiverYESINTValid Formats:
61801490
61801-490
Limit: 10 characters
NeighborhoodNeighborhood of the receiverDESIRABLESTRING-
CityCodeCity code of the receiverDESIRABLESTRING-
CityNameCity of the receiverDESIRABLESTRING-
StateState of the receiverDESIRABLESTRING-
AddressTypeType of adress of the receiverDESIRABLEINTCommercial = 0 Residential = 1
CountryCountry of the receiverDESIRABLESTRING-
ComplementAditional information to the adress of the receiverDESIRABLESTRING-
ReferenceReference to the adress of the receiverDESIRABLESTRING-
BankReceiver's Bank Code (Ex.: “450”)YESSTRING-
BankBranchReceiver's Bank Agency Code (Ex.: “0001”)YESSTRING-
BankAccountReceiver's Bank Account (Ex.: “146492”)YESSTRING-
BankAccountDigitReceiver's Account Digit (Ex.: “1”)YESSTRING-
ChangeType*Parameter that allows the amount charged to be changed or not at the moment of paymentYESINTNone = 0 (Does not allow value change)

Allowed = 1 (Allows value change)
AdditionalDataAdditional information of the collectionNOARRAY OF OBJECTS-
NameName of the custom parameter to be add with transactionNOSTRING-
ValueValue of the custom parameter to be add with transactionNOSTRINGDoes not necessarily have to be the indication of a monetary value
PayerRequestMessage or description that can be added if desirableNOSTRINGMaximum number of accepted characters: 140 characters
TransactionPurposePurpose of the collectionNOINTPurchaseOrTransfer = 0 PurchaseWithChange = 1
Withdraw = 2
For a common payment transaction, by default fill as 0
TransactionValueValue of the transactionNONUMBERApplicable only if the QrCode is set as PIX Withdraw or PIX Change. If not, must be filled as null
AgentModalityAgent modality of the withdraw transactionNOINTPSS = 0 (Withdrawal Service Provider)
CommercialEstablishment = 1
Other = 2
By default, fill as 2, unless it refers to a PIX Withdraw transaction
TransactionChangeTypeType of the collection transactionNOINTNone = 0
Allowed = 1
Applicable only if the QrCode is set as PIX Withdraw or PIX Change. If not, must be filled as null
IdentifierCollection identifier assigned by the collection issuerNOSTRING-

❗️

*Important

Even if in the request, the ChangeType field is registered with Type 0 (Does not allow value changes), it is the customer's responsibility to perform the reconciliation between the values charged and the values received, and to do so, he can use the information available in the PixIn webhook.

Generate Pix QRCode Due Date

API Method = GeneratePixQRCodeDueDate

The QR Code with due date in Pix is an electronic payment method that includes an due date for the charge. This date determines when the QR Code can be paid for, with the possibility of applying discounts. Payments after the due date may incur interest and penalty charges. In addition, there is an additional period of days for the QR Code to expire, which occurs if the expiration date is exceeded without payment being made. After this expiry date, the QR Code becomes invalid and can no longer be used.

  • This type of QrCode can only be used to make a payment once, after using it and successfully settling a payment, it expires.
  • This type of QrCode does not allow the customer to issue charges with value 0, thus the generated charges must have a PrincipalValue greater than or equal to 0.01.
  • The TxID in the QRCode is a unique identifier for a charge, making it easier for the beneficiary to reconcile payments. This identifier cannot be repeated; therefore, once it has been used by the beneficiary, it cannot be reused in the generation of new QRCodes.
  • Optional objects can be sent as null, but if some of the fields are filled in, the rest of the object's fields must also be filled in.
{
    "Method": "GeneratePixQrCodeDueDate",
    "PartnerId": 1234,
    "BusinessUnitId": 123,
    "TxId": "AAAAAaaaaa1111122222ZZZZZ33",
    "PixKey": "[email protected]",
    "Date": {
        "DueDate": "2024-06-30",
        "DaysAfterDueDate": 30
    },
    "Payee": {
        "TaxNumber": "94320833066",
        "Name": "Receiver Name",
        "ISPB": "",
        "Bank": "450",
        "BankBranch": "0001",
        "BankAccount": "111111111",
        "BankAccountDigit": "0"
    },
    "Payer": {
        "TaxNumber": "61397260009",
        "Name": "Payer Name",
        "Mail": "Email do pagador/devedor",
        "Address:": "Address City",
        "City": "Payer City",
        "State": "SP",
        "ZipCode": "00000000"
    },
    "PrincipalValue": 100.00,
    "Fine": {
        "Type": 1,
        "Value": 2.0,
        "Date": "2024-10-20"
    },
    "Rebate": {
        "Type": 1,
        "Value": 2.00
    },
    "Interest": {
        "Type": 1,
        "Value": 0.01,
        "Date": "2024-10-20"
    },
    "Discount": {
        "Type": 1,
        "DiscountRange": [
            {
                "date": "2024-06-10",
                "value": 1.00
            },
            {
                "date": "2024-05-20",
                "value": 2.00
            },
            {
                "date": "2024-05-30",
                "value": 3.0
            }
        ]
    },
    "PayerRequest": "PayerRequest",
    "AdditionalInformation": [
        {
            "Name": "AdditionalInformationName",
            "Value": 10
        }
    ]
}
{
    "Success": "true",
    "Message": "Cobrança gerada com sucesso",
    "TxId": "AAAAAaaaaa1111122222ZZZZZ33",
    "HashCode": "00020101021226930014br.gov.bcb.pix2571qrcode-h.fitbank.com.br/QR/v2/cobv/d2c8093b-2303-426c-9c38-a0cc0e567cc25204000053039865802BR5912Stefanne DDA6009Fortaleza62070503***6304536D",
    "QRCodeDueDateInfos": {
        "Date": {
            "CreationDate": "2024-06-07",
            "DueDate": "2024-06-30",
            "DaysAfterDueDate": 30
        },
        "Status": 1,
        "Payer": {
            "TaxNumber": "50231669020",
            "Name": "Pagador Name",
            "Mail": null,
            "Address": null,
            "City": null,
            "State": null,
            "ZipCode": null
        },
        "Payee": {
            "TaxNumber": "94320833066",
            "Name": "Receiver Name",
            "ISPB": null,
            "Bank": "450",
            "BankBranch": "0001",
            "BankAccount": "111111111",
            "BankAccountDigit": "1"
        },
        "Values": {
            "PrincipalValue": 15.00
        },
        "PixKey": "[email protected]",
        "PayerRequest": "PayerRequest"
    }
}
{
    "Success": "false",
    "Message": "Já existe um QrCode para esse TxId: AAAA6323232AAAAAA1212AAAAsdsdsd1",
    "Validation": []
}

Description:

ParameterDescriptionMandatoryTypeComments
MethodGeneratePixQrCodeDueDateYESSTRING-
PartnerIdInformation provided by FitBankYESINT-
BusinessUnitIdInformation provided by FitBankYESINT-
TxIdTransaction IdentifierYESSTRINGThe TxId is a unique identifier that can contain from 26 to 35 characters, including:

- Lowercase letters, from “a” to “z
- Capital letters, from “A” to “Z
- Decimal digits, from “0” to “9
PixKeyReceiver's pix keyYESSTRING-
Date-YESOBJECT-
DueDateCollection Due DateYESSTRINGYYYY-MM-DD
DaysAfterDueDateExpiration date in calendar daysNOSTRINGIf the number of days for the QRCode to expire after its due date is not specified, the default value of 30 days will be used.
Payee-YESOBJECT-
TaxNumberPayee's CPF/CNPJYESSTRING-
NamePayee's nameYESSTRING-
ISPBPayee's ISPBYES (OR)STRING-
BankPayee's bankYES (OR)STRING-
BankBranchPayee's Bank BranchYESSTRING-
BankAccountPayee's Bank AccountYESSTRING-
BankAccountDigitPayee's Bank Account DigitYESSTRING-
Payer-YESOBJECT-
TaxNumberPayer's CPF/CNPJYESSTRING-
NamePayer's NameYESSTRING-
MailPayer's MailNOSTRING-
AddressPayer's AddressNOSTRING-
CityPayer's CityNOSTRING-
StatePayer's StateNOSTRINGMaximum 2 characters - State abbreviation
ZipCodePayer's ZipCodeYESSTRINGMaximum 8 digits
PrincipalValueOriginal value of the chargeYESSTRING-
Fine-NOOBJECT-
TypeType of fineNOSTRING0 - No fine will be charged
1 - Fixed Value
2 - Percentual
ValueValue of fineNOSTRING-
DateFine charging dateNO STRINGMust be greater than the due date of the qrcode.
Rebate-NOOBJECT-
TypeType of rebateNOSTRING0 - No rebates will be granted
1 - Fixed Value
2 - Percentual
ValueValue of rebateNOSTRING-
InterestNOOBJECT-
TypeType of InterestNOSTRING0 - No interest will be charged
1 - Value (calendar days)
2 - Percentage per day (calendar days)
3 - Percentage per month (calendar days)
5 - Value (working days)
6 - Percentual ao dia (dias úteis)
7 - Percentage per month (working days)
ValueValue of InterestNOSTRING-
DateInterest charging dateNOSTRINGMust be greater than the due date of the qrcode.
DiscountNOSTRING-
TypeType of DiscountNOSTRING0 - No discount will be granted
1 - Fixed price until the date specified
2 - Balue in percent up to the date informed
DiscountRangeNOSTRINGNumber of discount bands. Limit: 3 bands
datediscount dateNOSTRINGYYYY-MM-DD
valuediscount valueNOSTRING-
PayerRequestText to be submitted to the payerNOSTRINGLimit 140 characters
AdditionalInformation-NOOBJECT-
NameField nameNOSTRING-
ValueField dataNOSTRING-