PayPal Integration
Connect your PayPal subscription billing to Windback via the custom webhook endpoint to detect cancellations, failed payments, and successful recoveries.PayPal does not have a native Windback integration. This guide uses a lightweight Node.js relay function that receives PayPal webhooks, maps the payload, and forwards it to Windback’s custom webhook endpoint.
Webhook URL
Your Windback custom webhook URL is:pub_ and is found in Settings > API Keys.
Setup
1
Deploy the Relay Function
Deploy the Node.js relay function below to your server or a serverless platform (Vercel, AWS Lambda, etc.). This function receives PayPal webhooks, verifies the signature, maps the payload, and forwards it to Windback.
2
Add the Webhook in PayPal
- Go to PayPal Developer Dashboard > My Apps & Credentials
- Select your application
- Scroll to Webhooks and click Add Webhook
- Paste the URL of your deployed relay function
- Select the events listed below
- Click Save
3
Select Webhook Events
Enable the following events in PayPal:
PayPal uses uppercase event names with dot notation. Make sure you select the exact events above.
4
Note Your Webhook ID
After creating the webhook, PayPal assigns a Webhook ID. Copy this value — you will need it for signature verification in your relay function.
5
Verify the Connection
- Use PayPal’s Webhook Simulator in the Developer Dashboard to send a test event
- Check your relay function logs to confirm it forwarded the event
- Check your Windback dashboard for the new churn event
Data Mapping
The relay function maps PayPal webhook fields to Windback’s custom webhook format:Relay Function
Signature Verification
To verify signatures, you need:- Your Webhook ID (from the PayPal Developer Dashboard)
- The request headers:
paypal-transmission-id,paypal-transmission-time,paypal-transmission-sig,paypal-cert-url - The raw request body
Webhook Resilience
Windback’s custom webhook endpoint always returns HTTP 200 regardless of internal processing status. Your relay function should also always return 200 to PayPal to prevent webhook retries.