Answers.Body: <p>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: <a href="https://docs.civicrm.org/dev/en/latest/extensions/payment-processors/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/extensions/payment-processors/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-12T16:02:38.500Z
Answers.Text: 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?
Answers.UserDisplayName: repertor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-14T06:39:59.700Z
Answers.Text: Use the getfields in the API Explorer
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-18T21:57:39.803Z
Answers.Text: 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.
Answers.UserDisplayName: repertor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-19T14:15:03.250Z
Answers.Text: 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.
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-20T17:28:41.267Z
Answers.Text: 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?
Answers.UserDisplayName: repertor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-20T17:34:55.913Z
Answers.Text: I don’t want to have to reinvent the wheel by recreating an interface for the PayPal API, which is what the built-in CiviCRM payment processor parts do for us. Yet I can’t find any documentation at all for how to send card details to the payment processor CiviCRM API, or even if it has an API. Perhaps point me to the code that processes built-in payment forms so I can look there. I’m so unfamiliar with the code I haven’t been able to find that.
Answers.UserDisplayName: repertor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-21T07:10:00.480Z
Answers.Text: I do not think you should reinvent the wheel either :-) But I hope someone else will answer as I have no experience in dealing with credit cards or PayPal :-)
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-10T07:23:37.897Z
Answers.LastActivityDate: 2019-10-10T07:23:37.897Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>I'm at a total loss on how to make this work.</p>
  
  <p>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 <code>check</code>, marking it to be paid later.</p>
  
  <p>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.</p>
  
  <p>Any tips? Thanks!</p>
  
Tags: <civicontribute><api><payment-processor><paypal>
Title: Guidance Needed on using CiviCRM API + PayPal to Complete Membership Contribution Payment
ThreadText: # Guidance Needed on using CiviCRM API + PayPal to Complete Membership Contribution Payment
  
  (Asked by: username_0 on 2019-10-09)
  
  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!
  
  **Tags:** civicontribute, api, payment-processor, paypal
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-10. Score: 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/>
  
  > **Comments:**
  > **username_0**: 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?  
  > **username_1**: Use the getfields in the API Explorer  
  > **username_0**: 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.  
  > **username_1**: 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.  
  > **username_0**: 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?  
  > **username_0**: I don’t want to have to reinvent the wheel by recreating an interface for the PayPal API, which is what the built-in CiviCRM payment processor parts do for us. Yet I can’t find any documentation at all for how to send card details to the payment processor CiviCRM API, or even if it has an API. Perhaps point me to the code that processes built-in payment forms so I can look there. I’m so unfamiliar with the code I haven’t been able to find that.  
  > **username_1**: I do not think you should reinvent the wheel either :-) But I hope someone else will answer as I have no experience in dealing with credit cards or PayPal :-)  
  
  ---
  
  