# payment_instrument_id is not a valid integer | Importing contribution

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?

• In import_errors.csv, is it showing errors for every line or just some? Are some payment methods accepted? What version are you using? – Aidan Jul 3 '18 at 8:30
• 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. – Randy Harkediansa Jul 3 '18 at 9:23
• 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. – Aidan Jul 3 '18 at 13:03

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

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.