Retrieve a webhook endpoint

Retrieves the webhook endpoint with the given ID.

Parameters

No parameters.

Returns

Returns a webhook endpoint if a valid webhook endpoint ID was provided. Raises an error otherwise.

GET /v1/webhook_endpoints/:id
curl https://api.stripe.com/v1/webhook_endpoints/we_1Mr5jULkdIwHu7ix1ibLTM0x \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "we_1Mr5jULkdIwHu7ix1ibLTM0x",
"object": "webhook_endpoint",
"api_version": null,
"application": null,
"created": 1680122196,
"description": null,
"enabled_events": [
"charge.succeeded",
"charge.failed"
],
"livemode": false,
"metadata": {},
"status": "enabled",
"url": "https://example.com/my/webhook/endpoint"
}

List all webhook endpoints

Returns a list of your webhook endpoints.

Parameters

No parameters.

More parameters

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A dictionary with a data property that contains an array of up to limit webhook endpoints, starting after webhook endpoint starting_after. Each entry in the array is a separate webhook endpoint object. If no more webhook endpoints are available, the resulting array will be empty. This request should never raise an error.

GET /v1/webhook_endpoints
curl -G https://api.stripe.com/v1/webhook_endpoints \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d limit=3
Response
{
"object": "list",
"url": "/v1/webhook_endpoints",
"has_more": false,
"data": [
{
"id": "we_1Mr5jULkdIwHu7ix1ibLTM0x",
"object": "webhook_endpoint",
"api_version": null,
"application": null,
"created": 1680122196,
"description": null,
"enabled_events": [
"charge.succeeded",
"charge.failed"
],
"livemode": false,
"metadata": {},
"status": "enabled",
"url": "https://example.com/my/webhook/endpoint"
}
{...}
{...}
],
}

Delete a webhook endpoint

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

Parameters

No parameters.

Returns

An object with the deleted webhook endpoints’s ID. Otherwise, this call raises an error, such as if the webhook endpoint has already been deleted.

DELETE /v1/webhook_endpoints/:id
curl -X DELETE https://api.stripe.com/v1/webhook_endpoints/we_1Mr5jULkdIwHu7ix1ibLTM0x \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "we_1Mr5jULkdIwHu7ix1ibLTM0x",
"object": "webhook_endpoint",
"deleted": true
}
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$