Skip to content

Add webhook support for Paddle platform #22

@Prateek32177

Description

@Prateek32177

We want to add webhook support for Paddle in tern. Paddle sends events for payments, subscriptions, customers, and more.

Tasks

  • Webhook Handler:
    • Implement a handler in /src/platforms/paddlehq.ts.
    • Normalize payloads into tern’s event structure (id, type, timestamp, payload).
  • Platform Config:
    • Add platformConfigs.paddlehq with supported event types (e.g., payment.succeeded, subscription.created, customer.updated).
  • Test Cases:
    • Add fixtures for at least 3 event types (payment succeeded, subscription created, customer updated).
    • Write Jest tests in /tests/paddlehq.test.ts to validate parsing.
  • Docs:
    • Add setup instructions in /docs/platforms.md.
    • Example: how to configure a webhook in PaddleHQ dashboard.
  • Acceptance Criteria:
    • PaddleHQ handler implemented
    • Tests cover 3+ event types
    • Docs updated
  • Final Integration Testing:
    • Trigger a webhook event from the PaddleHQ dashboard (use the “Send Test Event” option if available).
    • Verify the signature using the platform’s signing secret/HMAC.
    • The event should pass verification if the signature is correct.
    • The event should fail verification if the signature is invalid.
    • Add a test case in Jest covering both valid and invalid signature scenarios.

Contributor directive:

  • Mention this issue and its number in your PR to get it linked with the issue.

Helpful Links: PaddleHQ Webhooks Docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions