# GetEventsId

From **Stripe API**.

`GET /v1/events/{id}`

<p>Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.</p>

## Parameters

### `expand`

- Location: query
- Required: false
- Type: `array`

Specifies which fields in the response should be expanded.

### `id`

- Location: path
- Required: true
- Type: `string`
- maxLength: `5000`

## Request body

- Required: false
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

- Type: `object`

Events are our way of letting you know when something interesting happens in
your account. When an interesting event occurs, we create a new `Event`
object. For example, when a charge succeeds, we create a `charge.succeeded`
event; and when an invoice payment attempt fails, we create an
`invoice.payment_failed` event. Note that many API requests may cause multiple
events to be created. For example, if you create a new subscription for a
customer, you will receive both a `customer.subscription.created` event and a
`charge.succeeded` event.

Events occur when the state of another API resource changes. The state of that
resource at the time of the change is embedded in the event's data field. For
example, a `charge.succeeded` event will contain a charge, and an
`invoice.payment_failed` event will contain an invoice.

As with other API resources, you can use endpoints to retrieve an
[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)
from the API. We also have a separate
[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
`Event` objects directly to an endpoint on your server. Webhooks are managed
in your
[account settings](https://dashboard.stripe.com/account/webhooks),
and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.

When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of
events that occur in connected accounts. For these events, there will be an
additional `account` attribute in the received `Event` object.

**NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is
guaranteed only for 30 days.

```json
{"description":"Events are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new `Event`\nobject. For example, when a charge succeeds, we create a `charge.succeeded`\nevent; and when an invoice payment attempt fails, we create an\n`invoice.payment_failed` event. Note that many API requests may cause multiple\nevents to be created. For example, if you create a new subscription for a\ncustomer, you will receive both a `customer.subscription.created` event and a\n`charge.succeeded` event.\n\nEvents occur when the state of another API resource changes. The state of that\nresource at the time of the change is embedded in the event's data field. For\nexample, a `charge.succeeded` event will contain a charge, and an\n`invoice.payment_failed` event will contain an invoice.\n\nAs with other API resources, you can use endpoints to retrieve an\n[individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)\nfrom the API. We also have a separate\n[webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the\n`Event` objects directly to an endpoint on your server. Webhooks are managed\nin your\n[account settings](https://dashboard.stripe.com/account/webhooks),\nand our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.\n\nWhen using [Connect](https://stripe.com/docs/connect), you can also receive notifications of\nevents that occur in connected accounts. For these events, there will be an\nadditional `account` attribute in the received `Event` object.\n\n**NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is\nguaranteed only for 30 days.","properties":{"account":{"description":"The connected account that originated the event.","maxLength":5000,"type":"string"},"api_version":{"description":"The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*.","maxLength":5000,"nullable":true,"type":"string"},"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"data":{"$ref":"#/components/schemas/notification_event_data"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["event"],"type":"string"},"pending_webhooks":{"description":"Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.","type":"integer"},"request":{"anyOf":[{"$ref":"#/components/schemas/notification_event_request"}],"description":"Information on the API request that instigated the event.","nullable":true},"type":{"description":"Description of the event (e.g., `invoice.created` or `charge.refunded`).","maxLength":5000,"type":"string"}},"required":["created","data","id","livemode","object","pending_webhooks","type"],"title":"NotificationEvent","type":"object","x-expandableFields":["data","request"],"x-resourceId":"event"}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url https://api.stripe.com/v1/events/{id} \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{}'
```
