Webhook Guide

PayPal Webhook-Testguides

Payment event webhooks and simulator testing

Schnellpfad: CLI-Helper-Befehle

Use these first to avoid setup mistakes, then follow the full provider steps below.

instatunnel webhook init --provider paypal --port 3000 --path /webhooks/paypal
instatunnel webhook verify --provider paypal --secret-env PAYPAL_WEBHOOK_ID
instatunnel webhook test --provider paypal

If you run into provider-specific issues, use the full checklist sections below.

For cross-provider MCP + webhook diagnostics, open /docs/troubleshooting.

Replay + Signatur-Helper (Dashboard)

Open /dashboard or /dashboard/tunnels and use Webhook Command Center for this provider. It gives one-click replay and signature verification helpers.

instatunnel webhook verify --provider paypal --secret-env PAYPAL_WEBHOOK_ID
curl -i -X POST "https://YOUR-SUBDOMAIN.instatunnel.my/webhooks/paypal" -H "Content-Type: application/json" --data-binary @sample-paypal.json

Required signature header: paypal-transmission-sig (plus transmission metadata headers)

1. Lokales App-Setup

Create a local webhook endpoint at: /webhooks/paypal

import express from 'express'

const app = express()
app.use(express.json())

app.post('/webhooks/paypal', async (req, res) => {
  // 1) Capture PayPal transmission headers
  // 2) POST to /v1/notifications/verify-webhook-signature with your webhook_id
  // 3) Accept event only when verification_status === 'SUCCESS'
  console.log('paypal event:', req.body.event_type)
  res.status(200).send('ok')
})

app.listen(3000, () => console.log('listening on :3000'))

2. InstaTunnel-Befehl ausfuhren

instatunnel 3000 --subdomain paypal-dev

Keep a fixed subdomain so your provider dashboard URL does not keep changing.

3. Provider-Felder zum Einfugen

FieldValueWhere/notes
Webhook URL{{WEBHOOK_URL}}PayPal Developer Dashboard > Webhooks
EventsPAYMENT.CAPTURE.COMPLETED (example)Subscribe to only required event types
Webhook IDWH-...Store as PAYPAL_WEBHOOK_ID for signature verification calls
EnvironmentSandbox firstUse simulator in sandbox before production

Use the helper below to generate exact values with your chosen subdomain and path.

Webhook-Setup-Helper mit einem Klick

Erzeugt Tunnel-Befehl, Webhook-URL und Provider-Werte zum Kopieren.

InstaTunnel starten

instatunnel 3000 --subdomain paypal-dev

Webhook-URL

https://paypal-dev.instatunnel.my/webhooks/paypal
Provider-FeldWert zum EinfugenHinweise
Webhook URL
https://paypal-dev.instatunnel.my/webhooks/paypal
PayPal Developer Dashboard > Webhooks
Events
PAYMENT.CAPTURE.COMPLETED (example)
Subscribe to only required event types
Webhook ID
WH-...
Store as PAYPAL_WEBHOOK_ID for signature verification calls
Environment
Sandbox first
Use simulator in sandbox before production

Tipp: eine stabile Subdomain pro Provider nutzen, damit kein stndiges Umkonfigurieren notig ist.

4. Testevent senden

  1. Use PayPal Webhook Simulator in sandbox to send test events.
  2. Validate your endpoint returns 200 and event body is parsed.
  3. For simulator events, self-verify with your webhook ID. For real events, call verify-webhook-signature and require verification_status=SUCCESS.

5. Signatur prufen

Verify this header on every request: paypal-transmission-sig (plus transmission metadata headers)

// Send verification request to PayPal API
POST /v1/notifications/verify-webhook-signature
{
  transmission_id,
  transmission_time,
  cert_url,
  auth_algo,
  transmission_sig,
  webhook_id: process.env.PAYPAL_WEBHOOK_ID,
  webhook_event: req.body
}
// accept only when verification_status === "SUCCESS"

6. Retries und Idempotenz

  • Use PayPal event ID as idempotency key.
  • Respond quickly with 200 after enqueueing background processing.
  • Treat all webhook deliveries as at-least-once and replay-safe.

7. Haufige Fehler und schnelle Fixes

Verification status not SUCCESS

Check webhook ID/environment mismatch and transmission headers.

Simulator event not received

Confirm sandbox app uses current tunnel URL and active webhook subscription.

Simulator verification confusion

Simulator mock events cannot be verified via verify-webhook-signature endpoint; use real events for API verification tests.

Duplicate processing

Deduplicate by event ID before writing side effects.

PayPal Webhook-Testguides | InstaTunnel