Additional menu

Get MemberPress today! Start getting paid for the content you create! Get MemberPress Now
  1. Home
  2. Knowledge Base
  3. FAQs
  4. How To
  5. How to bulk import coupons with a CSV and MemberPress importer.

How to bulk import coupons with a CSV and MemberPress importer.

MemberPress, at least at the moment, doesn't have an option to generate a large number of coupons. That, however, doesn't mean that you can't create them, though it will require a bit of tinkering.

What you'd need is a way to generate a large number of coupon codes, and possibly, have some control over the generation process and have a way to export them when done. The
Random Code Generator website fits all the requirements perfectly if you need up to 1000 coupons in one batch. If you need more than that, you'll have to register as a paying customer, which, considering what kind of control the website offers, is quite fair.

So, once you generate the coupons, export them as CSV file. You'll need it. You don't want your coupons to be a bunch of random characters, do you? 🙂

According to our
Migrating or Importing MemberPress Data tutorial, the only required columns are:

  • type — The discount type of the coupon. Can either be ‘dollar' or ‘percent'.
  • discount — The discount that will be charged to start the trial. Can be any number in a decimal format without a currency symbol or percent symbol — for example 5.99 …
  • product_id_0 — An ID of a Membership that this transaction is for. Must be the ID of an already existing Membership in the database. To add more memberships to the same coupon, you need to add a separate column for each membership and increase the number in column name, so the second membership column will be product_id_1, the third membership column product_id_2, and so on. 
So, let's say that you have 250 members and you want to import a CSV file with 250 unique coupons and give them 10 per cent discount for the membership ID 75 (you can see the ID in
MemberPress -> Memberships section, ID column).
What you need to do is to use a spreadsheet program like Google Sheets, Excel or anything similar. Open a new file. Create “type”, “discount” and “product_id_0” columns as the mandatory ones and add “code” for the coupon code and “usage_amount” for the number of times a coupon can be used.
You'd start with something like this:

Then click on “percent” column and move your cursor until it turns into a crosshair by positioning it at the blue square in the bottom right corner (applies to Google Sheets, other spreadsheet programs have similar options):

Then simply pull it all the way down to match the number of coupons and you'll have this:

Repeat for the other columns and once you do that, you'll have a file that you can save as CSV and then import to MemberPress by going to Import section and selecting Coupons from the drop-down list:

And that's it. You've just successfully created 250 unique coupons that you can distribute to your members. You can download the
short sample file from here.

If you need any other kind of coupon, just change the parameters and use the same procedure.

Was this article helpful?

Related Articles

computer girl

Get MemberPress today!

Start getting paid for the content you create.