How to Debug PayPal Webhooks

PayPal webhooks notify your application about payment events, subscription changes, disputes, and payouts. They are essential for building robust e-commerce integrations and payment reconciliation systems.

What are PayPal Webhooks?

PayPal webhooks are HTTP POST requests that PayPal sends to your server when specific events occur in your account. Rather than continuously polling the PayPal API for updates, webhooks deliver real-time notifications the moment something happens — a payment completes, a user signs up, a deployment finishes, or any other tracked event.

Debugging these webhooks can be challenging because they originate from PayPal's servers, not your browser. You can't simply open DevTools to inspect them. That's where WebhookVault comes in — capture every PayPal webhook, inspect the full payload and headers, and replay them to your local development server.

Common PayPal Webhook Events

EventDescription
PAYMENT.CAPTURE.COMPLETEDFired when a payment capture is successfully completed
CHECKOUT.ORDER.APPROVEDFired when a buyer approves a checkout order
BILLING.SUBSCRIPTION.CANCELLEDFired when a subscription is canceled by the buyer or merchant
CUSTOMER.DISPUTE.CREATEDFired when a buyer files a dispute against a transaction

Setting Up PayPal Webhooks with WebhookVault

Follow these steps to start capturing and debugging PayPal webhooks using WebhookVault.

1Create a WebhookVault endpoint

Sign up for a free WebhookVault API key and create an endpoint to capture PayPal webhooks.

curl -X POST https://webhookvault.anethoth.com/api/v1/endpoints \
  -H "Authorization: Bearer wv_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "PayPal Webhooks"}'

# Response:
# {"url": "https://webhookvault.anethoth.com/hook/abc123", "inspect_url": "https://webhookvault.anethoth.com/inspect/abc123"}

2Configure PayPal to send webhooks

Go to the PayPal Developer Dashboard > My Apps & Credentials Select your app and scroll to the Webhooks section Click 'Add Webhook' and enter your WebhookVault endpoint URL Select the event types you want to subscribe to

3Inspect captured requests

Once PayPal sends a webhook, you can inspect every detail through the WebhookVault API or web inspector.

curl https://webhookvault.anethoth.com/api/v1/endpoints/abc123/requests \
  -H "Authorization: Bearer wv_your_key"

# Returns all captured PayPal webhook requests with full headers, body, and metadata

4Replay to your local server

Replay any captured PayPal webhook to your local development server for testing.

curl -X POST https://webhookvault.anethoth.com/api/v1/endpoints/abc123/requests/1/replay \
  -H "Authorization: Bearer wv_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "http://localhost:3000/webhook"}'

# The original PayPal webhook is replayed to your local server

Sample PayPal Webhook Payload

Here is an example of a typical PayPal webhook payload. Use WebhookVault to capture real payloads from your PayPal account for accurate testing.

{
  "id": "WH-7YX49823S2290830K-0JE13296W68552352",
  "event_type": "PAYMENT.CAPTURE.COMPLETED",
  "resource_type": "capture",
  "resource": {
    "id": "5O190127TN364715T",
    "status": "COMPLETED",
    "amount": {
      "currency_code": "USD",
      "value": "100.00"
    }
  },
  "create_time": "2024-01-15T10:30:00.000Z",
  "event_version": "1.0"
}

Common PayPal Webhook Issues

Here are the most common issues developers encounter when working with PayPal webhooks, and how to resolve them.

Webhook signature verification

PayPal uses a complex verification process involving the transmission ID, timestamp, and CRC32 of the webhook ID. Use PayPal's SDK for verification.

Sandbox vs. Production webhooks

Sandbox and production use separate webhook URLs and credentials. Ensure you're testing against the correct environment.

Event type naming conventions

PayPal event types use SCREAMING_SNAKE_CASE (e.g., PAYMENT.CAPTURE.COMPLETED). Double-check the exact event type string.

Webhook delivery delays

PayPal may delay webhook delivery by several minutes. Don't rely on webhooks for time-critical operations.

Frequently Asked Questions

What are PayPal webhooks?

PayPal webhooks are HTTP callbacks that PayPal sends to your server when specific events occur. Instead of polling the PayPal API for changes, webhooks push real-time notifications to your application, making your integration more efficient and responsive.

How do I test PayPal webhooks locally?

Use WebhookVault to capture PayPal webhooks in the cloud, then replay them to your localhost. Create a WebhookVault endpoint, configure PayPal to send webhooks to it, and use the replay API to forward captured requests to http://localhost:3000/webhook (or your local port).

How do I verify PayPal webhook signatures?

Most webhook providers, including PayPal, sign their webhook payloads to prove authenticity. Check the PayPal documentation for the specific signature header and verification algorithm. Use WebhookVault to capture and inspect the raw headers to debug signature verification issues.

Why is WebhookVault better than ngrok for PayPal webhook testing?

Unlike ngrok, WebhookVault captures and stores every webhook request with full headers and payloads. You can replay any PayPal webhook to your local server as many times as needed, inspect historical requests, and share webhook data with your team. No tunnel to maintain or port to expose.

Start debugging PayPal webhooks now

Create a free WebhookVault endpoint in seconds. Capture, inspect, and replay PayPal webhooks with zero configuration.

Get Free API Key