Memberful

Integration Memberships Subscription Memberful

Memberful integration

Memberful is a membership platform for selling subscriptions and sharing content on your own website. The Post Affiliate Pro plugin connects it to your affiliate program, so every membership an affiliate refers is tracked, every renewal can earn a recurring commission, and a refund in Memberful reverses the commission.

The plugin uses three sources of information from Memberful:

  • The page after checkout: passes the first purchase to the plugin.
  • The Memberful API: the plugin uses it to load the details of that first order, such as the member, the plan and the total.
  • Webhooks: Memberful notifies the plugin about renewals (subscription.renewed) and refunds (order.refunded).

How to integrate PostAffiliatePro with Memberful

Get your Memberful details

You need three things from Memberful:

  • Account URL: the address of your Memberful account, for example https://YOUR-ACCOUNT.memberful.com/ . The plugin only accepts an address that contains .memberful.com.
  • Custom app API key: the API key of a custom application in your Memberful account. The plugin uses it to read order details.
  • Webhook secret key: Memberful gives you this key after you create a webhook endpoint (see below).

Plugin activation

In your merchant panel navigate to Configuration > Plugins > Memberful IPN handling > Activate. Then fill in the configuration:

  • Memberful account URL, Custom App API key and Webhook secret key: the three values from above.
  • Track by: choose whether the Memberful Plan ID (default) or the Plan name is used as the product ID of the sale.

All other options are described in the plugin settings section below.

Create the webhook in Memberful

In your Memberful dashboard go to Settings > Webhooks and create a new webhook endpoint with this address:

https://URL_TO_PostAffiliatePro/plugins/Memberful/memberful.php

Select these events:

  • subscription.renewed: a subscription was renewed (recurring payment).
  • order.refunded: an order was refunded.

After you create the endpoint, Memberful shows its secret key. Copy it into the Webhook secret key field of the plugin and save the plugin configuration.

Track the first purchase

The first purchase is not sent by a webhook. Instead, send the member to a page on your own website after checkout and let a short script on that page pass the purchase to the plugin.

  1. In Memberful, set the After checkout redirect to your thank-you page. You can do this for the whole site under Website > Domain and redirects > Custom redirects, or for a single plan in the settings of the plan (Revenue > Plans). A plan setting overrides the global one.
  2. Memberful adds the order details, including the order ID, to the address of that page.
  3. Add this script to the thank-you page. It reads the order ID from the address and the Post Affiliate Pro visitor ID from the PAPVisitorId cookie, and sends both to the plugin:
<script>
(function () {
  var params = new URLSearchParams(window.location.search);
  var orderId = params.get('order_id');
  var cookie = document.cookie.match(/(?:^|; )PAPVisitorId=([^;]*)/);
  if (!orderId || !cookie) { return; }
  var request = new Image();
  request.src = 'https://URL_TO_PostAffiliatePro/plugins/Memberful/memberful.php'
    + '?transactionId=' + encodeURIComponent(orderId)
    + '&visitorId=' + encodeURIComponent(cookie[1]);
})();
</script>

The plugin then loads the order from Memberful using your API key and registers the sale for the affiliate recognized by the visitor ID. The total is taken from the order, the plan ID or name becomes the product ID, and the Memberful member ID is saved in the extra data 1 field of the sale.

Do not forget to integrate your site with the click tracking code , otherwise the visitor ID does not exist and no affiliate can be assigned.

Plugin settings

The plugin has the following options:

  • Memberful account URL: the address of your Memberful account, which has to contain .memberful.com. A trailing slash is added automatically.
  • Custom App API key: the API key used to load order details from Memberful.
  • Webhook secret key: the key used to verify that webhooks really come from Memberful. Required for renewals and refunds.
  • Track by: Plan ID (default) or Plan name is used as the product ID.
  • Save only matched recurring commission: disabled by default. When enabled, a recurring payment is saved only when its subscription ID matches an order ID in the recurring commissions. If it does not match, no recurring commission is created.
  • Use recurring total cost from notification: disabled by default. When enabled, the recurring commission uses the total from the webhook instead of the total of the initial payment.
  • Process Memberful refunds: enabled by default. Refunds in Memberful are reflected in Post Affiliate Pro.

How does the plugin work exactly?

The plugin handles three situations:

  1. A new membership is purchased. The thank-you page sends the order ID and visitor ID to the plugin. The plugin loads the order from the Memberful API and registers the commission for the affiliate.
  2. A subscription is renewed. Memberful sends a subscription.renewed webhook. The plugin checks the signature and registers a recurring payment. When the recurring commissions feature is active, the subscription ID is used as the order ID, so all payments of one subscription belong together.
  3. An order is refunded. Memberful sends an order.refunded webhook. If refunds are enabled, the plugin finds the original transaction by its order ID and refunds it. If it cannot find the transaction, it logs the problem and does nothing.

Webhooks with any other event name are ignored.

What is Memberful?

Memberful is a membership platform for creators, independent publishers and communities. It lets you sell memberships and subscriptions on your own website and domain, with your own branding, and connect your own Stripe account for payments. Memberful is part of Patreon, which acquired it in 2018, and it continues to run as its own product.

For affiliate programs, memberships are a natural fit. A member who stays for a year pays many times, so a recurring commission rewards the affiliate for the long-term value of each referral instead of only the first payment.

Key features of Memberful

  • Flexible subscriptions: monthly, annual and custom subscriptions, one-time payments, group subscriptions and member-chosen pricing.
  • Checkout: one-click checkout, free and paid trials, and coupons and discounts.
  • Your own branding: checkout and member accounts on your own domain.
  • Content delivery: newsletters, podcasts, digital downloads and community content for members.
  • Integrations and tools: native connections with WordPress, Discord, Mailchimp and Kit, a WordPress plugin, a website builder and an API.
  • Member management: subscription and refund handling, unlimited staff accounts and built-in analytics.

Memberful pricing options

At the time of writing, Memberful lists a Standard plan at $49 per month plus a 4.9% transaction fee, with unlimited members. You can try it for free and you are charged only when you go live and start accepting payments. For larger businesses there is an Enterprise plan with custom, volume-based pricing. Prices change, so check the current numbers on the Memberful pricing page .

Alternatives to Memberful

If Memberful does not fit your needs, these membership platforms also have a Post Affiliate Pro integration:

Other membership integrations

Post Affiliate Pro integrates with many other membership and subscription platforms. See the overview of membership integrations , or browse all integrations .

Frequently asked questions

Reward Affiliates for Every Memberful Member

Track new memberships, renewals and refunds from Memberful and pay your affiliates accurately. Try the Memberful integration with Post Affiliate Pro.

You will be in Good Hands!

Join our community of happy clients and provide excellent customer support with Post Affiliate Pro.

Capterra
G2 Crowd
GetApp
Post Affiliate Pro Dashboard - Campaign Manager Interface