store.store_webhooks immediately, with no soft-delete flag. Historical webhook_deliveries records are retained for audit (the storeWebhookId foreign key is set to null).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Webhook UUID |
Example Request
Success Response (200)
Returns the webhook entity as it existed immediately before deletion (so the caller can confirm what was removed). Same shape asadd-webhook.
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Webhook UUID |
storeId | string | Owning store UUID |
channel | string | Webhook channel |
url | string | Target webhook URL |
events | string[] | Subscribed event types |
testMode | boolean | true for test transactions, false for production |
secret | string | null | Channel-specific credential, null if unset |
createdAt | string | Creation timestamp (ISO 8601) |
updatedAt | string | Last update timestamp (ISO 8601) |
Errors
Retry policy: Never retry 4xx — fix the request and resubmit. Retry 5xx with exponential backoff (start 5s, max 3 attempts).
| Status | errors[0].message | What it means | Recommended handling |
|---|---|---|---|
| 400 | Missing required field: id | id was not provided | Fix the request body, resubmit |
| 400 | id must be a valid UUID | id is not a valid UUID | Fix the id, resubmit |
| 403 | Not authorized to manage webhooks for this store | The caller’s merchant role on the owning store is not owner or admin | Switch to an API Key whose merchant has the required role |
| 404 | Webhook not found | No webhook matches the supplied id (or already removed) | The webhook is already gone — treat as success and reconcile local state |
| 500 | Internal server error | Unexpected server-side failure | Retry with exponential backoff (start 5s, max 3 attempts) |