Returns a list of your webhook endpoints.

Parameters

No parameters.

More parameters

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A associative array 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 throw an error.

GET /v1/webhook_endpoints
$stripe = new \Stripe\StripeClient('sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2');
$webhookEndpoints = $stripe->webhookEndpoints->all(['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"
}
]
}

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 throws an error, such as if the webhook endpoint has already been deleted.

DELETE /v1/webhook_endpoints/:id
$stripe = new \Stripe\StripeClient('sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2');
$deleted = $stripe->webhookEndpoints->delete('we_1Mr5jULkdIwHu7ix1ibLTM0x', []);
Response
{
"id": "we_1Mr5jULkdIwHu7ix1ibLTM0x",
"object": "webhook_endpoint",
"deleted": true
}