Skip to main content

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​

  1. Go to Sources in your project
  2. Click Add Source and select PayPal
  3. Click Generate webhook URL to create the endpoint
  4. Copy the generated webhook URL

2. Register in PayPal Developer Dashboard​

  1. Open the PayPal Developer Dashboard
  2. Navigate to Apps & Credentials and select your app
  3. Under Webhooks, click Add Webhook
  4. Paste the Dispatch webhook URL
  5. Select the event types you want to receive
  6. Save the webhook — PayPal will display a Webhook ID
  7. Copy the Webhook ID

3. Complete Setup in Dispatch​

  1. Return to the Dispatch source setup
  2. 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.
  3. 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:

  1. On the Sources page, open Edit Source on the PayPal source
  2. Paste the current Webhook ID from PayPal into PayPal webhook ID
  3. 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:

HeaderDescription
PAYPAL-TRANSMISSION-IDUnique transmission identifier
PAYPAL-TRANSMISSION-TIMETimestamp of the transmission
PAYPAL-TRANSMISSION-SIGHMAC-SHA256 signature
PAYPAL-CERT-URLURL to the PayPal certificate used for signing
PAYPAL-AUTH-ALGOAlgorithm used (e.g., SHA256withRSA)

Dispatch verifies the signature using your Webhook ID and PayPal's certificate before accepting the event.

Supported Event Types​

Event TypeDescription
PAYMENT.CAPTURE.COMPLETEDPayment capture succeeded
PAYMENT.CAPTURE.DENIEDPayment capture was denied
PAYMENT.CAPTURE.REFUNDEDPayment capture was refunded
PAYMENT.SALE.COMPLETEDSale transaction completed
PAYMENT.SALE.REFUNDEDSale transaction was refunded
INVOICING.INVOICE.PAIDInvoice was paid
INVOICING.INVOICE.CANCELLEDInvoice was cancelled
BILLING.SUBSCRIPTION.CREATEDSubscription created
BILLING.SUBSCRIPTION.ACTIVATEDSubscription activated
BILLING.SUBSCRIPTION.CANCELLEDSubscription cancelled
BILLING.SUBSCRIPTION.SUSPENDEDSubscription suspended
BILLING.SUBSCRIPTION.PAYMENT.FAILEDSubscription payment failed
CUSTOMER.DISPUTE.CREATEDDispute opened by customer
CUSTOMER.DISPUTE.RESOLVEDDispute resolved
RISK.DISPUTE.CREATEDDispute created by risk team

Removing a PayPal source​

  1. In Dispatch, delete the source from the Sources page (see Deleting and Archiving)
  2. In the PayPal Developer Dashboard, delete or disable the webhook that points at the source's URL, so PayPal stops sending to it