# 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

## Header parameters:

  - `last-event-id` (any)
    The `id` of the last event received; the stream resumes right after it. Any other value starts the stream live.

## 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.
Each event has an `id` (a UUID7). Reconnect with that id in `Last-Event-ID` to resume right after it; without one, the stream starts when you connect. Replay is best effort: only recent events are retained, and events sent before ids existed have none, so after a long disconnect fetch the payments you are waiting on with `GET /v2/payments/{id}`. Lines starting with `:` are comments (a ping every 15 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):

  - `data` (string)

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

  - `id` (string)
    UUID7 event id; send it back as `Last-Event-ID` to resume after it.

  - `retry` (integer)

## Response 400:

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

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

  - `detail` (any)

## Response 401:

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

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

  - `detail` (any)

## Response 403:

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

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

  - `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 (text/event-stream):

  - `detail` (any)

## Response 429 headers (text/event-stream):

  - `retry-after` (integer)
    Seconds to wait before retrying this request.

## Response 500:

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

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

  - `detail` (any)

## Response 200 examples:

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

