5 - Webhooks

Boleto status webhooks

For the communication between systems, webhooks are used, which offer real time updates on the Boleto status.
In the field Status the following returns are possible:

  • 3 - Registered
  • 5 - Paid
  • 7 - Cancel

Registered boleto webhook

{
    "Boleto": {
        "BoletoInfo": {
            "DocumentNumber": "1633565",
            "Status": 3,
            "OcurrenceDate": "2024-06-18T09:26:38.57",
            "Barcode": "45097920600000002000067300000010001031992222",
            "OurNumber": "0011001123333590",
            "ExternalNumber": "2323233"
        }
    },
    "ReturnMessage": "Entrada Confirmada",
    "ReturnCode": "02",
    "Identifier": "465656-ghfgfg-6465-wjaklv5",
    "BusinessUnitId": "1261",
    "Method": "UpdateBoletoInWebhook"
}

Paid boleto webhook

{
    "Boleto": {
        "BoletoInfo": {
            "DocumentNumber": "1633565",
            "Status": 5,
            "OcurrenceDate": "2024-06-18T09:26:38.57",
            "Barcode": "45097920600000002000067300000010001031992222",
            "OurNumber": "0011001123333590",
            "ExternalNumber": "2323233"
        },
        "PaymentInfo": {
            "PrincipalValue": 10,
            "PaymentChannel": 3,
            "PaidValue": 8,
            "Rebate": 2,
            "Discount": 0,
            "Fine": 0,
            "Interest": 0,
            "PaymentDate": "2024-06-17T00:00:00.00",
            "CreditDate": "2024-06-18T09:26:38.57",
            "PayerBankCode": 450,
            "PayerBankBranchCode": 0001
        }
    },
    "ReturnMessage": "Liquidação Normal",
    "ReturnCode": "06",
    "Identifier": "465656-ghfgfg-6465-wjaklv5",
    "BusinessUnitId": "1261",
    "Method": "UpdateBoletoInWebhook"
}

Canceled boleto webhook

Canceled after registration

{
    "Boleto": {
        "BoletoInfo": {
            "DocumentNumber": "1633565",
            "Status": 7,
            "Reason": "Cancelamento de boleto processado",
            "OcurrenceDate": "2024-06-18T09:26:38.57",
            "Barcode": "45097920600000002000067300000010001031992222",
            "OurNumber": "0011001123333590",
            "ExternalNumber": "2323233"
        }
    },
    "ReturnMessage": "Baixa automática",
    "ReturnCode": "09",
    "Identifier": "465656-ghfgfg-6465-wjaklv5",
    "BusinessUnitId": "1261",
    "Method": "UpdateBoletoInWebhook"
}

Canceled before registration

{
    "Boleto": {
        "BoletoInfo": {
            "DocumentNumber": "1633565",
            "Status": 7,
            "Reason": "Cancelamento de boleto processado",
            "OcurrenceDate": "2024-06-18T09:26:38.57",
            "Barcode": "45097920600000002000067300000010001031992222",
            "OurNumber": "0011001123333590",
            "ExternalNumber": "2323233"
        }
    },
    "ReturnMessage": "Entrada Rejeitada",
    "ReturnCode": "03",
    "Identifier": "465656-ghfgfg-6465-wjaklv5",
    "BusinessUnitId": "1261",
    "Method": "UpdateBoletoInWebhook"
}

Description - Boleto status webhooks

ParameterTypeDescription
BoletoObject-
BoletoInfoObject-
DocumentNumberDecimalBoleto Document Number
StatusDecimal3 - Registered
5 - Paid
7 - Canceled
ReasonStringDescription of boleto cancellation. The "Reason" field is only sent for boletos with canceled status.
OcurrenceDateStringDate of occurrence:
If boleto registered, then the registration date will be returned
If boleto canceled, then the cancellation date will be returned
If boleto paid, then the payment date will be returned
BarcodeStringBarcode
OurNumberString"Nosso Número" of the boleto
ExternalNumberStringExternal identification number
PaymentInfoObjectOnly sent when the boleto status is Paid
PrincipalValueDecimalOriginal boleto value
PaymentChannelNumberPayment Channel
1 - Branches
2 - Self-service terminal
3 - Internet
5 - Correspondent banking
6 - Phone/Call Center
7 - Electronic Archive
8 - DDA
9 - Digital banking correspondent
PaidValueDecimalPaid Value
RebateDecimalCalculated rebate value
DiscountDecimalCalculated discount value
FineDecimalCalculated fine value
InterestDecimalCalculated interest value
PaymentDateStringPayment Date
CreditDateStringDate of credit to the beneficiary's or final beneficiary's account
PayerBankCodeNumberBoleto paying bank code
PayerBankBranchCodeStringBranch of the paying bank
ReturnMessageStringMovement's Message
Entrada Confirmada
Entrada Rejeitada
Liquidação Normal
Baixa automática
ReturnCodeStringMovement's Code
02 (Boleto Entry Confirmed)
03 (Entry Rejected)
06 (Normal Settlement)
09 (Automatic retirement)
IdentifierStringIdentifier
BusinessUnitIdNumberFitBank provided ID
MethodStringUpdateBoletoInWebhook

