You are browsing myClubhouse Knowledge Base

How to Set Up and Integrate with PayPal (take payments)

This article describes how to set up myClubhouse to accept payments from PayPal.  Note that this applies to versions of myClubhouse from 5.3.x onwards and describes the process for integrating with PayPal Express Checkout.  The article assumes that you already have a PayPal merchant account set up. 

Step-by-step guide

  1. In a new browser window or tab, go to your myClubhouse site and login as somebody with administrative access.
  2. Add a new PayPal payment method: 
    1. In the main menu, select Admin > Finance > Manage Payment Methods. 
      Click the green "Add Method ..." button (or Edit your existing PayPal method). You will see the following popup: 
    2. Set "Payment type" to be "PayPal". 
    3. Enter any email address as both the Merchant Email and Primary Email (we will come back to this later).
    4. Enter anything in the Secret, Client ID and Webhook ID fields for now (we come back to these later).
    5. Check the box "Sandbox Account"
    6. Click OK. 
  3. Set up a PayPal Sandbox application: 
    1. In a new browser window or tab, navigate to the PayPal Developer home page: https://developer.paypal.com.  
    2. Click the "Log into Dashboard" button in the top-right. 
    3. Log in with your PayPal merchant account.
    4. You should find yourself on the "My Apps & Credentials" page. 
    5. On the left-hand panel click "Accounts" under the Sandbox section.
      1. PayPal will have set up a default Business Sandbox account (test merchant account) and a default Personal Sandbox account (test customer account).
      2. You may wish to set up some other sandbox accounts for testing, you can do so here.
    6. In the left-hand panel, click on "My Apps & Credentials" under the Dashboard section. Make sure the switch is set to "Sandbox" and not "Live".
    7. Scroll down the page until you find the "REST API apps" section. Click "Create App".
    8. Set the "App Name" to "myClubhouse". 
    9. Select the appropriate "Sandbox developer account" from the drop-down (this will be one of the business accounts from step 3e above).
    10. Click "Create App". You will now be taken to a page containing the details of the created app. You should see:
      1. Sandbox account
      2. Client ID
      3. Secret
    11. Scroll down to Sandbox Webhooks
      1. Click "Add Webhook"
      2. Switch back to your myClubhouse site browser tab and copy the Webhook URL from your new PayPal payment method, it will be something like: https://<<yourdomain.com>>/Finance/PayPal/Notify?paymentMethodID=##, there is a copy button to help you do this.
      3. Switch back to PayPal and paste the Webhook Url into the form.
      4. Under Event types check "All events".
      5. Scroll down to the bottom of the Sandbox Webhooks section and click "Save".
    12. Scroll back to the top of the page and note the "Sandbox account" email address
    13. Note the "Client ID". 
    14. Under "Secret" click "Show".  Note the "Secret" value displayed in the table. 
    15. Under Sandbox Webhooks, note the "Webhook ID".
  4. Switch back to your myClubhouse site browser tab
    1. Click Edit against the PayPal payment method you created in Step 2 above.
    2. Enter the "Sandbox account" email address you noted in Step 3.l. above as both the Merchant Email and Primary Email. 
    3. Copy the secret you noted in step 3.n. above, into the "Secret" field. 
    4. Copy the Client ID you noted in step 3.m. above, into the "Client ID" field. 
    5. Copy the Webhook ID you noted in step 3.o. above, into the Webhook ID field.
    6. Click OK.
    7. In the table of Payment Methods, click the "Check Webhook" button against the PayPal payment method. You should see a message "Webhook defined OK".
  5. Add your PayPal sandbox Payment Method to some Payment Schemes to test. Note: No real money will change hands when the PayPal sandbox account is used.
  6. Once you are happy that PayPal is working correctly, switch to a live account:
    1. Switch back to your PayPal developer account tab.
    2. Under My Apps & Credentials switch from "Sandbox" to "Live".
    3. Under "REST API apps" section, click "Create App".
    4. Set the "App Name" to "myClubhouse" and click "Create App".
    5. Note the "PayPal account" this should be your real PayPal merchant account email address.
    6. Note the Client ID.
    7. Note the Secret.
    8. In the Live Webhooks section click "Add Webhook".
    9. Use the same Webhook Url that you used for the sandbox. This can be found in your table of Payment Methods in myClubhouse.
    10. Under Event Types check All Events.
    11. Scroll to the bottom of the webhooks section and click "Save".
    12. Note the Webhook ID.
    13. Switch back to myClubhouse.
    14. Edit your PayPal payment method
      1. Change the settings to the live settings noted in step 6.e, 6.f, 6.g, and 6.l.
      2. Uncheck "Sandbox Account".
      3. Click OK.
      4. Click the question mark button to test the webhook settings. You should see a green message "Webhook defined ok".
    15. Add your live PayPal account to your Payment Schemes.
    16. You are now ready to start receving live payments via PayPal!

Whether you are using an existing PayPal account or have created a new one following this guide, duplicate invoice IDs can very occasionally crop up and cause issues. To alleviate this follow these steps:

  1. Log in to paypal.com.

  2. Hover over your name in the top right.

  3. Click on "Account Settings".

  4. Click on "Payment Preferences" on the left.

  5. Click on "Update" next to "Block Payments".

  6. Select "No, allow multiple payments per invoice ID" under the "Block accidental payments" section.