Skip to content

fix: improve paddle-webhooks SDK verification#22

Merged
leggetter merged 8 commits intomainfrom
feat/paddle-webhooks
Feb 5, 2026
Merged

fix: improve paddle-webhooks SDK verification#22
leggetter merged 8 commits intomainfrom
feat/paddle-webhooks

Conversation

@leggetter
Copy link
Collaborator

Summary

Fixes Paddle SDK verification examples based on review of official SDK source code. This addresses feedback from the Paddle team about using their official SDK verification methods.

Changes

Based on review of paddle-node-sdk and paddle-python-sdk source code:

Node.js SDK

  • Before: paddle.notifications.unmarshal(body, signature, secret)
  • After: paddle.webhooks.unmarshal(body, secret, signature)

Key findings:

  • paddle.webhooks is for signature verification
  • paddle.notifications is for managing notification settings via API (different thing!)
  • Parameter order is (body, secretKey, signature) not (body, signature, secret)

Python SDK

  • Before: paddle.notifications.unmarshal(...) ❌ (method doesn't exist)
  • After: Verifier().verify(request, Secret(...))

Key findings:

  • Python SDK uses a Verifier class pattern, not unmarshal()
  • Verifier is designed for Flask/Django request objects
  • FastAPI requires manual verification (SDK doesn't natively support it)

Files Changed

  • examples/express/src/index.js - Fix SDK method and parameter order
  • examples/nextjs/app/webhooks/paddle/route.ts - Fix SDK method and parameter order
  • examples/fastapi/main.py - Update to use manual verification with SDK note
  • references/verification.md - Update SDK documentation with correct examples
  • TODO.md - Update to reflect resolved issues

Testing

All tests pass:

  • Express: 10 tests ✅
  • Next.js: 6 tests ✅
  • FastAPI: 12 tests ✅

Test Plan

  • Verify SDK verification works with real Paddle webhooks (sandbox)
  • Review documentation accuracy against official Paddle docs

Made with Cursor

leggetter and others added 2 commits February 4, 2026 13:59
…urce

Based on review of official Paddle SDK source code:
- Node.js: paddle.webhooks.unmarshal(body, secret, signature) not paddle.notifications.unmarshal()
- Python: Verifier().verify(request, Secret(...)) not paddle.notifications.unmarshal()

Changes:
- Express: Fix SDK method name and parameter order
- Next.js: Fix SDK method name and parameter order
- FastAPI: Update to use manual verification (SDK Verifier is Flask/Django specific)
- verification.md: Update SDK examples with correct method signatures

All tests pass (Express: 10, Next.js: 6, FastAPI: 12).

Co-authored-by: Cursor <cursoragent@cursor.com>
leggetter and others added 6 commits February 4, 2026 16:30
test-agent-scenario.sh now reads scenarios from providers.yaml instead
of hardcoding them. Update validation to check for testScenario in
providers.yaml instead of grepping test-agent-scenario.sh.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@leggetter leggetter marked this pull request as ready for review February 5, 2026 19:04
@leggetter leggetter merged commit b983d0c into main Feb 5, 2026
6 checks passed
@leggetter leggetter deleted the feat/paddle-webhooks branch February 5, 2026 19:06
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.

1 participant