Lists all event destinations.

Parameters

  • includearray of enums

    Additional fields to include in the response. Currently supports webhook_endpoint.url.

    Possible enum values
    webhook_endpoint.url

    Include parameter to expose webhook_endpoint.url.

  • limitinteger

    The page size.

  • pagestring

    The requested page.

Returns

Response attributes

  • dataarray of objects

    List of event destinations.

  • next_page_urlnullable string

    The next page url.

  • previous_page_urlnullable string

    The previous page url.

GET /v2/core/event_destinations
curl -G https://api.stripe.com/v2/core/event_destinations \
-H "Authorization: Bearer {{YOUR_API_KEY}}{{YOUR_API_KEY}}" \
-H "Stripe-Version: 2024-11-20.acacia" \
-d include="webhook_endpoint.url"
Response
{
"data": [
{
"id": "ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6",
"object": "v2.core.event_destination",
"created": "2024-10-22T16:20:09.931Z",
"description": "This is my event destination, I like it a lot",
"enabled_events": [
"v1.billing.meter.error_report_triggered"
],
"event_payload": "thin",
"events_from": [
"self"
],
"livemode": false,
"metadata": {},
"name": "My Event Destination",
"snapshot_api_version": null,
"status": "disabled",
"status_details": {
"disabled": {
"reason": "user"
}
},
"type": "webhook_endpoint",
"updated": "2024-10-22T16:22:02.524Z",
"webhook_endpoint": {
"signing_secret": null,
"url": null
}
}
],
"next_page_url": null,
"previous_page_url": null
}

Delete an event destination.

Parameters

  • idstringRequired

    Identifier for the event destination to delete.

Returns

Response attributes

  • idstring

    Identifier for the deleted event destination.

Error Codes
404not_found

The resource wasn’t found.

409idempotency_error

An idempotent retry occurred with different request parameters.

DELETE /v2/core/event_destinations/:id
curl -X DELETE https://api.stripe.com/v2/core/event_destinations/ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6 \
-H "Authorization: Bearer {{YOUR_API_KEY}}{{YOUR_API_KEY}}" \
-H "Stripe-Version: 2024-11-20.acacia"
Response
{
"id": "ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6"
}

Disable an event destination.

Parameters

  • idstringRequired

    Identifier for the event destination to disable.

Returns

Response attributes

  • idstring

    Unique identifier for the object.

  • objectstring, value is "v2.core.event_destination"

    String representing the object’s type. Objects of the same type share the same value of the object field.

  • amazon_eventbridgenullable object

    Amazon EventBridge configuration.

  • createdtimestamp

    Time at which the object was created.

  • descriptionstring

    An optional description of what the event destination is used for.

  • enabled_eventsarray of strings

    The list of events to enable for this endpoint.

  • event_payloadenum

    Payload type of events being subscribed to.

    Possible enum values
    snapshot

    Events from v1 APIs.

    thin

    Events from v2 APIs.

  • events_fromnullable array of enums

    Where events should be routed from.

    Possible enum values
    other_accounts

    Receive events from accounts connected to the account that owns the event destination.

    self

    Receive events from the account that owns the event destination.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • metadatanullable map

    Metadata.

  • namestring

    Event destination name.

  • snapshot_api_versionnullable string

    If using the snapshot event payload, the API version events are rendered as.

  • statusenum

    Status. It can be set to either enabled or disabled.

    Possible enum values
    disabled

    Event destination is disabled.

    enabled

    Event destination is enabled.

  • status_detailsnullable object

    Additional information about event destination status.

  • typeenum

    Event destination type.

    Possible enum values
    amazon_eventbridge

    Amazon EventBridge.

    webhook_endpoint

    Webhook endpoint.

  • updatedtimestamp

    Time at which the object was last updated.

  • webhook_endpointnullable object

    Webhook endpoint configuration.

Error Codes
404not_found

The resource wasn’t found.

409idempotency_error

An idempotent retry occurred with different request parameters.

POST /v2/core/event_destinations/:id/disable
curl -X POST https://api.stripe.com/v2/core/event_destinations/ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6/disable \
-H "Authorization: Bearer {{YOUR_API_KEY}}{{YOUR_API_KEY}}" \
-H "Stripe-Version: 2024-11-20.acacia"
Response
{
"id": "ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6",
"object": "v2.core.event_destination",
"created": "2024-10-22T16:20:09.931Z",
"description": "This is my event destination, I like it a lot",
"enabled_events": [
"v1.billing.meter.error_report_triggered"
],
"event_payload": "thin",
"events_from": [
"self"
],
"livemode": false,
"metadata": {},
"name": "My Event Destination",
"snapshot_api_version": null,
"status": "disabled",
"status_details": {
"disabled": {
"reason": "user"
}
},
"type": "webhook_endpoint",
"updated": "2024-10-22T16:21:38.634Z",
"webhook_endpoint": {
"signing_secret": null,
"url": null
}
}

