2.2 - Electronic Payer Alteration

Electronic Payer Alteration

The AlterElectronicPayer method allows for the inclusion and exclusion of accounts linked to the payer client, as long as at least one remains active. The method must receive the SPB banks.

DDA accounts not mentioned in the modification request will not be replaced, meaning that excluded accounts must remain excluded, and active accounts must remain active.
It will not be possible to change the branch and account data of the payer. If necessary, the electronic payer must send a request to exclude the already registered branch and account and, subsequently, a request for inclusion. This action can be performed even within the same modification request, and does not necessarily need to be ordered.

{
  "Method": "AlterElectronicPayer",
  "PartnerId": 12334,
  "BusinessUnitId": 12615,
  "TaxNumber": "12345678910",
  "Accounts": [
    {
      "Type": "0",
      "Bank": "450",
      "BankBranch": "1",
      "Account": "112233445",
      "AccountDigit": "6"
    },
    {
      "Type": "1",
      "Bank": "341",
      "BankBranch": "2",
      "Account": "998877665",
      "AccountDigit": "4"
    }
  ]
}

Alter Electronic Payer

Add or remove bank accounts from an existing electronic payer.

Endpoint

POST /main/execute

Request Body

{
  "Method": "AlterElectronicPayer",
  "PartnerId": 12334,
  "BusinessUnitId": 12615,
  "TaxNumber": "12345678910",
  "Accounts": [
    {
      "Type": "0",
      "Bank": "450",
      "BankBranch": "1",
      "Account": "112233445",
      "AccountDigit": "6"
    },
    {
      "Type": "1",
      "Bank": "341",
      "BankBranch": "2",
      "Account": "998877665",
      "AccountDigit": "4"
    }
  ]
}

Request Parameters

FieldTypeRequiredDescription
MethodstringYesMust be AlterElectronicPayer
PartnerIdintegerYesPartner identifier
BusinessUnitIdintegerYesBusiness unit identifier
TaxNumberstringYesCPF or CNPJ of the electronic payer
AccountsarrayYesList of account operations
TypestringYes"0" = Add account, "1" = Remove account
BankstringYes*Bank code (required for add operations)
BankBranchstringYes*Bank branch (required for add operations)
AccountstringYes*Account number (required for add operations)
AccountDigitstringYes*Account digit (required for add operations)

*Required when Type is "0" (add account)

Success Response

{
  "Success": true,
  "Message": "Pagador eletrônico alterado com sucesso"
}

Error Responses

Electronic payer not found:

{
  "Success": false,
  "Message": "O CPF/CNPJ fornecido não consta como pagador eletrônico. Por favor, revise seus dados."
}

Invalid operation type:

{
  "Success": false,
  "Message": "O tipo de operação deve ser ADD ou REMOVE"
}
{
  "Success": "false",
  "Message": "Não foi possível localizar a conta SPB na posição {0}0",
  "Validation": []
}

Failure Response - When a customer with only one registered account can send the deletion of that account and the inclusion of the same account

{
  "Success": "false",
  "Message": "Não é permitido enviar mais de uma alteração para uma mesma conta. Valide os dados da suas contas, e tente novamente",
  "Validation": []
}