I'm using the API to create Contacts start Memberships through a signup form. We are offering 1-year memberships at various price points, and I have those set up in CiviMember. My code successfully creates Memberships.
What I'm trying to figure out are the API options for payments. There are API options for creating both a Contribution
or a Payment
.
Do I need to create both in my API call?
What I found was that a Payment
requires a contribution_id
, so it seems like they're connected. In another question I saw it's possible to associate multiple Payment
s with one Contribution
. It just seems these two concepts duplicate a lot. Is it correct then that a Contribution
just records that a Membership
price was agreed to, so it's like an itemized bill at a restaurant? And then that a Payment
can be $20 in cash and the rest on a card (one or multiple Payment
s)?
Also, we accept checks, so I noticed that a Contribution
can be marked with is_pay_later
to capture that. Would that flow for a person registering with a check be that I create a Contribution
with the API at first-signup to record their agreed-upon "bill," and upon receiving the check later a person manually enters the Payment
in the backend?