Migrating or Importing Automatically Recurring Subscriptions

Before reading this page, be sure to have reviewed our  Migrating Overview page first!

When to Import Recurring Subscriptions

Video Overview

Please note that the videos on this page show the old Stripe ID we would use for subscriptions (cus_xxxxxxxxxxx). The correct IDs you should be using now for all future imports are the subscription IDs (sub_xxxxxxxxxxx).

General Instructions

You should ONLY import recurring subscriptions for the following reasons:

  1. You are migrating automated recurring profiles (for PayPal, Authorize.Net ARB or Stripe) from another system 
  2. You need to manually import a subscription that was not added to MemberPress correctly because of a gateway failure.

This means that whatever recurring subscriptions you are importing MUST be real, active subscriptions currently found in your gateway processor (PayPal, Authorize.Net ARB or Stripe). Importing does NOT and CANNOT create any subscriptions or initiate any actual charges. Importing is used to simply add existing data. 

Important note: Before you import the files outlined, you will need to make sure that you have first created the memberships in MemberPress that these subscriptions are going to be associated with AND that the users they will be assigned to are found in your WordPress Dashboard > Users section. 

To import Recurring Subscriptions, you will need to import two separate CSV files in the following order:

  1. Subscriptions CSV File
  2. Transactions CSV File (if you don't need to import a large batch of transactions, please note that it may be easier and faster for you to just create manual transactions for the subscription(s) you import - you cannot manually create subscriptions.)

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. 

Back to the top

Subscriptions CSV File Format

Click here for a sample Subscriptions CSV file. With that as your basic template, please see below for the required and optional columns of your CSV file.

Video Instructions

Please note that the videos on this page show the old Stripe ID we would use for subscriptions (cus_xxxxxxxxxxx). The correct IDs you should be using now for all future imports are the subscription IDs (sub_xxxxxxxxxxx).

Required Columns:

  • username OR email -- You can enter 'username' OR 'email' for your column header (does NOT support both in one file). If you use 'username', use the username of the user that should be associated with the transaction. If you use 'email', enter the user's email. Your selection must belong to an already existing user in the database. (Note: since MemberPress Importer 1.6.8 version you can also use user_email instead of email name)
  • product_id -- The ID of the Membership that this subscription is for. Must be the ID of an already existing Membership in the database.
  • sub_num or subscr_id -- The subscription number that references the subscription. Note: for Stripe, we use the Subscription ID for the sub_num (sub_xxxxxxxxxx). For PayPal the Profile ID (I-xxxxxxxxxx).
  • amount or price -- Price of the Membership. It can be any number in a 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.
  • period -- Number of weeks, months or years. Can be any valid whole number if the period_type='months' or period_type='weeks' but anything else, this can only be 1.
  • period_type -- This is the period type. Can be 'weeks', 'months', 'years' or 'lifetime'.
  • payment_method or gateway -- The unique id of the payment method. This can be found in the payments tab of the MemberPress Settings page. This must reference the actual gateway where the customer's recurring profile exists. So if you're using PayPal Express Checkout, for example; be sure that the ID for that gateway is what gets set here.

Optional Columns:

  • id -- Updates the subscription information for the existing subscription matching the id. If left blank, this will create a new subscription. Be sure to use the id from the "Id" column on the MemberPress > Subscriptions page, as shown here. This field requires MemberPress Importer version 1.6.0 or newer.
  • trial -- Sets whether or not the Membership has a trial period. It can be 1 for true or 0 for false. Defaults to 0.
  • trial_days -- Number of days the trial will last. It can be any whole number. Defaults to 0.
  • trial_amount -- The amount that will be charged to start the trial. It can be any number in a decimal format without a currency symbol -- for example 5.99
  • limit_cycles -- Whether or not to limit the number of payment cycles. Should 1 for yes or 0 for no. Defaults to 0.
  • limit_cycles_num -- The number of regular payment cycles before the subscription should be cancelled. This does not include trial period payment. If limit_cycles is set to 0 or left empty, then this setting has no effect. Can be any number greater than or equal to 1. Defaults to 2.
  • limit_cycles_action -- What to do after the subscription is cancelled. It can be set to 'expire' or 'lifetime'. Defaults to 'expire'.
  • prorated_trial -- Whether the trial period was pro-rated as part of an upgrade or downgrade. Should 1 for yes or 0 for no. Defaults to 0.
  • status -- The status of the subscription. Can either be 'pending', 'active' or 'cancelled'. Defaults to 'active'.
  • started_at or created_at -- The date that the subscription started at. Must be in the format "YYYY-MM-DD hh:mm:ss". Defaults to the current time. IMPORTANT NOTE: For monthly subscriptions, it's important that this gets set to the same day of the month as the billing is currently happening. So if the subscription is billed on the 12th of each month, make sure this is the 12th of a month also. Otherwise, your transaction's expiration dates will be incorrect on renewals after importing.
  • 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.
  • 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'.
  • cc_last4 -- The last 4 digits of the Credit Card used to purchase the Subscription. Not supported with all gateways.
  • cc_exp_month -- The month (1-12) the Credit Card used to purchase this Subscription expires. Not supported with all gateways.
  • cc_exp_year -- The year (20xx) the Credit Card used to purchase this Subscription expires. Not supported with all gateways.

Please note that you can not use the same CSV file to import both subscriptions and transactions at the same time. Those have to be imported separately.

Back to the top

Transactions CSV Format

Video Instructions

Please note that the videos on this page show the old Stripe ID we would use for subscriptions (cus_xxxxxxxxxxx). The correct IDs you should be using now for all future imports are the subscription IDs (sub_xxxxxxxxxxx).

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. 

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.

Required Columns:

  • 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. (Note: since MemberPress Importer 1.6.8 version you can also use user_email instead of email name)
  • 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. It can be any number in a 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 or subscr_id -- this column is not required but it is necessary in order to reference a transaction to the subscription imported in the Subscriptions CSV import. Please see below.
  • Optional Columns:

  • id -- Updates the transaction information for the existing transaction matching the id. If left blank, this will create a new transaction. Be sure to use the id from the "Id" column on the MemberPress > Transactions page, as shown here. This field requires MemberPress Importer version 1.6.0 or newer.
  • sub_num or subscr_id -- The subscription number that references the subscription. This sub_num must reference an already existing subscription in the database. Defaults to blank.
  • payment_method or gateway_id -- The unique id of the payment method. This can be found in the payments tab of the MemberPress Settings page. Defaults to 'manual'. If you're importing Free members, you can also set this to 'free'.
  • coupon_code or coupon -- 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. It 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. It can either be 1 for true or 0 for false. Defaults to 0.
  • trans_num -- The gateway's transaction number. It 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 the 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 Membership's regular expiration rules if left blank. For lifetime access, use 0000-00-00 00:00:00 as the expires_at date. 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:

  1. Go to the MemberPress Plugin > Import. Once there, select either Subscriptions or Transactions from the type of file to the import drop-down menu.
  2. Next, use the "Choose File" button to upload your file (you can only import one file at a time). 
  3. Finally, click the upload button.

Importer Messages

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 place of X) were successfully imported.

X  Rows Failed to be Imported - Here, the importer will tell you how many rows (in place of X) failed to import.

X Total Rows Processed - Here, the importer will tell you how many total rows (in 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 a note of them to fix the rows with the errors. 

Back to the top

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.