# Events

Stream payment events such as payment status or quote responses

Endpoint: GET /v2/events
Version: 3.0.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

## Response 200:

  - `200` (unknown)
    Server-sent event stream of your payments. Each event has an `event` name and a JSON `data` line: `payment` carries the full payment (the same shape as `GET /v2/payments/{id}`); `payment-update` carries only its id, timestamp and new status.
The stream starts when you connect. Events carry no `id`, so there is no `Last-Event-ID` resume, and events sent while you were disconnected are not replayed: after reconnecting, fetch the payments you are waiting on with `GET /v2/payments/{id}`. Lines starting with `:` are comments (a ping every 30 seconds keeps the connection open) and carry no data. There is no filtering: you receive events for every payment on your account.
The `Authorization` header is required, so use a server-side SSE client; the browser `EventSource` API cannot send it.

## Response 200 fields (text/event-stream):

  - `event` (string)
    Event type; selects the `data` shape.
    Enum: "payment", "payment-update"

  - `data` (string)

## Response 400:

  - `400` (unknown)
    Bad data in the request

## Response 400 fields (application/json):

  - `detail` (any)

## Response 401:

  - `401` (unknown)
    Access token not valid or expired

## Response 401 fields (application/json):

  - `detail` (any)

## Response 403:

  - `403` (unknown)
    Access token missing permissions to access the resource

## Response 403 fields (application/json):

  - `detail` (any)

## Response 429:

  - `429` (unknown)
    Request rate is too high; back off and retry. Where a `retry-after` response header is present it gives the number of seconds to wait.

## Response 429 fields (application/json):

  - `detail` (any)

## Response 500:

  - `500` (unknown)
    Internal server error (contact administrator)

## Response 500 fields (application/json):

  - `detail` (any)

## Response 200 examples:

  - `payment-update: status changed` (unknown)