Enable an event destination.

Parameters

  • idstringRequired

    Identifier for the event destination to enable.

Returns

Response attributes

  • idstring

    Unique identifier for the object.

  • objectstring, value is "v2.core.event_destination"

    String representing the object’s type. Objects of the same type share the same value of the object field.

  • amazon_eventbridgenullable object

    Amazon EventBridge configuration.

  • createdtimestamp

    Time at which the object was created.

  • descriptionstring

    An optional description of what the event destination is used for.

  • enabled_eventsarray of strings

    The list of events to enable for this endpoint.

  • event_payloadenum

    Payload type of events being subscribed to.

    Possible enum values
    snapshot

    Events from v1 APIs.

    thin

    Events from v2 APIs.

  • events_fromnullable array of enums

    Where events should be routed from.

    Possible enum values
    other_accounts

    Receive events from accounts connected to the account that owns the event destination.

    self

    Receive events from the account that owns the event destination.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • metadatanullable map

    Metadata.

  • namestring

    Event destination name.

  • snapshot_api_versionnullable string

    If using the snapshot event payload, the API version events are rendered as.

  • statusenum

    Status. It can be set to either enabled or disabled.

    Possible enum values
    disabled

    Event destination is disabled.

    enabled

    Event destination is enabled.

  • status_detailsnullable object

    Additional information about event destination status.

  • typeenum

    Event destination type.

    Possible enum values
    amazon_eventbridge

    Amazon EventBridge.

    webhook_endpoint

    Webhook endpoint.

  • updatedtimestamp

    Time at which the object was last updated.

  • webhook_endpointnullable object

    Webhook endpoint configuration.

Error Codes
404not_found

The resource wasn’t found.

409idempotency_error

An idempotent retry occurred with different request parameters.

POST /v2/core/event_destinations/:id/enable
curl -X POST https://api.stripe.com/v2/core/event_destinations/ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6/enable \
-H "Authorization: Bearer {{YOUR_API_KEY}}{{YOUR_API_KEY}}" \
-H "Stripe-Version: 2024-11-20.acacia"
Response
{
"id": "ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6",
"object": "v2.core.event_destination",
"created": "2024-10-22T16:20:09.931Z",
"description": "This is my event destination, I like it a lot",
"enabled_events": [
"v1.billing.meter.error_report_triggered"
],
"event_payload": "thin",
"events_from": [
"self"
],
"livemode": false,
"metadata": {},
"name": "My Event Destination",
"snapshot_api_version": null,
"status": "enabled",
"status_details": null,
"type": "webhook_endpoint",
"updated": "2024-10-22T16:21:38.634Z",
"webhook_endpoint": {
"signing_secret": null,
"url": null
}
}

Send a ping event to an event destination.

Parameters

  • idstringRequired

    Identifier for the event destination to ping.

Returns

Response attributes

  • idstring

    Unique identifier for the event.

  • objectstring, value is "v2.core.event"

    String representing the object’s type. Objects of the same type share the same value of the object field.

  • contextnullable string

    Authentication context needed to fetch the event or related object.

  • createdtimestamp

    Time at which the object was created.

  • datanullable object

    Additional data about the event.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • reasonnullable object

    Reason for the event.

  • related_objectnullable object

    Object containing the reference to API resource relevant to the event.

  • typestring

    The type of the event.

Error Codes
404not_found

The resource wasn’t found.

POST /v2/core/event_destinations/:id/ping
curl -X POST https://api.stripe.com/v2/core/event_destinations/evt_test_65RM8sQH2oXnebF5Rpc16RJyfa2xSQLHJJh1sxm7H0KI92/ping \
-H "Authorization: Bearer {{YOUR_API_KEY}}{{YOUR_API_KEY}}" \
-H "Stripe-Version: 2024-11-20.acacia"
Response
{
"id": "evt_test_65RM8sQH2oXnebF5Rpc16RJyfa2xSQLHJJh1sxm7H0KI92",
"object": "v2.core.event",
"context": null,
"created": "2024-10-22T16:26:54.063Z",
"data": null,
"livemode": false,
"reason": null,
"related_object": {
"id": "ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6",
"type": "event_destination",
"url": "/v2/core/event_destinations/ed_test_61RM8ltWcTW4mbsxf16RJyfa2xSQLHJJh1sxm7H0KVT6"
},
"type": "v2.core.event_destination.ping"
}