Importing Payments from CSV
Easy Digital Downloads has the ability to import payments in a CSV format.
Payment importing is done under Downloads → Tools → Import/Export. On this page you'll find a box labelled Import Payment History.
Your CSV should be comma separated, with fields enclosed by double quotes. The order of the fields is not important, as you'll be mapping them in the next step.
Click Choose File and browse to your file. Then click Import CSV.
Once your file is uploaded you'll see a list of Payment fields that need content, and a dropdown for each one, where you can map where the data is. Each dropdown will be populated with content from your CSV, so you'll be able to map accurately.
Additionally, as you choose a column, a value from the column will appear on the right, taken from the first row of data, as in the example below.
Note: If no data appears in the right column it is NOT a problem. That merely indicates that the row being used for examples doesn't contain data for that column.
The more fields you have the more complete your site data will be, which can be helpful when working with financial statements or customer information. That said, the really vital fields are the customer email, all of the product fields, and the transaction fields.
Importing From Non-EDD Systems
Easy Digital Downloads is looking for this information in its import:
|Product Field||Expected Data Type|
|Currency Code||An ISO Standard three letter abbreviation like USD, EUR, GBP|
|Customer Email||Any standard email format is accepted, will be validated before input|
|Customer First Name||Any text string.|
|Customer Last Name||Any text string.|
|Customer ID||This is the unique numberical ID of the customer created by EDD. Must be an integer.|
|Discount Codes||Any acceptable discount code, mixed characters, typically something like BLACKFRIDAY2015|
|IP Address||Any valid IP address, a mix of numbers and dots.|
|Mode||This is indicates whether the transaction took place in Test mode or was an actual transaction. Accepts only the words "Live" or "Test"|
|Parent Payment ID||This is the EDD ID of the payment that was the originator of a subscription. This is only ever needed if using Recurring Payments and renewal payments are being imported.|
|Payment Method||Accepts the name of the way the payment was processed. Typically the name of a payment gateway like Stripe, PayPal, Test Payment, etc.|
|Payment Number||This is a unique, sequential, numerical ID. It has no specific reference to the payment, it simply marks sequence. Most often used in places where VAT is an issue.|
|Purchase Date|| Any standard date format
|Purchase Key||A 32 character alphanumeric key created by EDD. ex: 79e85c15567f7088e47984e112fb81eb If left blank then EDD will create on for each payment on import.|
|Purchased Product(s)||Plain text, multiple products separated by /. If importing an EDD export file, map to Products (Raw)|
|Status||Any valid payment status found in the EDD documentation.|
|Subtotal||Not found in EDD export files, the total purchase amount before taxes and discounts.|
|Tax||The fraction of the total that is tax only.|
|Total||Total purchase amount, including taxes and discounts.|
|Transaction ID||This is a unique string that comes from the payment gateway, something like ch_18Fv1M4NqFpaKRwYjA8wCv3r. Each gateway has its own standard format.|
|User ID||WordPress username, ID, or email|
|Address Line 1||Any text string.|
|Address Line 2||Any text string.|
|City||Any text string.|
|State / Province||Any text string.|
|Zip / Postal Code||Any text string.|
|Country||Any ISO formatted country code.|
As mentioned above, field order in the CSV file doesn't matter.
Full Mapped Layout
Below is an example of the mapping process immediately before submitting. Note that some are set to ignore and some don't show data on the right. This is expected for the file being imported here. Each import will be a little different, and that's ok.
After submitting you should see a confirmation message similar to this:
- If a payment's customer does not exist prior to importing, it will be automatically created upon import.
- While "Customers" will get created upon import, corresponding WordPress "Users" will not. If you are moving from 1 domain to another and want your customers to be able to log in and view their old payments on the new domain, you may be interested in using the [edd_register] shortcode to allow your customers to re-join your new site.
If you import the same CSV twice, it will create duplicate payments. It does not do any checking for duplicate payments at this time.
Product Creation during Payment Import:
Payment import should not be viewed as a Product creation tool. While the Payment Importer will generate Products for Payments if a purchased Product does not yet exist, Products created during Payment Import will have missing information (such as price, file URLs and more). Before importing Payments, use the Product Importer to make sure your imported products contain all information they are supposed to have.