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:
Parameter | Description | Mandatory | Type | Comments |
---|---|---|---|---|
Method | GenerateStaticPixQRCode | YES | STRING | - |
PartnerId | Information provided by FitBank | YES | INT | - |
BusinessUnitId | Information provided by FitBank | YES | INT | - |
PrincipalValue | Value of the collection/billing | YES | INT | - |
TaxNumber | CPF/CNPJ of the receiver | YES | STRING | - |
PixKey | Receiver's pix key | YES | STRING | - |
Address | Adress of the receiver | YES | OBJECT | - |
AddressLine | First adress of the receiver | DESIRABLE | STRING | - |
AddressLine2 | Second adress of the receiver | DESIRABLE | STRING | - |
Neighborhood | Neighborhood of the receiver | DESIRABLE | STRING | - |
ZipCode | ZipCode of the receiver | YES | INT | Valid Formats: 61801490 61801-490 Limit: 10 characters |
CityName | City of the receiver | DESIRABLE | STRING | - |
AddressType | Type of adress of the receiver | DESIRABLE | INT | Commercial = 0 Residential = 1 |
CityCode | City code of the receiver | DESIRABLE | STRING | - |
State | State of the receiver | DESIRABLE | STRING | - |
Country | Country of the receiver | DESIRABLE | STRING | - |
Complement | Aditional information to the adress of the receiver | DESIRABLE | STRING | - |
Reference | Reference to the adress of the receiver | DESIRABLE | STRING | - |
Bank | Receiver's Bank Code (Ex.: “450”) | YES | STRING | - |
BankBranch | Receiver's Bank Agency Code (Ex.: “0001”) | YES | STRING | - |
BankAccount | Receiver's Bank Account (Ex.: “146492”) | YES | STRING | - |
BankAccountDigit | Receiver's Account Digit (Ex.: “1”) | YES | STRING | - |
AdditionalData | Additional information of the collection | NO | STRING | - |
TransactionPurpose | Purpose of the collection | NO | INT | PurchaseOrTransfer = 0 Withdraw = 2 For a common payment transaction, by default fill in 0 |
Identifier | Collection identifier assigned by the collection issuer | NO | STRING | - |
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:
Parameter | Description | Mandatory | Type | Comments |
---|---|---|---|---|
Method | GenerateDynamicPixQRCode | YES | STRING | - |
PartnerId | Information provided by FitBank | YES | INT | - |
BusinessUnitId | Information provided by FitBank | YES | INT | - |
PixKey | Receiver's PIX key | YES | STRING | - |
TaxNumber | CPF/CNPJ of the collector/receiver, meaning, who will have the PIX key and generates the charge | YES | STRING | - |
PayerTaxNumber | CPF/CNPJ of the payer | NO | STRING | - |
PayerName | Name of the payer | NO | STRING | - |
PrincipalValue | Value of the collection | YES | NUMBER | - |
ExpirationDate | Date and time until the QR Code expires | YES | STRING | Valid Formats: 31/01/2022 31/01/2022 15:35 31/01/2022 15:35:59 |
Address | Adress of the receiver | YES | OBJECT | - |
AddressLine | First adress of the receiver | DESIRABLE | STRING | - |
AddressLine2 | Second adress of the receiver | DESIRABLE | STRING | - |
ZipCode | ZipCode of the receiver | YES | INT | Valid Formats: 61801490 61801-490 Limit: 10 characters |
Neighborhood | Neighborhood of the receiver | DESIRABLE | STRING | - |
CityCode | City code of the receiver | DESIRABLE | STRING | - |
CityName | City of the receiver | DESIRABLE | STRING | - |
State | State of the receiver | DESIRABLE | STRING | - |
AddressType | Type of adress of the receiver | DESIRABLE | INT | Commercial = 0 Residential = 1 |
Country | Country of the receiver | DESIRABLE | STRING | - |
Complement | Aditional information to the adress of the receiver | DESIRABLE | STRING | - |
Reference | Reference to the adress of the receiver | DESIRABLE | STRING | - |
Bank | Receiver's Bank Code (Ex.: “450”) | YES | STRING | - |
BankBranch | Receiver's Bank Agency Code (Ex.: “0001”) | YES | STRING | - |
BankAccount | Receiver's Bank Account (Ex.: “146492”) | YES | STRING | - |
BankAccountDigit | Receiver's Account Digit (Ex.: “1”) | YES | STRING | - |
ChangeType* | Parameter that allows the amount charged to be changed or not at the moment of payment | YES | INT | None = 0 (Does not allow value change) Allowed = 1 (Allows value change) |
AdditionalData | Additional information of the collection | NO | ARRAY OF OBJECTS | - |
Name | Name of the custom parameter to be add with transaction | NO | STRING | - |
Value | Value of the custom parameter to be add with transaction | NO | STRING | Does not necessarily have to be the indication of a monetary value |
PayerRequest | Message or description that can be added if desirable | NO | STRING | Maximum number of accepted characters: 140 characters |
TransactionPurpose | Purpose of the collection | NO | INT | PurchaseOrTransfer = 0 PurchaseWithChange = 1 Withdraw = 2 For a common payment transaction, by default fill as 0 |
TransactionValue | Value of the transaction | NO | NUMBER | Applicable only if the QrCode is set as PIX Withdraw or PIX Change. If not, must be filled as null |
AgentModality | Agent modality of the withdraw transaction | NO | INT | PSS = 0 (Withdrawal Service Provider) CommercialEstablishment = 1 Other = 2 By default, fill as 2, unless it refers to a PIX Withdraw transaction |
TransactionChangeType | Type of the collection transaction | NO | INT | None = 0 Allowed = 1 Applicable only if the QrCode is set as PIX Withdraw or PIX Change. If not, must be filled as null |
Identifier | Collection identifier assigned by the collection issuer | NO | STRING | - |
*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:
Parameter | Description | Mandatory | Type | Comments |
---|---|---|---|---|
Method | GeneratePixQrCodeDueDate | YES | STRING | - |
PartnerId | Information provided by FitBank | YES | INT | - |
BusinessUnitId | Information provided by FitBank | YES | INT | - |
TxId | Transaction Identifier | YES | STRING | The 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 |
PixKey | Receiver's pix key | YES | STRING | - |
Date | - | YES | OBJECT | - |
DueDate | Collection Due Date | YES | STRING | YYYY-MM-DD |
DaysAfterDueDate | Expiration date in calendar days | NO | STRING | If 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 | - | YES | OBJECT | - |
TaxNumber | Payee's CPF/CNPJ | YES | STRING | - |
Name | Payee's name | YES | STRING | - |
ISPB | Payee's ISPB | YES (OR) | STRING | - |
Bank | Payee's bank | YES (OR) | STRING | - |
BankBranch | Payee's Bank Branch | YES | STRING | - |
BankAccount | Payee's Bank Account | YES | STRING | - |
BankAccountDigit | Payee's Bank Account Digit | YES | STRING | - |
Payer | - | YES | OBJECT | - |
TaxNumber | Payer's CPF/CNPJ | YES | STRING | - |
Name | Payer's Name | YES | STRING | - |
Payer's Mail | NO | STRING | - | |
Address | Payer's Address | NO | STRING | - |
City | Payer's City | NO | STRING | - |
State | Payer's State | NO | STRING | Maximum 2 characters - State abbreviation |
ZipCode | Payer's ZipCode | YES | STRING | Maximum 8 digits |
PrincipalValue | Original value of the charge | YES | STRING | - |
Fine | - | NO | OBJECT | - |
Type | Type of fine | NO | STRING | 0 - No fine will be charged 1 - Fixed Value 2 - Percentual |
Value | Value of fine | NO | STRING | - |
Date | Fine charging date | NO | STRING | Must be greater than the due date of the qrcode. |
Rebate | - | NO | OBJECT | - |
Type | Type of rebate | NO | STRING | 0 - No rebates will be granted 1 - Fixed Value 2 - Percentual |
Value | Value of rebate | NO | STRING | - |
Interest | NO | OBJECT | - | |
Type | Type of Interest | NO | STRING | 0 - 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) |
Value | Value of Interest | NO | STRING | - |
Date | Interest charging date | NO | STRING | Must be greater than the due date of the qrcode. |
Discount | NO | STRING | - | |
Type | Type of Discount | NO | STRING | 0 - No discount will be granted 1 - Fixed price until the date specified 2 - Balue in percent up to the date informed |
DiscountRange | NO | STRING | Number of discount bands. Limit: 3 bands | |
date | discount date | NO | STRING | YYYY-MM-DD |
value | discount value | NO | STRING | - |
PayerRequest | Text to be submitted to the payer | NO | STRING | Limit 140 characters |
AdditionalInformation | - | NO | OBJECT | - |
Name | Field name | NO | STRING | - |
Value | Field data | NO | STRING | - |
Updated 2 months ago