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 Payments 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 Payments)?

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?

1 Answer 1


Each contribution should have one or more payments.

  1. When you are creating contribution using contribution api with completed status a payment is recorded automatically.

  2. If you creating contribution with pending status eg incase of check payments then when you receive payment from bank you use payment api to record payment for the pending contribution

In your case if you recording membership via code then i would suggest you to use Order api where you can pass membership and contribution params in the api params and it will create all required records in one call. You can refer here on how you can use order api to create membership or participant records with its payment in one call.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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