Boleto Pre-Settled Webhook

Boleto settlement follows a two-stage process. Initially, in the first stage, the institution issuing the boleto is notified of the payment made. Then, in the second stage, the payment is received and credited to the beneficiary customer's account.

The pre-settlement webhook sends a notification to the customer when FitBank receives the boleto payment information, which corresponds to the first stage of the process. These notifications are sent from 5am for boletos paid up to 11.59pm on the previous day and from 3pm for boletos paid up to 1.29pm on the current day.

This notification is not the settlement of the boletos, as the amounts are only credited to the beneficiary's account once payment has been received, in the second phase of the process. This follows the established settlement cycles, starting at 08:20 or 16:10.

{
  "Boleto": {
    "BoletoInfo": {
      "DocumentNumber": "4900067",
      "Status": "PreSettled",
      "OcurrenceDate": "2024-04-04T17:31:45.367",
      "Barcode": "45095900000000000010010000054524087700000000",
      "OurNumber": "0010000000000000",
      "ExternalNumber": "4957867"
    },
    "PaymentInfo": {
      "PaymentChannel": "3",
      "PaidValue": 0.01,
      "PaymentDate": "2024-04-04T00:00:00",
      "PayerBankCode": "450",
      "PayerBankBranchCode": "0001"
    }
  },
  "Identifier": "e449f322-4cbe-b727-8d5cc3e760ce",
  "Method": "SendBoletoInWebhook",
  "BusinessUnitId": 1259
}

Description

ParameterTypeDescription
BoletoInfoObjectBoleto Information
DocumentNumberStringBoleto Document Number
StatusStringPreSettled
OcurrenceDateStringStatus change date
BarcodeStringBarcode
OurNumberStringOurNumber
ExternalNumberStringExternalNumber
PaymentInfoObjectPayment Information
PaymentChannelStringPayment Channel
1 - Branches
2 - Self-service terminal
3 - Internet
5 - Correspondent banking
6 - Phone/Call Center
7 - Electronic Archive
8 - DDA
9 - Digital banking correspondent
PaidValueDecimalPaid Value, including interest, fines, discounts and rebates
PaymentDateStringPayment Date
PayerBankCodeStringPayer Bank Code
PayerBankBranchCodeStringPayer Bank Branch Code
IdentifierStringIdentifier
MethodStringSendBoletoInWebhook
BusinessUnitIdLongFitBank provided ID

Boleto Change Webhook

When you send a change statement, Webhooks are sent that contain the status of the change in the boleto. They are:

  • Status 3 = Processed (Final success status);
  • Status 5 = Instruction registration error.

You can send multiple change instructions for a boleto in a single request. In this case, a webhook will be sent for each instruction type.

Example: If the boleto contains 3 change instructions in one request, 3 webhooks will be sent

(To see the existing types of instructions, you can go to the link.)

ChangeRebateBoleto

{
  "DocumentNumber": "2394793",
  "Identifier": "5067dbfb-234d-9e86-1c460891",
  "OldValue": "0.10",
  "NewValue": "0.05",
  "InstructionType": 0,
  "Status": 3,
  "TotalValue": 1,
  "PartnerId": 678,
  "Method": ChangeBoleto,
  "BusinessUnitId": 1261
}

ChangeDueDateBoleto

{
  "DocumentNumber": "2394603",
  "Identifier": "f1716826-4bbb-4456-9ae515dc4",
  "OldValue": "2023-01-31",
  "NewValue": "2023-02-01",
  "InstructionType": 1,
  "Status": 3,
  "TotalValue": 1,
  "PartnerId": 678,
  "Method": ChangeBoleto,
  "BusinessUnitId": 1261
}

ChangePrincipalValueBoleto

{
  "DocumentNumber": "2394627",
  "Identifier": "85706573-e575-872a-2c96f4",
  "OldValue": "1.00",
  "NewValue": "2.0",
  "InstructionType": 2,
  "Status": 3,
  "TotalValue": 2,
  "PartnerId": 678,
  "Method": ChangeBoleto,
  "BusinessUnitId": 1261
}

Description

ParameterTypeDescription
DocumentNumberStringBoleto Document Number
IdentifierStringIdentifier
OldValueStringvalue before change
NewValueStringvalue after change
InstructionTypeIntType of changed information
ChangeRebateBoleto = 0
ChangeDueDateBoleto = 1,
ChangePrincipalValueBoleto = 2
StatusIntChange status
3 - Processed
5 - Error
TotalValueDecimalBoleto value
PartnerIdStringFitBank provided ID
MethodString"ChangeBoleto"
BusinessUnitIdLongFitBank provided ID

Boleto Write-Off Cancellation Webhook

