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
- Paste the Webhook ID from PayPal. Dispatch checks it as you type (a webhook ID has no spaces) and saves it as soon as you leave the field.
- Click Done, or press Enter in the field. Done is available once a valid Webhook ID is entered. If the ID can't be saved, the setup stays open and tells you why, so you can try again — unless you closed the dialog while it was saving, in which case the dialog closes and the unfinished source is removed.
If the Webhook ID changes
If you recreate the webhook in PayPal, or deliveries are rejected because the saved Webhook ID doesn't match, you don't need a new source:
- On the Sources page, open Edit Source on the PayPal source
- Paste the current Webhook ID from PayPal into PayPal webhook ID
- Click Save
Deliveries verify against the new ID from then on, and your webhook URL stays the same.
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 |
Removing a PayPal source
- In Dispatch, delete the source from the Sources page (see Deleting and Archiving)
- In the PayPal Developer Dashboard, delete or disable the webhook that points at the source's URL, so PayPal stops sending to it