Description
Developers and integrators who want to receive payment event notifications have no way to configure webhook endpoints through the UI, requiring manual API calls or direct database edits. A webhook configuration page with endpoint registration, secret rotation, and delivery log should be added to the settings section.
Technical Context
src/app/settings/webhooks/page.tsx (new) renders a list of registered webhook endpoints fetched from src/app/api/settings/webhooks/route.ts (new). src/components/settings/WebhookForm.tsx (new) uses react-hook-form with URL validation for the endpoint field and checkboxes for subscribed event types (invoice.created, invoice.funded, invoice.released). A "Rotate secret" action calls POST /api/settings/webhooks/[id]/rotate and displays the new secret in a one-time reveal modal.
Acceptance Criteria
Description
Developers and integrators who want to receive payment event notifications have no way to configure webhook endpoints through the UI, requiring manual API calls or direct database edits. A webhook configuration page with endpoint registration, secret rotation, and delivery log should be added to the settings section.
Technical Context
src/app/settings/webhooks/page.tsx(new) renders a list of registered webhook endpoints fetched fromsrc/app/api/settings/webhooks/route.ts(new).src/components/settings/WebhookForm.tsx(new) usesreact-hook-formwith URL validation for the endpoint field and checkboxes for subscribed event types (invoice.created, invoice.funded, invoice.released). A "Rotate secret" action callsPOST /api/settings/webhooks/[id]/rotateand displays the new secret in a one-time reveal modal.Acceptance Criteria