I'm at a total loss on how to make this work.

I am using the CiviCRM API to create a contact, create a membership for that contact, and even create a contribution if that person selects check, marking it to be paid later.

However, I cannot figure out how to pass a credit card through the API, using the PayPal integration to process the card payment and create the resulting contribution marking the membership as paid and active. None of the API resources have a parameter for card details that I could find, and I couldn't find anything on using the API to actually process payments.

Any tips? Thanks!

1 Answer 1


Although I have no experience with PayPal I would expect that the payment processor makes sure the payment details get passed on, AFAIK there is no API for credit card details nor is it required! Perhaps this might give you some clues: https://docs.civicrm.org/dev/en/latest/extensions/payment-processors/

  • Thanks for the tip! It's moved me forward a bit. I will try to use doPayment, but now I can't find documentation on the possible parameters. Any clues?
    – repertor
    Oct 12, 2019 at 16:02
  • Use the getfields in the API Explorer Oct 14, 2019 at 6:39
  • Uhh thanks. I now know that getfields exists. But use it on what entity? None of the ones names anything related to money have any fields for credit card numbers, for instance.
    – repertor
    Oct 18, 2019 at 21:57
  • As mentioned, we do not actually process credit card stuff, that is what the payment processors do? I do not think I ever dealt with a credit card number in my CiviCRM years, but I might be mistaken. Oct 19, 2019 at 14:15
  • My question is how do I get card numbers, expiration date, etc from a form to a payment processor? How does CiviCRM do it with the built in forms? Why configure a payment processor at all if the card details don’t flow through the CiviCRM backend in some way to get to a payment processor?
    – repertor
    Oct 20, 2019 at 17:28

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.