2.2 - Boleto change

ChangeBoleto

API Method = ChangeBoleto

The change in payment slips is necessary when the data in the slip is not consistent with the billing data (values or due date).
In view of this, FitBank's Collection API offers beneficiary clients the ChangeBoleto method capable of changing the following information:

  • Due Date - ChangeDueDateBoleto
  • Principal Value - ChangePrincipalValueBoleto
  • Rebate Value - ChangeRebateBoleto
  • Fine Date - ChangeFineDateBoleto

Each information is related to an InstructionType, which defines what the beneficiary is changing. In addition, the method can contain from 1 to N InstructionType, enabling the boleto to have N information changed simultaneously.

The ChangeBoleto method will return a protocol number, which will be used to query whether the change instructions have taken effect. Each request sending is associated with a protocol number, independent of the numbers of instructions sent. If instructions to change the same boleto are sent in a new request, a new protocol number will be generated.

Important:

  • Only issued or registered boletos can be changed;
  • Boletos that are in the payment process, settled, or cancelled cannot be altered;
  • Changing boletos works 24/7;
  • Only the beneficiary of the boleto can change it.
{
  "Method": "ChangeBoleto",
  "PartnerId": 836,
  "BusinessUnitId": 1260,
  "DocumentNumber": "123670",
  "TaxNumber": "65489102500168",
  "Changes": [
    {  
      "Type": "ChangeDueDateBoleto",
      "Value": "31/03/2023"
    },
    {  
      "Type": "ChangePrincipalValueBoleto",
      "Value": "10"
    },
    {  
      "Type": "ChangeRebateBoleto",
      "Value": "0.5"
    },
    {  
      "Type": "ChangeFineDateBoleto",
      "Value": "31/04/2023"
    },
  ]
}

Description

ParameterTypeDescriptionMandatory
Method String ChangeBoletoYES 
PartnerId Long FitBank provided IDYES 
BusinessUnitId Long FitBank provided IDYES 
DocumentNumber String Internal transaction identifierYES 
TaxNumber String Payee's TaxNumberYES 
Changes Object-YES 
Type String Instruction type:
ChangeDueDateBoleto
ChangePrincipalValueBoleto 
ChangeRebateBoleto
ChangeFineDateBoleto
YES 
Value String Change ValueYES 

Changing the due date of boleto

The customer will be able to change and insert the value of the new due date of the invoice sent in the object Changes a InstructionType ChangeDueDateBoleto.

Changing the principal value of the boleto

If the customer issues a boleto with a wrong amount or different from what he wants, he can change it with the InstructionType ChangePrincipalValueBoleto, in the ChangeBoleto method. The amount can be modified without having to change the interest, penalty and discount fields.

Changing the rebate boleto

After issuing a boleto, the customer can change the rebate amount with InstructionType ChangeRebateBoleto.

Change fine collection date

If you change the due date of the boleto, and the boleto has a fine, you should also change the date on which the fine is charged. The fine collection date must be greater than the boleto's due date.

GetChangeBoleto

The GetChangeBoleto method allows you to query whether the change instructions sent via the ChangeBoleto method were successfully effected. Return status:

  • Created - Change instruction created
  • Sending - Change instruction is being sent to register
  • Sent - Instruction sent to register
  • Processed - Instruction completed successfully
  • Error - The change instruction was not carried out.
{
  "Method": "GetChangeBoleto",
  "PartnerId": 836,
  "BusinessUnitId": 1260,
  "TaxNumber": "65489102500168",
  "ProtocolNumber": 102
}

Description

ParameterTypeDescriptionMandatory
Method String GetChangeBoletoYES
PartnerId Long FitBank provided IDYES
BusinessUnitId Long FitBank provided IDYES 
TaxNumerString Payee's CPN/CNPJYES 
ProtocolNumberString Protocol number returned on response from the ChangeBoleto methodYES 

AlterBoletoInProducts

API Method = AlterBoletoInProducts

This method allows for the modification of the final beneficiary of the boleto, following these restrictions:

  • Only the original issuer of the boleto has permission to make the modification, meaning only the original beneficiary can modify the boleto;
  • The new value assigned to the final beneficiary must be equal to the original issuance value of the boleto;
  • If the user provides more than one 'Receiver' account, the sum of the values assigned to each must equal the issuance value of the boleto;
  • The Receivers accounts must exist and belong to FitBank, meaning the final beneficiary can only be changed to internal accounts;
  • The Products object retains the same fields as at the time of issuance, meaning the mandatory rules for each field remain unchanged;
  • Only boletos in created or registered status can be changed.
{
    "Method": "AlterBoletoInProducts",
    "PartnerId": 123,
    "BusinessUnitId": 123,
    "DocumentNumber": 7206003,
    "TaxNumber": "96033583043",
    "Products": [
        {
            "SellerPersonType": 0,
            "SellerName": "MARGARIDA SILVA",
            "SellerTaxNumber": "758.315.920-22",
            "ReceiverPersonType": 0,
            "ReceiverName": "MARGARIDA SILVA",
            "ReceiverTaxNumber": "758.315.920-22",
            "ReceiverBank": "",
            "ReceiverBankBranch": "",
            "ReceiverBankAccount": "",
            "ReceiverBankAccountDigit": "",
            "Reference": "1",
            "ProductCode": "1",
            "ProductName": "Boleto",
            "ProductQty": 1,
            "ProductValue": 10.20
        }
    ]
}

Description

ParameterTypeDescriptionMandatory
Method StringAlterBoletoInProductsYES
PartnerId Long FitBank provided IDYES 
BusinessUnitId Long FitBank provided IDYES 
DocumentNumberStringInternal transaction identifierYES 
TaxNumber String Payee's CPF/CNPJYES 
Products ObjectProduct listYES 
SellerPersonType IntType of Issuer of the boleto
0 - Individuals (natural person)
1 - Company (legal person)
YES 
SellerName String Legal Name of the Boleto issuing accountYES 
SellerTaxNumber String CPF/CNPJ of the Boleto issuing accountYES 
ReceiverPersonType IntType of receiver of the boleto
0 - Individuals (natural person)
1 - Company (legal person)
YES 
ReceiverName String Legal Name of the Boleto receiverYES 
ReceiverTaxNumber String CPF/CNPJ of the Boleto receiverYES 
ReceiverBankStringInternal account receiver identification BankYES
ReceiverBankBranchStringInternal account receiver identification Bank Branch YES
ReceiverBankAccountStringInternal account receiver identification Bank AccountYES
ReceiverBankAccountDigitStringInternal account receiver identification Bank Account DigitYES
Reference String Transaction descriptionYES 
ProductCode String Transaction descriptionYES 
ProductName String Transaction descriptionYES 
ProductQty Decimal Transaction descriptionYES 
ProductValue Decimal Value of boletoYES 

📘

You can check if the modification was successfully completed by using the GetBoletoInById method.