التوثيق

Update a webhook endpoint

Updates a webhook endpoint. You can update the URL, description, enabled events, status, or metadata.

PATCH
/webhook-endpoints/{id}

Updates a webhook endpoint. You can update the URL, description, enabled events, status, or metadata.

AuthorizationBearer <token>

API key for merchant integrations. Send as Authorization: Bearer <your key>.

In: header

Path Parameters

id*string

Webhook endpoint ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/webhook-endpoints/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "we_abc123def456",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks",
  "description": "Production webhook",
  "status": "enabled",
  "enabledEvents": [
    "charge.succeeded",
    "payment_intent.created"
  ],
  "livemode": false,
  "secret": "whsec_abc123def456ghi789",
  "metadata": {
    "environment": "production"
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}
Empty