Migrating or Importing One-time Payment Subscriptions (or Single Transactions)
Before reading this page, be sure to have reviewed our Migrating Overview page first!
Because of how MemberPress works, if you are importing one-time payment subscriptions, you will only need to import a Transactions CSV file. Do NOT import them in (or in addition to) a Subscription CSV file.
Important note: Before you import your file, you will need to make sure that you have first created the memberships in MemberPress that these one-time payments are going to be associated with AND that the users they will be assigned to are found in your WordPress Dashboard > Users section. Finally, importing does NOT and CANNOT create any one-time payments or initiate any actual charges. Importing is used to simply add existing data. This means that whatever one-time payments you are importing MUST be real payments currently found in your gateway processor (PayPal, Authorize.Net ARB or Stripe).
Transactions CSV Format
Please be extremely careful to follow the formatting listed below EXACTLY. Failing to do so EXACTLY will result in your file failing to import correctly. You should also note that if you don't add an expires_at column to your file, your users will have lifetime access from the imported transaction.
Click here for a sample Transactions CSV file. With that as your basic template, please see below for the required and optional columns of your CSV file.
- username or email-- The username or email address of the user that should be associated with the transaction. Must belong to an already existing user in the database.
- product_id -- The ID of the Membership that this transaction is for. Must be the ID of an already existing Membership in the database. The id can be found in the url when editing the Membership. For example the Membership id in this url: http://awesomesite.com/wp-admin/post.php?post=10&action=edit is 10.
- amount -- Price of the Membership. Can be any number in decimal format without a currency symbol -- for example: 5.99.
- total -- Price including tax (if any). total = (amount + tax_amount). If no tax, this should be set to the same value as the "amount" field.
- sub_num -- The subscription number that references the subscription. This sub_num must reference an already existing subscription in the database. Defaults to blank. (Note: you will not need to use this column header)
- payment_method -- The unique id of the payment method. This can be found in the payments tab of MemberPress options. Defaults to 'manual'. If you're importing Free members you can also set this to 'free'.
- coupon_code -- The coupon code of the coupon applied to this transaction. Must reference a coupon that already exists in the database. Defaults to blank.
- send_welcome -- Controls whether the user will receive a welcome email along with this newly created transaction. Can either be 1 for true or 0 for false. Defaults to 0.
- send_receipt -- Controls whether the user will receive a receipt email along with this newly created transaction. Can either be 1 for true or 0 for false. Defaults to 0.
- trans_num -- The gateway's transaction number. Can be any small string of text. If blank, a random id will be generated.
- tax_rate -- The tax rate in %. Example 5% should be entered as 5.000. Defaults to 0.
- tax_amount -- The amount of tax applied towards the total. tax_amount = (amount*(tax_rate/100)). Defaults to 0.
- tax_desc -- The description for the tax. Defaults to no description.
- tax_class -- Not used in MemberPress currently. Defaults to 'standard'.
- status -- The status of the transaction. Can either be 'pending', 'complete' or 'refunded'. Defaults to 'complete'.
- created_at -- The date this transaction was created. Must be in the format "YYYY-MM-DD hh:mm:ss". Defaults to current date.
- expires_at -- The expiration date of the transaction. When a transaction expires it must be renewed by the user for them to continue to have access. Must be in the format "YYYY-MM-DD hh:mm:ss". Defaults to the regular expiration time of the Membership. Use 0000-00-00 00:00:00 for lifetime access. IMPORTANT NOTE: If you don't want your user to have lifetime access based on this import, you have to add an expiration date via this column.
Uploading the Files
To upload the files that you have created, simply follow these steps:
- Go to the MemberPress Plugin > Import. Once there, select "Transactions" from the type of file to import drop down menu.
- Next, use the "Choose File" button to upload your file (you can only import one file at a time).
- Finally, click the upload button.
After you import your file, the importer will show you a couple of different lines and boxes to let you know how your import went. Below these are outlined.
X Rows Successfully Imported - Here, the importer will tell you how many rows (in the place of X) were successfully imported.
X Rows Failed to be Imported - Here, the importer will tell you how many rows (in the place of X) failed to import.
X Total Rows Processed - Here, the importer will tell you how many total rows (in the place of X) were processed.
Row Success Messages: - In this box you will see any success messages related to your most recent import.
Row Errors: - In this box you will see any errors related to any rows from your most recent import. The message should be detailed enough for you to be able to know what you need to fix so your file works properly upon import.
CSV for failed rows ... copy these, fix and reimport: - Here you will be given the exact rows that need to be fixed. Make note of them to fix the rows with the errors.