csv2iif.pl is a program to convert PayPal CSV files to IIF files to import into Quickbooks. paypal2iif.pl is a program to download PayPal transactions and convert them to IIF files to import into Quickbooks. paypal2ofx1.pl is a program to download PayPal transactions and convert them to OFX v1.0.3 files to import into accounting software like GnuCash. paypal2qif.pl is a program to download PayPal transactions and convert them to QIF files. These can be imported into accounting software like GnuCash or Quickbooks. These are command line perl programs designed for advanced users. They are provided free of charge for anyone to use. If you like these programs you can donate to the author to support future development. Visit the website https://llg.cubic.org/csv2iif for more information. =============================================================================== Configuration for Quickbooks, used by paypal2iif.pl and csv2iif.pl =============================================================================== Before you can use the programs you need to configure it. Open the configuration.pm file in a text editor (see INSTALL.txt for details) and change the variables in the "configuration section". Make sure to only change the names inside the single quote characters. You will need to change the following variables: $paypal_account_name $checking_account_name $other_income Decide how you'd like the programs to react to an unknown item title if no renaming rule is found. If you'd like the program to exit so you can manually add a rule to the %ItemTitle2Income hash, set $handleUnknownItemTitle to DIE_ON_UNKNOWN_ITEM_TITLE. If you'd like to simply use the "other income" account, you've configured with the $other_income variable, then set $handleUnknownItemTitle to USE_OTHER_INCOME_ON_UNKNOWN_ITEM_TITLE. If you'd like to manually select from all configured Quickbooks accounts, then set $handleUnknownItemTitle to ASK_ON_UNKNOWN_ITEM_TITLE. The renaming rules are configured in the perl hash %ItemTitle2Income. Take a look at the examples. The string on the left side of => corresponds to a PayPal transaction title. The string on the right side of => is the corresponding Quickbooks account name. =============================================================================== Configuration for PayPal, used by paypal2iif.pl, paypal2ofx1.pl, paypal2qif.pl =============================================================================== You should set your PayPal login name in the $paypal_login variable. This allows you to use multiple PayPal accounts from the same computer. If you want to use the paypal2iff.pl program to download transactions directly from PayPal, you need to configure the variables in the "PayPal API" section of the configuration.pm file. You need to create a PayPal API signature and configure the $paypal_username, $paypal_password, $paypal_signature variables accordingly. If you use a real PayPal account, set $paypal_sandbox to 0. If you are testing the paypal2iff.pl program with the PayPal sandbox, set $paypal_sandbox to 1. =============================================================================== csv2iif.pl =============================================================================== You need to download transactions from PayPal in CSV format. On the PayPal website go to: My Account -> History -> Download History Select the Date Range of transactions you'd like to convert and the File Type: Comma Delimited - Balance Affecting Payments Save the CSV file into the directory where the csv2iif.pl program was installed. You can leave the default filename of Download.csv, but you can also choose a different file name. Now run the csv2iif.pl program, preferably from the command line, so you can see it's output. If you have configured csv2iif.pl correctly it will produce an IIF file, otherwise read the programs output/error messages and correct any configuration problem. If you use csv2iif.pl for the first time, you will likely need to add account mappings from the PayPal transaction titles to Quickbooks account names. See the Configuration section for details. To import the generated IIF file into Quickbooks, select the following menu option: File -> Utilities -> Import -> IIF Files... Then browse to the directory with your IIF file and Open it. You can study the example file, example.csv, how the PayPal CSV should look like. The example contains a transfer from the PayPal account to a linked back account, 3 transactions for "Snowball 2013" and 3 transactions for "Membership 2013". They will use the renaming rules configured in csv2iif.pl. Convert this CSV into an IIF with the following command: On Windows: > csv2iif.pl example.iif On OsX, Linux, *BSD: $ ./csv2iif.pl example.iif Use Details of csv2iif.pl -------------------------- The csv2iif.pl program supports a number of command line arguments to alter it's behavior. This section explains the different operating modes supported by csv2iif.pl: The program expects a PayPal downloaded history file in CSV format with the Balance Affecting Payments. It will identify the PayPal transactions and convert them into an IIF format, suitable for import into Quickbooks. The program will attempt to convert PayPal transactions only once, so they won't be imported into Quickbooks multiple times. This will make the conversion process easier, since the user does not have to ensure that PayPal transactions are only appearing once in the CSV file in subsequent conversions. If you need to convert a PayPal transaction more than once, you can use the --force command line argument to ignore the check for previously converted transactions. Using the --force argument will convert all transactions in the CSV input file. You can permanently delete the transaction state of the csv2iif.pl program with the --delstate command line argument. However now the program will consider any transaction as new and convert it to the IIF format, so pay attention to only include the required PayPal transactions in the CSV input file if you have deleted the transaction state. See the Command Line Details section for information how to delete the transaction state. The program will attempt to convert the file names Download.csv in the current directory by default, unless you specify a different CSV file name on the command line. The IIF file created will have the same file name, only with the .iif extension. Command Line Details of csv2iif.pl ----------------------------------- The following command line help text can also be printed by running "csv2iif.pl -h". usage: csv2iif.pl Convert transactions from Download.csv into Download.iif Transactions which have been converted previously are skipped. usage: csv2iif.pl --force Convert transactions from Download.csv into Download.iif All transactions will be converted including those from a previous conversion. usage: csv2iif.pl file.csv Convert transactions from file.csv into file.iif Transactions which have been converted previously are skipped. usage: csv2iif.pl --force file.csv Convert transactions from file.csv into file.iif All transactions will be converted including those from a previous conversion. usage: csv2iif.pl --delstate Delete the transaction state from previous file conversions. The csv2iif.pl program may convert transactions a second time, which may lead to transactions occuring multiple times in Quickbooks. usage: csv2iif.pl --paypaldb_dump Dump all transactions from PayPal database. usage: csv2iif.pl --txn Show transaction . =============================================================================== paypal2iif.pl =============================================================================== The paypal2iif.pl program downloads PayPal transactions directly from PayPal (via their API) and creates IIF files which you can import into Quickbooks. See the Configuration section for details how to configure paypal2iif.pl before you use it. paypal2iif.pl will attempt to convert every transaction only once. If you use the program for the first time, it will download all transactions starting 10 days in the past. Use the --start command line argument to set a different start day. Subsequent invocations of the paypal2iif.pl program will resume transaction download from the day/time when the program was last run. You can run paypal2iif.pl as many times as you like in a single day or only once a month or any other schedule. You can manually set the start and end day using the --start and --end command line arguments. Note that paypal2iif.pl will not output a transaction twice in the IIF file, even if it was downloaded from PayPal multiple times. If you need to reset the state of converted transactions use the --delstate command line argument. By default paypal2iif.pl will create an IIF output file containing the time stamps of the start and end day/time. You can manually set an output file name with the --out command line argument. Command Line Details of paypal2iif.pl -------------------------------------- The following text can be printed with the --help command line argument: usage: paypal2iif.pl Fetch transactions from PayPal and convert to PayPal_2013-01-27T083825_2013-12-22T123942.iif usage: paypal2iif.pl -o out.iif Fetch transactions from PayPal and convert to out.iif usage: paypal2iif.pl --start 'YYYY-MM-DD' Fetch transactions from PayPal starting at midnight from the day specified. Midnight is interpreted in your local time zone. Remember that PayPal uses UTC, so the timestamps displayed may have an offset. usage: paypal2iif.pl --end 'YYYY-MM-DD' Fetch transactions from PayPal until 23:59:59 at the day specified. Midnight is interpreted in your local time zone. Remember that PayPal uses UTC, so the timestamps displayed may have an offset. usage: paypal2iif.pl --delstate Delete the transaction state from previous file conversions. The paypal2iif.pl program may convert transactions a second time, which may lead to transactions occuring multiple times in Quickbooks. usage: paypal2iif.pl --paypaldb_dump Dump all transactions from PayPal database. usage: paypal2iif.pl --txn Show transaction . =============================================================================== paypal2ofx1.pl =============================================================================== The paypal2ofx1.pl program download PayPal transactions directly from PayPal (via their API) and creates OFX v1.0.3 files. Many accounting programs can import OFX files to add or reconcile banking transactions. If you use the program for the first time, it will download all transactions starting 10 days in the past. Use the --start command line argument to set a different start day. Subsequent invocations of the paypal2ofx1.pl program will resume transaction download from the day/time when the program was last run. You can run paypal2ofx1.pl as many times as you like in a single day or only once a month or any other schedule. You can manually set the start and end day using the --start and --end command line arguments. By default paypal2ofx1.pl will create a file name PayPal.ofx You can manually set an different output file name with the --out command line argument. Configuration of paypal2ofx1.pl -------------------------------- You need to configure the PayPal section in configuration.pm Command Line of paypal2ofx1.pl ------------------------------- usage: paypal2ofx1.pl Fetch transactions from PayPal and convert to PayPal.ofx usage: paypal2ofx1.pl -o out.ofx Fetch transactions from PayPal and convert to out.ofx usage: paypal2ofx1.pl --start 'YYYY-MM-DD' Fetch transactions from PayPal starting at midnight from the day specified. Midnight is interpreted in your local time zone. Remember that PayPal uses UTC, so the timestamps displayed may have an offset. usage: paypal2ofx1.pl --end 'YYYY-MM-DD' Fetch transactions from PayPal until 23:59:59 at the day specified. Midnight is interpreted in your local time zone. Remember that PayPal uses UTC, so the timestamps displayed may have an offset. usage: paypal2ofx1.pl --lastsync Show timestamp of last sync with PayPal. usage: paypal2ofx1.pl --delstate Delete the transaction state from previous file conversions. The paypal2ofx1.pl program may convert transactions a second time, which may lead to transactions occuring multiple times in the output file. usage: paypal2ofx1.pl --paypaldb_dump Dump all transactions from PayPal database. usage: paypal2ofx1.pl --txn Show transaction . =============================================================================== paypal2qif.pl =============================================================================== The paypal2qif.pl program downloads PayPal transactions directly from PayPal (via their API) and creates QIF files which you can import into accounting software. It has been tested with GnuCash. See the Configuration section for details how to configure paypal2qif.pl before you use it. paypal2qif.pl will attempt to convert every transaction only once. If you use the program for the first time, it will download all transactions starting 10 days in the past. Use the --start command line argument to set a different start day. Subsequent invocations of the paypal2qif.pl program will resume transaction download from the day/time when the program was last run. You can run paypal2qif.pl as many times as you like in a single day or only once a month or any other schedule. You can manually set the start and end day using the --start and --end command line arguments. Note that paypal2qif.pl will not output a transaction twice in the QIF file, even if it was downloaded from PayPal multiple times. If you need to reset the state of converted transactions use the --delstate command line argument. By default paypal2qif.pl will create an QIF output file containing the time stamps of the start and end day/time. You can manually set an output file name with the --out command line argument. Configuration of paypal2qif.pl ------------------------------- Edit the configuration.pm file with a text editor. You need to configure the variables in the sections: - configuration required by all programs - PayPal configuration - QIF configuration You may have to create any accounts that you wish to use in your accounting program before importing any QIF file. However your accounting software may also be able to create accounts on demand when importing. If you use GnuCash you should create all "Bank" type accounts prior to importing the QIF file, because GnuCash may incorrectly create an account as an "Income" type. Command Line Details of paypal2qif.pl -------------------------------------- usage: paypal2qif.pl Fetch transactions from PayPal and save to default filename usage: paypal2qif.pl -o out.qif Fetch transactions from PayPal and convert to out.qif usage: paypal2qif.pl --start 'YYYY-MM-DD' Fetch transactions from PayPal starting at midnight from the day specified. Midnight is interpreted in your local time zone. Remember that PayPal uses UTC, so the timestamps displayed may have an offset. usage: paypal2qif.pl --end 'YYYY-MM-DD' Fetch transactions from PayPal until 23:59:59 at the day specified. Midnight is interpreted in your local time zone. Remember that PayPal uses UTC, so the timestamps displayed may have an offset. usage: paypal2qif.pl --lastsync Show timestamp of last sync with PayPal. usage: paypal2qif.pl --delstate Delete the transaction state from previous file conversions. The paypal2qif.pl program may convert transactions a second time, which may lead to transactions occuring multiple times in the output file. usage: paypal2qif.pl --paypaldb_dump Dump all transactions from PayPal database. usage: paypal2qif.pl --txn Show transaction . =============================================================================== Contact =============================================================================== For more information visit the program website https://llg.cubic.org/csv2iif You can contact the author by writing an email to: Dirk Jagdmann