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
- Go to the PayPal Developer Dashboard
- Navigate to My Apps & Credentials
- Select the App you're using
- Scroll to Webhooks and click Add Webhook
- Enter the following Webhook URL:
https://YOURPAGEURL/wp-json/paypal/webhook
Replace
YOURPAGEURL
with your actual domain (e.g.,https://example.com
).
- 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 amountBILLING.SUBSCRIPTION.ACTIVATED
– Starts membership based on the next billing dateBILLING.SUBSCRIPTION.CANCELLED
– Removes premium access and clears expirationBILLING.SUBSCRIPTION.SUSPENDED
– Same as cancellation for suspended subsBILLING.SUBSCRIPTION.EXPIRED
– Handles expired membershipsBILLING.SUBSCRIPTION.UPDATED
– Updates plan ID and expiration when changed
Summary
Event Name | Purpose | Needed For |
---|---|---|
PAYMENT.CAPTURE.COMPLETED | Membership OR Credits | ✅ Required |
BILLING.SUBSCRIPTION.CREATED | Save subscription data | Only Membership |
BILLING.SUBSCRIPTION.ACTIVATED | Start membership timer | Only Membership |
BILLING.SUBSCRIPTION.CANCELLED | Remove premium access | Only Membership |
BILLING.SUBSCRIPTION.SUSPENDED | Remove premium access | Only Membership |
BILLING.SUBSCRIPTION.EXPIRED | Remove premium access | Only Membership |
BILLING.SUBSCRIPTION.UPDATED | Update expiration date | Only 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.