docs: def add_payment(self, payment):
          """
          Function to add payments
          @param payment: The payment dict
          @raise exception: when payment is invalid
          """
          if self.clean:
              from text_unidecode import unidecode
  
              payment['name'] = unidecode(payment['name'])[:70]
              payment['description'] = unidecode(payment['description'])[:140]
  
          # Validate the payment
          self.check_payment(payment)
  
          # Get the CstmrDrctDbtInitnNode
          if not self._config['batch']:
              # Start building the non batch payment
              PmtInf_nodes = self._create_PmtInf_node()
              PmtInf_nodes['PmtInfIdNode'].text = make_id(self._config['name'])
              PmtInf_nodes['PmtMtdNode'].text = "DD"
              PmtInf_nodes['BtchBookgNode'].text = "false"
              PmtInf_nodes['NbOfTxsNode'].text = "1"
              PmtInf_nodes['CtrlSumNode'].text = int_to_decimal_str(
                  payment['amount'])
              PmtInf_nodes['Cd_SvcLvl_Node'].text = "SEPA"
              PmtInf_nodes['Cd_LclInstrm_Node'].text = self._config['instrument']
              PmtInf_nodes['SeqTpNode'].text = payment['type']
              PmtInf_nodes['ReqdColltnDtNode'].text = payment['collection_date']
              PmtInf_nodes['Nm_Cdtr_Node'].text = self._config['name']
              PmtInf_nodes['IBAN_CdtrAcct_Node'].text = self._config['IBAN']
  
              if 'BIC' in self._config:
                  PmtInf_nodes['BIC_CdtrAgt_Node'].text = self._config['BIC']
  
              PmtInf_nodes['ChrgBrNode'].text = "SLEV"
              PmtInf_nodes['Nm_CdtrSchmeId_Node'].text = self._config['name']
              PmtInf_nodes['Id_Othr_Node'].text = self._config['creditor_id']
              PmtInf_nodes['PrtryNode'].text = "SEPA"
  
          if 'BIC' in payment:
              bic = True
          else:
              bic = False
  
          TX_nodes = self._create_TX_node(bic)
          TX_nodes['InstdAmtNode'].set("Ccy", self._config['currency'])
          TX_nodes['InstdAmtNode'].text = int_to_decimal_str(payment['amount'])
  
          TX_nodes['MndtIdNode'].text = payment['mandate_id']
          TX_nodes['DtOfSgntrNode'].text = payment['mandate_date']
          if bic:
              TX_nodes['BIC_DbtrAgt_Node'].text = payment['BIC']
  
          TX_nodes['Nm_Dbtr_Node'].text = payment['name']
          TX_nodes['IBAN_DbtrAcct_Node'].text = payment['IBAN']
          TX_nodes['UstrdNode'].text = payment['description']
          if not payment.get('endtoend_id', ''):
              payment['endtoend_id'] = make_id(self._config['name'])
          TX_nodes['EndToEndIdNode'].text = payment['endtoend_id']
  
          if self._config['batch']:
              self._add_batch(TX_nodes, payment)
          else:
              self._add_non_batch(TX_nodes, PmtInf_nodes)