PayPal
Receive PayPal webhook notifications for payments, subscriptions, disputes, and invoices.
How It Works
PayPal uses its own signature verification scheme. Dispatch verifies each incoming request using PayPal's transmission headers and your registered Webhook ID, ensuring only genuine PayPal events are processed.
Setup
1. Create a Source in Dispatch
- Go to Sources in your project
- Click Add Source and select PayPal
- Click Generate webhook URL to create the endpoint
- Copy the generated webhook URL
2. Register in PayPal Developer Dashboard
- Open the PayPal Developer Dashboard
- Navigate to Apps & Credentials and select your app
- Under Webhooks, click Add Webhook
- Paste the Dispatch webhook URL
- Select the event types you want to receive
- Save the webhook — PayPal will display a Webhook ID
- Copy the Webhook ID
3. Complete Setup in Dispatch
- Return to the Dispatch source setup
- Enter the Webhook ID from PayPal
- Click Done
Signature Verification
PayPal signs each request with the following headers:
| Header | Description |
|---|---|
PAYPAL-TRANSMISSION-ID | Unique transmission identifier |
PAYPAL-TRANSMISSION-TIME | Timestamp of the transmission |
PAYPAL-TRANSMISSION-SIG | HMAC-SHA256 signature |
PAYPAL-CERT-URL | URL to the PayPal certificate used for signing |
PAYPAL-AUTH-ALGO | Algorithm used (e.g., SHA256withRSA) |
Dispatch verifies the signature using your Webhook ID and PayPal's certificate before accepting the event.
Supported Event Types
| Event Type | Description |
|---|---|
PAYMENT.CAPTURE.COMPLETED | Payment capture succeeded |
PAYMENT.CAPTURE.DENIED | Payment capture was denied |
PAYMENT.CAPTURE.REFUNDED | Payment capture was refunded |
PAYMENT.SALE.COMPLETED | Sale transaction completed |
PAYMENT.SALE.REFUNDED | Sale transaction was refunded |
INVOICING.INVOICE.PAID | Invoice was paid |
INVOICING.INVOICE.CANCELLED | Invoice was cancelled |
BILLING.SUBSCRIPTION.CREATED | Subscription created |
BILLING.SUBSCRIPTION.ACTIVATED | Subscription activated |
BILLING.SUBSCRIPTION.CANCELLED | Subscription cancelled |
BILLING.SUBSCRIPTION.SUSPENDED | Subscription suspended |
BILLING.SUBSCRIPTION.PAYMENT.FAILED | Subscription payment failed |
CUSTOMER.DISPUTE.CREATED | Dispute opened by customer |
CUSTOMER.DISPUTE.RESOLVED | Dispute resolved |
RISK.DISPUTE.CREATED | Dispute created by risk team |
Disconnecting
To remove the PayPal integration from a source:
- Delete or disable the webhook in the PayPal Developer Dashboard
- Delete the source in Dispatch, or click Disconnect on the source