Skip to main content

PayPal Payment Integration

Enable PayPal payment support with automated membership and credit updates through secure webhooks.

1. Webhook Setup and Supported Events

To connect your site with PayPal for handling payments and subscriptions, you must configure a Webhook in your PayPal Developer Dashboard.

How to Add the Webhook

  1. Go to the PayPal Developer Dashboard
  2. Navigate to My Apps & Credentials
  3. Select the App you're using
  4. Scroll to Webhooks and click Add Webhook
  5. Enter the following Webhook URL:
https://YOURPAGEURL/wp-json/paypal/webhook

Replace YOURPAGEURL with your actual domain (e.g., https://example.com).

  1. Select the following Webhook Events:

Required for both Membership & Credit Systems:

  • PAYMENT.CAPTURE.COMPLETED

This event is essential. It triggers:

  • Membership time extension (if membership is enabled)
  • Credit balance update (if membership is disabled)

Required for If Membership enabled:

  • BILLING.SUBSCRIPTION.CREATED – Logs the subscription, plan ID, and amount
  • BILLING.SUBSCRIPTION.ACTIVATED – Starts membership based on the next billing date
  • BILLING.SUBSCRIPTION.CANCELLED – Removes premium access and clears expiration
  • BILLING.SUBSCRIPTION.SUSPENDED – Same as cancellation for suspended subs
  • BILLING.SUBSCRIPTION.EXPIRED – Handles expired memberships
  • BILLING.SUBSCRIPTION.UPDATED – Updates plan ID and expiration when changed

Summary

Event NamePurposeNeeded For
PAYMENT.CAPTURE.COMPLETEDMembership OR Credits✅ Required
BILLING.SUBSCRIPTION.CREATEDSave subscription dataOnly Membership
BILLING.SUBSCRIPTION.ACTIVATEDStart membership timerOnly Membership
BILLING.SUBSCRIPTION.CANCELLEDRemove premium accessOnly Membership
BILLING.SUBSCRIPTION.SUSPENDEDRemove premium accessOnly Membership
BILLING.SUBSCRIPTION.EXPIREDRemove premium accessOnly Membership
BILLING.SUBSCRIPTION.UPDATEDUpdate expiration dateOnly Membership

Make sure you enable the correct event types depending on whether you use the credit system, membership system, or both.


Tip

Always test using a PayPal Sandbox account before going live.