In the CiviSEPA Setup Instructions there is a section regarding importing SEPA mandates, but instead of an answer there is a question... (similar to the one I am asking.)

I have been checking the database tables and Contribute options and unless I have missed something, there is no way to import the contributions along with the mandates. That is, using the Import contributions option will populate the civicrm_contribution table, but not the civicrm_contribution_recur table which stores the details of the recurring transactions.

There is also the question of populating the civicrm_sdd_* tables which are specific to the CiviSEPA extension.

I don't intend to have all the history of the mandates I want to import, but at least a working mandate list that may be used to generate future mandates.

I suppose that I could create a script to inject the data in the proper tables or through the API, but would like to know if someone has tried something easier or has something to start with.


I have found this question that also mentions SepaMandate and createfull: Need to create a SepaMandate for street walkers?


Indeed there is not a standard importer for SEPA mandates. I have migrated SEPA mandates a few times and I use the SepaMandate createfull API. That will create the mandate and the recurring contribution.

If you then want to import actual payments you should fill the column contribution_recur_id to ensure they are linked to the mandate.

  • Using the API sound like a good idea, thanks! For the second part you mean using the field contribution_recur_id of the civicrm_contribution table to point to the id of the right register of the civicrm_contribution_recur table? How do you propose to do the import of the payments? Oct 26 '18 at 9:09
  • Indeed, and using the Contribution create API. Oct 26 '18 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.