WP Payment Pal Documentation
← Back to site

Testing Webhooks

Webhooks are how PayPal notifies your site about payment events. This guide covers verifying webhook configuration and troubleshooting delivery issues.

Reading time: 4 minutes | Difficulty: Intermediate

Overview

Webhooks are how PayPal notifies your site about payment events. This guide covers verifying webhook configuration and troubleshooting delivery issues.

Prerequisites

  • PayPal account connected
  • Debug logging enabled (recommended)
  • Understanding of payment flow

What Are Webhooks?

Webhooks are automatic notifications from PayPal:

Customer pays → PayPal processes → PayPal sends webhook → Your site receives → Transaction recorded

Without working webhooks:

  • Transactions may not record
  • Subscriptions won’t update
  • Refunds won’t sync

How WP Payment Pal Uses Webhooks

Webhook events handled:

Event Purpose
PAYMENT.CAPTURE.COMPLETED Record successful payment
PAYMENT.CAPTURE.REFUNDED Update refund status
BILLING.SUBSCRIPTION.ACTIVATED Subscription started
BILLING.SUBSCRIPTION.CANCELLED Subscription ended
BILLING.SUBSCRIPTION.SUSPENDED Subscription paused
PAYMENT.SALE.COMPLETED Subscription payment

Checking Webhook Status

In Plugin Settings

  1. Go to WP Payment Pal > Settings
  2. Click PayPal tab
  3. Look for webhook status indicator
PayPal settings tab overview
Webhook status on PayPal settings

Expected Status

  • Connected: Webhooks configured
  • Webhook URL: Your site’s webhook endpoint

Webhook URL

Your webhook endpoint:

https://yoursite.com/wp-json/wppal/v1/webhooks/paypal

This URL must be:

  • Publicly accessible
  • Using HTTPS
  • Not blocked by firewall

Testing Webhook Delivery

Method 1: Make a Test Payment

  1. Enable debug logging
  2. Make a Sandbox payment
  3. Complete checkout
  4. Check logs for webhook receipt

Method 2: PayPal Dashboard

  1. Log in to PayPal Developer
  2. Go to My Apps & Credentials
  3. Select your app
  4. Click Webhooks
  5. Find Webhook Events
  6. View event history

Method 3: Simulate Webhook

PayPal offers webhook simulation:

  1. Go to PayPal Developer webhooks
  2. Use Simulate Webhook Event
  3. Select event type
  4. Send to your URL
  5. Check your logs

Verifying Webhook Receipt

In your debug logs, look for:

[timestamp] INFO: Webhook received - PAYMENT.CAPTURE.COMPLETED
[timestamp] INFO: Webhook verified successfully
[timestamp] INFO: Processing webhook event
[timestamp] INFO: Transaction created - ID: 123

Common Webhook Issues

Webhooks Not Receiving

Symptoms:

  • Payments complete in PayPal
  • No transaction in WordPress
  • No webhook log entries

Causes:

  1. Webhook URL not registered
  2. Site not publicly accessible
  3. Firewall blocking PayPal
  4. SSL certificate issues

Solutions:

  1. Reconnect PayPal account
  2. Verify site is publicly accessible
  3. Whitelist PayPal IPs
  4. Check SSL certificate validity

Webhook Verification Failing

Symptoms:

  • Webhook received
  • “Verification failed” in logs
  • Transaction not recorded

Causes:

  1. Credential mismatch
  2. Webhook registered to different credentials
  3. Man-in-the-middle issue

Solutions:

  1. Reconnect PayPal account
  2. Clear credentials and reconnect
  3. Check for proxy/CDN issues

Delayed Webhooks

Symptoms:

  • Transaction appears late
  • Events out of order

Causes:

  1. PayPal processing delay
  2. Your server slow to respond
  3. Network issues

Solutions:

  1. Usually resolves automatically
  2. Check server performance
  3. Monitor over time

PayPal Webhook Requirements

Your Server Must

  • Accept POST requests
  • Respond within 30 seconds
  • Return 200 status on success
  • Use valid SSL certificate
  • Be publicly accessible

PayPal IP Addresses

If using firewall, whitelist PayPal IPs:

  • Check PayPal documentation for current list
  • IPs may change; use hostname if possible

Re-registering Webhooks

If webhooks stop working:

  1. Disconnect PayPal account
  2. Wait a moment
  3. Reconnect PayPal account
  4. Test with a payment

This re-registers webhook URLs.

Webhook vs Redirect

Webhook Redirect
Server-to-server Browser-based
Reliable Can be interrupted
Background User sees it
Must work Backup only

Never rely solely on redirects for payment confirmation.

Debug Checklist

When webhooks aren’t working:

  • Site is publicly accessible (not localhost)
  • SSL certificate is valid
  • PayPal account is connected
  • Debug logging is enabled
  • No firewall blocking PayPal
  • Webhook URL is correct
  • Credentials match (Sandbox vs Live)

Testing in Sandbox

Always test webhooks in Sandbox first:

  1. Connect Sandbox account
  2. Make test payment
  3. Verify webhook received
  4. Check transaction created

Then repeat for Live when ready.

Webhook Retry

PayPal retries failed webhooks:

  • Initial delivery
  • Retry after 1 minute
  • Retry after 5 minutes
  • Continues with backoff

If your site was temporarily down, webhooks may arrive late.

Monitoring Webhooks

Regular Checks

  1. Make test payment weekly
  2. Verify transaction records
  3. Check debug logs for errors

Signs of Problems

  • Payments in PayPal but not WordPress
  • Subscription status not updating
  • Refund status not syncing

Best Practices

  1. Keep SSL valid – Renew before expiration
  2. Monitor regularly – Check webhook health
  3. Debug logs – Enable at least Error level
  4. Test both modes – Sandbox and Live
  5. Document issues – Track recurring problems

Troubleshooting Flow

1. Check PayPal shows payment complete
2. Check debug logs for webhook
3. If no webhook → check URL accessibility
4. If webhook received but failed → check verification
5. If verified but no transaction → check processing logs
6. Contact support with log details

What’s Next?