Answers.Body: <p>Expanding a bit on Randy's answer:</p>
  
  <p>Payment Instruments have both a 'label' and a 'name'.  The label is displayed via the GUI and is editable.  When the payment instrument is created, the label and name have the same value, but when it is edited, only the label is changed, not the name.  Confusingly, the name is used by the import.</p>
  
  <p>So, when you changed 'Check' to 'Cheque', that changed the label to 'Cheque' but the name remains as 'Check' which means in the import you need to use 'Check' (the name), not 'Cheque' (the label).  Note that you do not need to revert the label change.</p>
  
  <p>You can get the name values by using API explorer:<br>
  entity=OptionValue, action=get<br>
  Option Group Id=payment_instrument</p>
  
  <p><a href="https://i.sstatic.net/57OlP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/57OlP.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-04T10:28:13.560Z
Answers.LastActivityDate: 2018-07-04T10:28:13.560Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>If you guys found similar issue with me. Please check whether you've already made some changes to <strong>Payment Method</strong> option value which is by default you could access it by <a href="http://yoursiteurl.com/civicrm/admin/options/payment_instrument?reset=1" rel="nofollow noreferrer">http://yoursiteurl.com/civicrm/admin/options/payment_instrument?reset=1</a></p>
  
  <p>Revert the changes you've made to default value, and try to re-upload/re-import the contribution. It solved my problem. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-04T06:17:26.790Z
Answers.LastActivityDate: 2018-07-04T06:17:26.790Z
Answers.UserDisplayName: Harkedian
Body: <p>just want to ask quick question.</p>
  
  <p>I'm trying to import contribution from my csv files.
  In my csv files, I put the value of column <strong>Payment method</strong> as : Others, Cheque, Credit Card. (All the value has been set on Option value)</p>
  
  <p>Then when I try to upload the csv files, I got the error reason : </p>
  
  <pre><code>payment_instrument_id is not a valid integer
  </code></pre>
  
  <p>The error is found at Import_Errors.csv files.</p>
  
  <p>Do you have any clue about what's happening?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-03T08:30:36.183Z
Comments.Text: In import_errors.csv, is it showing errors for every line or just some?  Are some payment methods accepted?  What version are you using?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-03T09:23:31.527Z
Comments.Text: it shows error for all line. Nothing payment method accepted. Fortunately It already solved. The issue is because i changed the value of each payment method option. Now after I revert back to integer, all is working. Thanks.
Comments.UserDisplayName: Harkedian
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-03T13:03:45.407Z
Comments.Text: Good to hear it is solved.  If you can write an answer with what you needed to do to make it work then that will help others who have the same problem.
Comments.UserDisplayName: Aidan
Tags: <civicontribute><contributions>
Title: payment_instrument_id is not a valid integer | Importing contribution
ThreadText: # payment_instrument_id is not a valid integer | Importing contribution
  
  (Asked by: username_0 on 2018-07-03)
  
  just want to ask quick question.
  
  I'm trying to import contribution from my csv files.
  In my csv files, I put the value of column **Payment method** as : Others, Cheque, Credit Card. (All the value has been set on Option value)
  
  Then when I try to upload the csv files, I got the error reason :
  
  ```
  payment_instrument_id is not a valid integer
  
  ```
  
  The error is found at Import\_Errors.csv files.
  
  Do you have any clue about what's happening?
  
  **Tags:** civicontribute, contributions
  
  > **Comments:**
  > **username_1**: In import_errors.csv, is it showing errors for every line or just some?  Are some payment methods accepted?  What version are you using?  
  > **username_0**: it shows error for all line. Nothing payment method accepted. Fortunately It already solved. The issue is because i changed the value of each payment method option. Now after I revert back to integer, all is working. Thanks.  
  > **username_1**: Good to hear it is solved.  If you can write an answer with what you needed to do to make it work then that will help others who have the same problem.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-07-04. Score: 1 | Accepted answer
  
  Expanding a bit on Randy's answer:
  
  Payment Instruments have both a 'label' and a 'name'. The label is displayed via the GUI and is editable. When the payment instrument is created, the label and name have the same value, but when it is edited, only the label is changed, not the name. Confusingly, the name is used by the import.
  
  So, when you changed 'Check' to 'Cheque', that changed the label to 'Cheque' but the name remains as 'Check' which means in the import you need to use 'Check' (the name), not 'Cheque' (the label). Note that you do not need to revert the label change.
  
  You can get the name values by using API explorer:  
  entity=OptionValue, action=get  
  Option Group Id=payment\_instrument
  
  [![enter image description here](https://i.sstatic.net/57OlP.png)](https://i.sstatic.net/57OlP.png)
  
  
  ---
  
  ### Answer by username_0 on 2018-07-04. Score: 1
  
  If you guys found similar issue with me. Please check whether you've already made some changes to **Payment Method** option value which is by default you could access it by <http://yoursiteurl.com/civicrm/admin/options/payment_instrument?reset=1>
  
  Revert the changes you've made to default value, and try to re-upload/re-import the contribution. It solved my problem.
  
  
  ---
  
  