There is a process called "Boleto Write-Off Cancellation", which can occur within 2 business days. In this way, the Recipient FI returns the bill to the Recipient FI, who consequently must refund the amount to the end customer (payer of the bill).
All refund traceability by FitBank (Recipient IF) already exists, because the write-off cancellation records are confirmed in the ACMP 615 files, in the LDL messages, and in consultations on the invoices returned in the PCR.
FItBank makes this refund within business days from the date of payment. The Receiving FI must refund the amount to the Final Payer.

The Webhook should only be sent for the following return reasons:

  • 51 - Payment slip settled for excess or minor value;
  • 68 - Duplicate transfer by the FI Receiving Slip of settled payments;

CancelWriteOffWebhook

{
    "Boleto": {
        "BoletoInfo": {
            "DocumentNumber": " ",
            "OurNumber": " ",
            "ExternalNumber": " ",
            "Barcode": " ",
            "TypableLine": " "
        },
        "PaymentInfo": {
            "PaymentChanel": "1",
            "OriginalValue": 10,
            "FinalValue": 11,
            "Rebate": 0.2,
            "Discount": 0.2,
            "Fine": 0.2,
            "Interest": 0.2,
            "PaidValue": 9,
            "PaymentDate": "2022-12-15T14:17:11.66",
            "PayerBankCode": null,
            "PayerBankBranchCode": null
        }
    },
    "ReasonCode": 51, 
    "Identifier": " ",
    "BusinessUnitId": "",
    "Method": "Cancelamento de Baixa"
}

Description

ParameterTypeDescription
DocumentNumberStringBoleto Document Number
PaymentChanelNumberPayment Channel
1 - Branches
2 - Self-service terminal
3 - Internet
5 - Correspondent banking
6 - Phone/Call Center
7 - Electronic Archive
8 - DDA
9 - Digital banking correspondent
OriginalValueStringInitial value
FinalValueStringExpected Value for Settlement, plus interest, fine, discount and rebate
RebateDecimalCalculated rebate value
DiscountDecimalCalculated discount value
FineDecimalCalculated fine value
InterestDecimalCalculated interest value
PaidValueDecimalPaid Value
PaymentDateStringPayment Date
PayerBankCodeNumberBoleto paying bank code
PayerBankBranchCodeStringBranch of the paying bank
ReasonCodeNumberReason for return informed by the Treasury
IdentifierStringIdentifier
BusinessUnitIdLongFitBank provided ID
MethodString"Cancelamento de Baixa"

Boleto Recurrence Webhook

The issuance of recurring bills is carried out asynchronously. When using the GenerateRecurrinceBoletoIn API, the system only returns the ID of the generated recurrence.

Subsequently, all invoices associated with this recurrence will be issued. For the customer to have access to the IDs of each bill, they must receive a webhook with this information.

BoletoInRecurrenceWebhook

{
    "Payee": {
        "Name": "Fulano",
        "TaxNumber": "***851***13",
        "Bank": {
            "Code": 260,
            "Branch": 1332,
            "Account": 1132,
            "AccountDigit": 1
        }
    },
    "Payer": {
        "Name": "Fulano",
        "TaxNumber": "16985164013"
    },
    "Installments": [
        {
            "DocumentNumber": 26566,
            "DueDate": "2023-12-20"
        },
        {
            "DocumentNumber": 26567,
            "DueDate": "2023-12-20"
        },
        {
            "DocumentNumber": 26568,
            "DueDate": "2023-12-20"
        },
        {
            "DocumentNumber": 26569,
            "DueDate": "2023-12-20"
        }
    ],
    "ExternalNumber": "12245",
    "URL": "",
    "BoletoRecurrenceId": 12345,
    "BusinessUnitId": 672,
    "Method": "BoletoRecurrenceIn"
}

Description

ParameterTypeDescription
PayeeObjectBeneficiary information.
Payee.NameStringBeneficiary's name.
Payee.TaxNumberStringBeneficiary's CPF/CNPJ.
Payee.BankObjectBeneficiary's bank information.
Payee.Bank.CodeNumberBeneficiary's bank code.
Payee.Bank.BranchNumberBeneficiary's bank branch.
Payee.Bank.AccountNumberBeneficiary's account number.
Payee.Bank.AccountDigitNumberBeneficiary's account check digit.
PayerObjectPayer information.
Payer.NameStringPayer's name.
Payer.TaxNumberStringPayer's CPF/CNPJ.
InstallmentsArray of ObjectsList of installments associated with the payment.
Installments[].DocumentNumberNumberDocument number related to the installment.
Installments[].DueDateStringInstallment due date in the format "YYYY-MM-DD".
ExternalNumberStringExternal identification number of the payment.
URLStringReturn URL (only present when Type is "Carnê").
BoletoRecurrenceIdNumberUnique identifier for the "Carnê", returned when generating recurring boletos.
BusinessUnitIdLongBusiness unit identifier.
MethodStringPayment method, specified here as "BoletoRecurrenceIn".