Skip to content

feat(webhooks): add webhook endpoints CRUD for SDK#38

Merged
oomokaro1 merged 3 commits into
mainfrom
feat/webhook-endpoints-crud
Jul 8, 2026
Merged

feat(webhooks): add webhook endpoints CRUD for SDK#38
oomokaro1 merged 3 commits into
mainfrom
feat/webhook-endpoints-crud

Conversation

@oomokaro1

Copy link
Copy Markdown
Contributor

Summary

  • Add CRUD endpoints for webhook endpoints management via SDK
  • SDK's createWebhook(), listWebhooks(), deleteWebhook() now have matching backend routes

Changes

New endpoints (API key auth)

  • POST /v1/webhooks — create a webhook endpoint with URL and event types
  • GET /v1/webhooks — list all webhook endpoints for the merchant
  • DELETE /v1/webhooks/:id — delete a webhook endpoint

Service layer

  • WebhookService.createEndpoint() — creates endpoint with whsec_ prefixed secret
  • WebhookService.listEndpoints() — returns all endpoints for a merchant
  • WebhookService.deleteEndpoint() — deletes endpoint scoped to merchant

Auth

  • SDK-facing CRUD routes use ApiKeyGuard (Bearer token)
  • Existing dashboard routes (deliveries, dead-letter) remain JWT-guarded

Dependencies

Test plan

  • All 28 unit test suites pass (265 tests)
  • Lint clean
  • Format check clean

oomokaro1 added 3 commits July 8, 2026 20:34
- Add GET /v1/checkout/sessions/:id/payment endpoint (API key auth)
- Add webhook_endpoints and payment_links tables to Drizzle schema
- Remove @nestjs/typeorm and typeorm dependencies
- Replace TypeOrmHealthIndicator with Drizzle raw SQL health check
- Update smoke test and webhook controller test for new architecture
- Add POST /v1/webhooks — create webhook endpoint (API key auth)
- Add GET /v1/webhooks — list webhook endpoints (API key auth)
- Add DELETE /v1/webhooks/:id — delete webhook endpoint (API key auth)
- Add createEndpoint, listEndpoints, deleteEndpoint to WebhookService
- Existing JWT-guarded dashboard routes (deliveries, dead-letter) unchanged
@oomokaro1 oomokaro1 merged commit bceb7e1 into main Jul 8, 2026
1 check passed
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