Answers.Body: <p>You <em>can</em> create a fake initial payment on a recurring contribution and CiviCRM will handle the IPN properly.  Unfortunately, this is a bit of a tedious process.  </p>
  
  <p>Fortunately, it's all documented on my <a href="https://hq.palantetech.coop/projects/commons/wiki/PayPal" rel="nofollow noreferrer">PayPal and CiviCRM</a> page.  See the section called <a href="https://hq.palantetech.coop/projects/commons/wiki/PayPal#Modifying-an-IPN-to-reflect-an-updated-CiviCRM-contact-ID-etc" rel="nofollow noreferrer">Modifying an IPN to reflect an updated CiviCRM contact ID</a>.  The scenario is a little different but the techniques are applicable here.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-18T22:53:40.350Z
Answers.Text: Thank you.  I tried to just update the contribution record the admin had manually put in but alas too many foreign key issues so in the end I just created new first transaction and made the transaction_id be that which PayPal was sending.  That worked.  Yea.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T14:41:27.450Z
Answers.Text: Yes, I should have been explicit that this is the preferred route.  Hopefully the docs were helpful for you in that!
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T20:51:54.850Z
Answers.Text: The document was very helpful.  Saved me a work.  I was also interested the change the id's PayPal is sending particularly the contact_id but alas either they've changed it or we don't have the right type of account.  I could go to the page you mention but no modify button.  A change button but even examining it I didn't find where I could change say the contact id.  (We have a few donors who set up recurring on their individual id but rather have it show up under their household.  Of course, I can do a lot of moving id's around and make it work but...)
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-18T07:32:24.263Z
Answers.LastActivityDate: 2017-07-18T07:32:24.263Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>We have a new recurring contribution that isn't being entered into Civi.  In the ConfigAndLog log I see "Could not find contribution record 20874".  In the nginx logs I see that that number is being passed from PayPal as contributionID.  </p>
  
  <pre><code>POST /sites/all/modules/civicrm/extern/ipn.php?reset=1&amp;contactID=10132&amp;contributionID=20874&amp;module=contribute&amp;contributionRecurID=25&amp;contributionPageID=2 HTTP/1.1
  </code></pre>
  
  <p>Of course, that id is not in the contribution table.  After looking at ones that worked it looks like the contributionID sent from PayPal is that of the first contribution of the recurring contributions.  </p>
  
  <p>Unfortunately, this error wasn't noticed right away so I can't see if there were any other errors when it was first created.</p>
  
  <p>So can I just manually create a record in contributions with that id and have it work?  What is it looking for in that record?  (Well, I'd enter a payment for that person and change the id and anything else it is looking for.)</p>
  
  <p>We don't want to have the person cancel the recurring and do it again.  It's bad form to ask a donor to redo their payments.  They might just cancel and not redo it.</p>
  
Tags: <paypal><recurring-contributions>
Title: How can I fix the error message "Could not find contribution record" from PayPal?
ThreadText: # How can I fix the error message "Could not find contribution record" from PayPal?
  
  (Asked by: username_0 on 2017-07-17)
  
  We have a new recurring contribution that isn't being entered into Civi. In the ConfigAndLog log I see "Could not find contribution record 20874". In the nginx logs I see that that number is being passed from PayPal as contributionID.
  
  ```
  POST /sites/all/modules/civicrm/extern/ipn.php?reset=1&contactID=10132&contributionID=20874&module=contribute&contributionRecurID=25&contributionPageID=2 HTTP/1.1
  
  ```
  
  Of course, that id is not in the contribution table. After looking at ones that worked it looks like the contributionID sent from PayPal is that of the first contribution of the recurring contributions.
  
  Unfortunately, this error wasn't noticed right away so I can't see if there were any other errors when it was first created.
  
  So can I just manually create a record in contributions with that id and have it work? What is it looking for in that record? (Well, I'd enter a payment for that person and change the id and anything else it is looking for.)
  
  We don't want to have the person cancel the recurring and do it again. It's bad form to ask a donor to redo their payments. They might just cancel and not redo it.
  
  **Tags:** paypal, recurring-contributions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-07-18. Score: 1 | Accepted answer
  
  You *can* create a fake initial payment on a recurring contribution and CiviCRM will handle the IPN properly. Unfortunately, this is a bit of a tedious process.
  
  Fortunately, it's all documented on my [PayPal and CiviCRM](https://hq.palantetech.coop/projects/commons/wiki/PayPal) page. See the section called [Modifying an IPN to reflect an updated CiviCRM contact ID](https://hq.palantetech.coop/projects/commons/wiki/PayPal#Modifying-an-IPN-to-reflect-an-updated-CiviCRM-contact-ID-etc). The scenario is a little different but the techniques are applicable here.
  
  > **Comments:**
  > **username_0**: Thank you.  I tried to just update the contribution record the admin had manually put in but alas too many foreign key issues so in the end I just created new first transaction and made the transaction_id be that which PayPal was sending.  That worked.  Yea.  
  > **username_1**: Yes, I should have been explicit that this is the preferred route.  Hopefully the docs were helpful for you in that!  
  > **username_0**: The document was very helpful.  Saved me a work.  I was also interested the change the id's PayPal is sending particularly the contact_id but alas either they've changed it or we don't have the right type of account.  I could go to the page you mention but no modify button.  A change button but even examining it I didn't find where I could change say the contact id.  (We have a few donors who set up recurring on their individual id but rather have it show up under their household.  Of course, I can do a lot of moving id's around and make it work but...)  
  
  ---
  
  