Skip to content

Build invoice payment webhook replay tool #238

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

src/webhook.ts's triggerWebhook fires once; if a receiving endpoint was down, there's no built-in way to replay a specific historical webhook event. This issue adds a replay capability backed by a local event log.

Technical Context

Extend src/webhook.ts area with src/webhookReplay.ts. Persists fired webhook payloads (in-memory ring buffer by default, pluggable store) keyed by event ID, exposes a replay(eventId) to re-trigger.

Acceptance Criteria

  • Fired webhooks are recorded with a unique event ID and timestamp
  • replayWebhook(eventId) re-sends the exact original payload
  • Ring buffer has a configurable max size, evicting oldest entries
  • Tests: replay produces identical payload to original; eviction works at buffer capacity

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions