Skip to content

feat: add paypal-webhooks skill#50

Merged
leggetter merged 3 commits into
mainfrom
feat/paypal-webhooks
May 11, 2026
Merged

feat: add paypal-webhooks skill#50
leggetter merged 3 commits into
mainfrom
feat/paypal-webhooks

Conversation

@leggetter
Copy link
Copy Markdown
Collaborator

Summary

Adds a complete paypal-webhooks provider skill. PayPal uses certificate-based RSA-SHA256 webhook signing (not HMAC) — this skill implements the offline self-verify path and documents the postback API as an alternative.

What's included

  • skills/paypal-webhooks/SKILL.md — entry point
  • skills/paypal-webhooks/references/ — overview, setup, verification (both paths)
  • skills/paypal-webhooks/examples/ — Express, Next.js App Router, FastAPI handlers (47 passing tests across the three)
  • Tests generate test RSA key pairs and preload the cert cache for hermetic verification

Notes

  • Algorithm: RSA-SHA256 with PayPal's public certificate (not HMAC)
  • Headers: paypal-transmission-id, paypal-transmission-time, paypal-transmission-sig, paypal-cert-url, paypal-auth-algo (SHA256withRSA)
  • Self-verify path (offline, recommended in skill):
    1. Fetch and cache the cert from paypal-cert-url (must resolve to a paypal.com domain)
    2. Compute CRC32(raw_body)
    3. Construct expected message: transmissionId|transmissionTime|webhookId|crc32(body)
    4. Verify signature against the cert's public key with RSA-SHA256
  • Postback path (documented as alternative): POST captured headers + webhook_id + raw body to PayPal's /v1/notifications/verify-webhook-signature (requires OAuth access token)
  • Common events: PAYMENT.CAPTURE.COMPLETED, PAYMENT.SALE.COMPLETED, PAYMENT.CAPTURE.REFUNDED, BILLING.SUBSCRIPTION.CREATED, CHECKOUT.ORDER.APPROVED

Test plan

  • cd skills/paypal-webhooks/examples/express && npm test
  • cd skills/paypal-webhooks/examples/nextjs && npm test
  • cd skills/paypal-webhooks/examples/fastapi && pytest test_webhook.py -v
  • Verify against a real PayPal-signed sandbox webhook
  • Confirm event names match https://developer.paypal.com/api/rest/webhooks/event-names/

Generation details

https://claude.ai/code/session_01NNTgQRJss1V7gyzzJ9rjnB


Generated by Claude Code

claude and others added 3 commits May 11, 2026 23:25
PayPal uses certificate-based RSA-SHA256 webhook signing rather than HMAC.
This skill implements the offline self-verify path (fetch + cache the cert
from paypal-cert-url, verify transmissionId|transmissionTime|webhookId|crc32(body)
against the cert's public key) and documents the postback verify-webhook-signature
API as an alternative.

Includes Express, Next.js App Router, and FastAPI examples with end-to-end
tests that generate test RSA key pairs and preload the cert cache (47 tests
total, all passing).

https://claude.ai/code/session_01NNTgQRJss1V7gyzzJ9rjnB
Adds the PayPal row to the Provider Skills table in README.md and a
providers.yaml entry (docs URLs, notes, testScenario) so the
"Validate New Provider" CI workflow finds the integration files. The
integrations were previously only on the prep branch (PR #40); moving them
onto each feat PR makes the 12 generated PRs independently mergeable in
any order.

https://claude.ai/code/session_01NNTgQRJss1V7gyzzJ9rjnB
…ce arg

Applies the new project convention from PR #40: use
`npx hookdeck-cli listen <port> <source> --path /webhooks/<source>`
everywhere instead of `hookdeck listen <port> --path /webhooks/<source>`.
Skips the global-install prereq (webhook-skills is provider-neutral) and
passes the required `[source]` positional so the command is copy-paste-
runnable without falling into an interactive prompt.

https://claude.ai/code/session_01NNTgQRJss1V7gyzzJ9rjnB
@leggetter leggetter marked this pull request as ready for review May 11, 2026 22:25
@leggetter leggetter force-pushed the feat/paypal-webhooks branch from 6ac9e1b to 459b2cf Compare May 11, 2026 22:25
@leggetter leggetter merged commit f398d7e into main May 11, 2026
6 checks passed
@leggetter leggetter deleted the feat/paypal-webhooks branch May 11, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants