Paypal Subscriptions

To offer PayPal as a valid gateway for paid subscriptions, you’ll need to complete four steps, assuming you already have a valid PayPal Business account:

  1. Create the subscription type (in Members 360 WP)
  2. Create the product and pricing plan
  3. Get access to the API
  4. Configure the webhook

Each step is straightforward and will enable PayPal integration on your site. Let’s get started!


Create the subscription type

Navigate to “WordPress > Members 360 WP > Subscription Types” and click on the “Add New Subscription Type” button (or edit the existing subscription, if you just one to add PayPal as a payment option).

Enter the main details in the “Information” tab and save by clicking “Save.”

Then, go to the “PayPal” tab in this same section. Enter the payment title (which will appear on the payment button on your website) and the desired price.

Keep this browser tab open, as we’ll need to enter the credentials and keys provided by PayPal in the following steps.


Create the Product and Pricing plan

Log in to your PayPal Business account and go to “Pay & Get Paid > Subscriptions” from the main menu. Then click on “Subscription plans” (left sidebar) and finally “Create plan” (blue button on the right).

On the next screen, enter descriptive information about the subscription product, which will be displayed to your customers. Don’t worry about the “Product ID” — PayPal will generate one for you.

After creating the product, select it to proceed to the next page. Keep the default “Fixed pricing” option selected. Continue, and now it’s time to create the Pricing Plan. Enter a descriptive name and click “Next.”

Define the subscription price and billing cycle. Ensure that the values match the configuration previously set up in the plugin to keep the subscription process consistent. PayPal will charge the amount set in its dashboard; prices shown in the plugin are for information purposes only.

Review the summary and, if correct, confirm it by clicking “Turn Plan on.”

On the following screen, PayPal provides a widget creator, which isn’t needed by Members 360 WP. You can skip this by clicking “Do this later.”

You’ll be returned to the “Subscription plans” page, where you can find your new subscription product and its associated “Plan ID” code. Copy this text (or open the edit page to find the value if needed).

Paste the copied identifier into the “[Live] Plan ID” field in the PayPal subscription configuration tab in the plugin.


Get access to the API

Members 360 WP needs access to the PayPal API to initiate subscription payments and verify the status of active subscriptions.

To enable this, open the PayPal Developer Dashboard by clicking the “Developer” link in the header. Then, select “Apps & Credentials.”

Next, click on the “Create App” button and complete the following information in the app creation window:

Once the app is created, you will see two keys needed for the plugin: Client ID and Secret. Copy these values into the plugin’s subscription configuration as follows:

  • Paste the Client ID into the “[Live] Client ID” field.
  • Paste the Secret into the “[Live] Secret Key” field.

Finally, remember to save your changes.


Configure the Webhook

To have PayPal notify your website about subscription events (such as creation, payment, or cancellation), you need to configure a webhook.

  1. From the PayPal Developer Dashboard, go to “Apps & Credentials” and select the Members 360 WP application you created earlier.
  2. In your application’s panel, locate the “Webhooks” section (usually near the bottom) and click on “Add Webhook.”

Complete the following fields:

  • Webhook URL: Copy the Webhook URL provided in the subscription configuration settings in the plugin and paste it here.
  • Events to Listen to: Select events related to subscriptions and payments, including:
    • Billing subscription (all)
    • Checkout (all)
    • Payments and Payouts (all)

Save your changes. After PayPal creates the webhook, check again the webhooks table and locate the generated “Webhook ID“. Paste that value into the “[Live] Webhook ID” field in the subscription configuration settings on your website. Be sure to save your changes.

Congratulations! You did it.


Test mode

If you’d like to test the PayPal integration with the Members 360 WP plugin without processing real payments, you can enable the “Test Mode.”

To do this, go to the PayPal Developer Dashboard and switch to “Sandbox” mode. Once enabled, you’ll need to repeat some previous steps (obtaining API keys, configuring the webhook and creating the product), as Sandbox and Live data are kept separate.

Use the “[Test]” fields in the plugin configuration instead of the “[Live]” fields, making sure to match each value appropriately.

Important Note: As of October 2024, PayPal does not provide a Business Dashboard for Test Mode, so there’s no screen available for creating a subscription plan directly. However, this can still be set up through API calls. To simplify this process, the Members 360 WP plugin includes a dedicated button in the subscription configuration to create a test product and plan automatically. Be sure to first create a Test App in the PayPal Developer Dashboard to generate the sandbox Client ID and Secret — this is essential for the setup to work.

To activate test mode on the payment buttons on your site, locate the “members-360-wp-subscribe” shortcode and add the “test” attribute.

Example:

[members-360-wp-subscribe subscription="1" test]