Automatically create accounts and grant access to your premium content in MemberPress!
MemberPress is a WordPress plugin that allows you to password-protect content. SamCart can connect with MemberPress, so that you can automatically add new customers to your site, and grant or revoke access to one or more of your MemberPress "memberships."
SamCart's App Marketplace allows you to create your own "If/Then" rules where certain Trigger Events in SamCart will fire actions inside of MemberPress.
So your rules could be something like this:
- If Product A is purchased in SamCart, grant access to Membership A in MemberPress.
- If Product B is refunded in SamCart, revoke access to Membership B in MemberPress.
- If a subscription is canceled for Product B, revoke access to Membership B in MemberPress.
Mix and match SamCart Trigger Events with MemberPress Actions to create your own custom events!
Let's start by connecting SamCart with your MemberPress plugin.
Connect SamCart and MemberPress
Within SamCart, click on the Apps tab in your lefthand marketplace navigation bar to access the App Marketplace:
Once you are in the App Marketplace, you can search for the specific app you want to connect with! Search for MemberPress and click the Install button:
This will bring up a small pop up like the one shown below and you will be asked to input a few different pieces of information to complete the connection:
1: Website URL
2: Username
3: Authentication Type (We recommend using the API Key as the preferred authentication type)
4: API Key / Application Type
NOTE: To connect with MemberPress, you must have access to MemberPress Developer Tools. Available in MemberPress Plus and Pro plans. To connect with the API key you will need to be on Memberpress version 1.1.20+.
Once you have entered all this information, click Connect. You will be redirected back to the App Marketplace within SamCart once MemberPress has successfully connected.
Note: The Website URL and the API Key will both be found inside your WordPress account. Read on to find out how to find those pieces of information within MemberPress!
Locating the Website URL and API Key
When you are ready to begin connecting MemberPress there are a couple of important pieces of information that you will need to pull from MemberPress itself, such as the Website URL and the API Key. We have included steps below to help you locate these pieces of information!
From inside your WordPress dashboard, find Memberpress in your sidebar and click on the Developer tab. Both the Website URL and API Key will be found in this tab.
To locate your unique API key that you will enter in SamCart you will want to go to the Rest API tab (1). Inside this tab, you will simply need to copy the unique key located in the API Key box (2) and paste this in your SamCart connection.
Next, to find the Website URL you will want to set the Select an API Route dropdown to Get Transaction.
From there you will want to copy the URL that is found in the Definition section. You will only need to copy the link from 'https://' to the 'v1' portion of the included URL. You can then paste this into the Website URL spot when creating the connection.
Alternatively, if you would like to use one of the Application Password as the Authentication Type, you can check out this quick walkthrough to see exactly where to find these additional pieces of information:
Be sure to save your generated password somewhere in case you ever need to reference it again.
Creating MemberPress Connection Rules
Now that your account is connected, you can create rules that automatically grant access or revoke access to your MemberPress memberships. To get started, from within the MemberPress connection in the App Marketplace click on the + Add New Rule button.
This will bring up a side window where you can create rules for this connection! Here you can select the action and trigger to tell this rule what to do.
First, you'll need to select what kind of rule you want to create, a Global Rule or a Product Specific Rule (1). Global Rules will apply to all products in your marketplace, while Product Specific Rules will only apply to the specific products you select
The next step is to choose the Action (2) for this connection. The action is what will occur within MemberPress when this rule fires! The actions available for this connection are Grant Membership or Revoke Membership.
Once you've chosen the Action, you will need to select the Membership (3) in MemberPress that you want customers to have granted or revoked for the customer as part of this rule. If you do not see the memberhsip you are looking for, click the Refresh Connection button in the top right corner of the window!
The last thing you need to choose is a Trigger (4) for the rule. This is the event that will occur within SamCart to trigger the Action within MemberPress! NOTE: Each application has different Triggers available. The following are available on MemberPress Connection:
- Product Purchased - fires when a product is purchased as a primary product, upsell, order bump, or payment option.
- Product Refunded - fires when a refund occurs inside of SamCart for the product.
- Product Partially Refunded - fires when a partial refund occurs inside of SamCart for the product.
- Subscription Canceled - fires when the Subscription Status turns to "Canceled” or "Delinquent."
- Subscription Charge Failed - fires when your customer experiences their first recurring payment failure.
- Subscription Charged - fires each time your customer completes a successful recurring charge.
- Subscription Delinquent - fires when the Subscription Status turns to "delinquent." Delinquency occurs after 4 failed payments in a row. See more information on the Subscription Saver and Dunning feature here.
- Subscription Recovered - fires when your customer is within the Dunning Cycle and has a successful charge.
- Subscription Restarted - fires when you manually restart a user's subscription from either the fully delinquent status or canceled status.
- Subscription Completed - (for Limited Subscriptions only) fires when a limited subscription has it's final successful charge.
The final step in creating this rule is clicking the Add Rule (5) button. And we're done! Now you can see your newly created rule in the MemberPress connection within the App Marketplace.
Creating Connection Rules at the Product Level
You can also create rules for a connection from directly within a product! If you are working within a product and wish to create a rule with the MemberPress connection for it, simply visit the product's Apps tab:From here, click on the blue + Add New Rule button to start creating a rule with MemberPress for this product.
First, you'll need to Select the App or App Instance (1) you are wanting to create a rule for - in this case, you should select your MemberPress connection! The next step is to select any other products you want to add the rule to in the Select Additional Products (2) section. This step is optional and can be left blank if you do not wish to add the rule to any other products.
From here, the rest of the rule setup is exactly the same as when you create a rule from within the App Marketplace! Select the Action (3) for this connection - the action is what will occur within MemberPress when this rule fires! The actions available for this connection are Grant Membership or Revoke Membership.
Once you've chosen the Action, you will need to select the Memberships (4) in MemberPress that you want subscribers to be added to or removed from as part of this rule. If you do not see the tag(s) you are looking for, click the Refresh Connection button in the top right corner of the window!
The last thing you need to choose is a Trigger (4) for the rule. This is the event that will occur within SamCart to trigger the Action within MemberPress! NOTE: Each application has different Triggers available. Check out the Creating Connection Rules section above for a full list of Triggers available with the MemberPress connection!
The final step in creating this rule is clicking the Add Rule (6) button. And we're done! Now you can see the rule you have created on the Apps tab of your product:
What Your Customers Experience
You can create as many rules as you would like. Mix and match different SamCart Trigger Events with MemberPress Actions to automate providing your customers with exactly what they have purchased!
When a new order is placed, refunded, or subscription canceled, SamCart will run through your connection Rules and automatically grant/revoke access to memberships based on the rule you created.
Username and Password
MemberPress sends an email to new members containing their username and password.
Existing members will simply have memberships granted and/or revoked from their existing accounts. No changes made to their username or password.
Frequently Asked Questions
Q: Do I need access to MemberPress's Developer Tools?
A: Yes, you must have MemberPress Developer Tools (available in their Plus or Pro plans) in order for SamCart to access your MemberPress installation's API.
Q: When creating a rule, I do not see my tag or list. What do I do?
A: This is due to connections only showing some of your tags to help it load faster! If you start typing in the name of the tag/list then it'll appear. If you are still not seeing your tags/lists, you might need to “Refresh” the connection.
Q: My connection seems to be functioning properly, but a customer wasn't added to the correct Campaign seemingly at random. What happened?
A: If a rule fails to fire, there's always a reason. Our system keeps a record of the last 1,000 events that took place in your Marketplace, and they can be viewed by heading to the MemberPress connection within the App Marketplace and scrolling down to the Logs section at the bottom of the page.
Here, you can search for the event in question and check if anything went wrong. 99% of the time the Logs can provide insight into exactly what might've went wrong with that action! The Configuration logs will show you logs related to the configuration of the App Instance (connecting the app, refreshing the app, etc.), and the Action logs will show logs related to actions associated with the rules you have set up for the MemberPress connection.
Q: How can I uninstall, update, or connect a new instance of my MemberPress connection?
A: Head to the Apps tab to access the App Marketplace and select the MemberPress connection. Click on the three dots to the right of the MemberPress connection - this will bring up a few options! The Connect New App Instance button will allow you to connect a new instance of MemberPress (this is great if you have more than one MemberPress account you want to connect to SamCart!). The Change App Credentials button will allow you to update the credentials you are using to connect this instance MemberPress within SamCart. The Uninstall App button will uninstall all instances of the MemberPress app from SamCart, and any rules for that instance of MemberPress will no longer work.