I have a load of Memberships to import. Each has a linked Contribution.
While I can import Memberships and Contributions separately, I cannot find a way to import the two together - in other words there does not seem to be an import routine in any version of CiviCRM which can create an entry in the member_payment table.
In the past I have done this through SQL, which is a bit fragile as a solution. I have been thinking of an API-based approach. But it seems strange if this has not come up before. I haven't even seen any code for this. Is there something out there which I am missing?